Why Nostr? What is Njump?
2024-09-10 23:55:20

stacksatsio on Nostr: How is the 10 BTC #bounty for a GitHub replacement going? I still like Stu idea and ...

How is the 10 BTC #bounty for a GitHub replacement going?

I still like idea and think about it occasionally, very simple but very powerful also.
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
npub10jnx6stxk9h4fgtgdqv3hgwx8p4fwe3y73357wykmxm8gz3c3j3sjlvcrd