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!
ā¤ļøāš„
Published at
2023-02-13 01:51:57Event JSON
{
"id": "48711e3600c17644f9e2c77fb0123604ea4c4b1bf4002b4fecf37d5fc9df9582",
"pubkey": "7560e065bdfe91872a336b4b15dacd2445257f429364c10efc38e6e7d8ffc1ff",
"created_at": 1676253117,
"kind": 1,
"tags": [],
"content": "I have an idea for a nostr GitHub replacement but it seems too simple. š Thereās no code. š¤£\nMaybe this could be a NIP?\n\nTo create a repo you create a new pubkey (maybe with multisig).\n\nThe repo pubkey will publish notes (repo notes) that include nothing but a list of noteIDās.\n\neg\nnoteID1\nnoteID2\nnoteID3\n\n(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)\n\nThese 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.\n\nEach source code noteID, listed in the repo note that is published by the repo pubkey must have the following syntax:\n\nLine 1: path/file.name\nLine 2: line 1 of source code\nLine n: line n-1 of source code \n\nTo 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.\n\nAnyone 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.\n\n\nDoes this make sense? š¤ \n\nThis is insanely powerful. Everything already exists!\n\nā¤ļøāš„",
"sig": "133e369ba289c9f90d9c25a18add635e5e8e790a350b835266e315516ef522fb37bcbc4faf0b55540af1317fd1289ecfa1806b9ea67b6abca58c17e2a19d472f"
}