Replying to Avatar ⚡️🌱🌙

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!

❤️‍🔥

#[1]

What do you think of the above idea?

It’s a simple way to store, amend, retrieve source code with nostr.

Reply to this note

Please Login to reply.

Discussion

No, everybody loves git. This scheme would require reinventing the entire git.

Also git is already a decentralized protocol.