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!

❤️‍🔥

Reply to this note

Please Login to reply.

Discussion

You to Jack’s offer for sats paid for a GitHub replacement.

Haha, I don’t think this is what he had in mind.

This is just a super simple way to put repos directly into notes.

It’s still an interesting idea.

I was able to make sense of your explanation. I’ve got a couple questions:

- how do you handle large files?

- how do you handle large numbers of files?

- how do you ensure each changing a line in every file does not result the duplication on the size of the repo?

- how can someone track the evolution of a single file?

Yes, your explanation was clear enough.

Your method however seems to work for point-in-time snapshots of a repository, but not for efficiently capturing the evolution of a repository using efficient merkle tree structures like those used in Git.

I recommend that you check out "Dissecting Git Guts" talk by Emily Xie.

Your post is getting a lot of eyes on it.

Added to the https://member.cash/hot feed

#[1]

What do you think of the above idea?

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

Read this thread…

#[2]

Zapped and followed, big brain 🫡

I don't know what you just said but it sounds exciting! Zap!

It's somehow complicated to me

This isn’t just a GitHub replacement. The next step would be to do releases as events plus reviews and you’ve just got rid of the app stores.

For the Repo Key…

NIP-05 = app@store.com

Will probably use

nostrmarketplace.com

To host the NIP-05 identities of a bunch of things that I inject the source code of into nostr relays, probably starting with the various open source relay implementations, and open source nostr clients, Bitcoin core, LN node, etc, etc, etc…

Create a fully decentralised App Store hosted inside nostr relay DB’s as notes.

Haven’t pointed DNS at IP yet.

You bastard! Now I probably have to finish this. If I just fudge the event handler from nostream, does that count?

#[2]

We don't want to throw away git entirely.

Thanks for clearing up, I’ll leave it then.

What does nostr add to git?