explaingit

nostr-protocol/nostr

11,346Audience · developerComplexity · 3/5Setup · moderate

TLDR

Nostr is an open protocol for a censorship-resistant social network where users publish cryptographically signed messages to independent relay servers, so no single company can delete accounts or silence posts.

Mindmap

mindmap
  root((repo))
    Core concept
      Notes on relays
      Censorship resistant
      Cryptographic keys
    How it works
      Publish to relays
      Follow public keys
      Signed messages
    Challenges
      Discovery
      Outbox model
      Relay routing
    Resources
      NIP-01 spec
      nostrapps.com
      njump.me starter
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build a decentralized social app where users post and read messages without relying on one company's servers

USE CASE 2

Run your own Nostr relay server to give your community a reliable independent place to publish

USE CASE 3

Create a Nostr-compatible client app using the NIP-01 specification and connect it to the existing relay network

Getting it running

Difficulty · moderate Time to first run · 30min

Building a client requires implementing public and private key signing, no central server or account registration.

In plain English

Nostr stands for "Notes and Other Stuff Transmitted by Relays." It is an open protocol designed to let people publish and read short messages without depending on any single company or server. The goal is a social network where no central authority can remove someone's account or block their posts. The way it works is straightforward. Instead of posting to one platform that stores everything, you publish your notes to one or more relays, which are simple servers that anyone can run. People who follow you connect to those same relays to read what you have written. Because any relay can host your content, no single relay can silence you: as long as at least one relay is willing to carry your posts, your followers can still find them. To prevent relays from tampering with posts or impersonating authors, every note is signed with a cryptographic key. When you follow someone, you are actually following their public key. Your Nostr client checks every incoming message against that key, so a dishonest relay cannot inject fake posts into your feed. One of the harder problems the protocol openly acknowledges is discovery: if a person you follow publishes to a different relay than the one you check, you might miss their posts. The project links to several ongoing approaches to this routing problem, including a pattern called the outbox model that is explained with an animated diagram at how-nostr-works.pages.dev. The protocol specification is documented in a set of documents called NIPs, starting with NIP-01 on GitHub. A growing list of apps built on Nostr is maintained at nostrapps.com. If you want to try Nostr without reading the spec first, the project recommends starting at start.njump.me.

Copy-paste prompts

Prompt 1
I want to build a simple Nostr client that lets users post notes, explain the NIP-01 event format and show me JavaScript code to sign and publish an event to a relay
Prompt 2
How does the Nostr outbox model solve the relay discovery problem? Help me implement a basic version so my client finds posts from followed users across different relays
Prompt 3
Walk me through setting up a minimal Nostr relay server, what does it need to handle to be NIP-01 compatible?
Prompt 4
I want to add Nostr login to my web app using a browser extension wallet, show me how to request the public key and sign an event without holding the private key
Open on GitHub → Explain another repo

← nostr-protocol on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.