Why Nostr? What is Njump?
2023-02-13 01:51:57

Stu on Nostr: I have an idea for a nostr GitHub replacement but it seems too simple. šŸ˜‚ Thereā€™s ...

I have an idea for a nostr GitHub replacement but it seems too simple. šŸ˜‚ Thereā€™s no code. šŸ¤£
Maybe this could be a NIP?

To create a repo you create a new pubkey (maybe with multisig).

The repo pubkey will publish notes (repo notes) that include nothing but a list of noteIDā€™s.

eg
noteID1
noteID2
noteID3

(these noteIDā€™s are the files, but how? Each of these notes contains a path/file.name and the source code of a file, they are code notes)

These code notes listed on the repo note can be created by anyone, but the repo pubkey only publishes repo notes. Repo notes only contain lists of noteIDs that make up the source code of the repo, the code notes. Whoever controls the repo pubkey controls which noteIDā€™s are on the repo notes published by the repo pubkey.

Each source code noteID, listed in the repo note that is published by the repo pubkey must have the following syntax:

Line 1: path/file.name
Line 2: line 1 of source code
Line n: line n-1 of source code

To get the files from a nostr repo all you need is the pubkey. You pull the latest note of the repo pubkey and then download every noteID that is listed in the latest repo note from the repo pubkey and you run a script that creates path/file.name from line 1 of each code note and injects the source code from line 2-n of the note.

Anyone can make changes to the source code, but only when the repo pubkey publishes a more recent repo note that references new noteIDā€™s that represent code changes do the changes actually go live.


Does this make sense? šŸ¤”

This is insanely powerful. Everything already exists!

ā¤ļøā€šŸ”„
Author Public Key
npub1w4swqedal6gcw23ndd93tkkdy3zj2l6zjdjvzrhu8rnw0k8lc8lswzprhz