Nostr Protocol and NIPs for Beginners
Designed for absolute beginners, this course teaches the fundamentals of the Nostr protocol and Nostr Implementation Possibilities (NIPs) to build decentralized applications.
25 lessons · about 10 hours · by Chukwuma Ebube · 0 forks
Fork this outline into your library and start learning.
Start this courseLesson preview
First look
Analyze the Decentralized Relay-Client Architecture
Analyze how Nostr eliminates single points of failure without trusted central servers
Syllabus
25 lessons across chaptersModule 1: Foundations & Protocol Basics
5 lessonsLesson 1
Analyze the Decentralized Relay-Client Architecture
Analyze how Nostr eliminates single points of failure without trusted central servers
Lesson 2
Examine the Anatomy of a Nostr Event (NIP-01)
Dissect JSON event structures, identifiers, timestamps, and payload fields
Lesson 3
Implement Cryptographic Hashing and Serialization
Write code to compute canonical event hashes and verify Schnorr signatures
Lesson 4
Establish Persistent WebSocket Connections
Configure socket lifecycles to communicate with standard Nostr relays
Lesson 5
Transmit and Query Data with NIP-01 Verbs
Build EVENT publishing, REQ subscriptions, and CLOSE message handlers
Module 2: Cryptographic Identity & Secure Signers
5 lessonsLesson 6
Generate Asymmetric secp256k1 Keypairs
Construct public/private key pairs and manage user identity securely
Lesson 7
Encode and Decode Identifiers with NIP-19
Transform hex keys into human-readable npub, nsec, and note bech32 formats
Lesson 8
Integrate NIP-07 Browser Extensions
Prompt browser-based signers to authorize actions without exposing raw secret keys
Lesson 9
Configure Remote Signers via Nostr Connect (NIP-46)
Establish secure remote key management across client applications
Lesson 10
Build Authentication Flows Using External Signers
Construct secure login and authorization mechanisms for client applications
Module 3: Relays, Connections & Discovery
5 lessonsLesson 11
Build Multi-Relay Connection Pools
Connect to multiple relays simultaneously for high availability and fault tolerance
Lesson 12
Implement Event Deduplication and Stream Merging
Filter and deduplicate identical events arriving from overlapping relay subscriptions
Lesson 13
Enforce Relay Authentication with NIP-42
Handle AUTH challenge-response workflows to access restricted relays
Lesson 14
Discover User Network Metadata with NIP-65
Query and update kind: 10002 relay lists to locate user read/write nodes
Lesson 15
Handle Relay Failover and Network Disconnections
Build resilient reconnection strategies for unstable network environments
Module 4: Data Modeling, Events & Advanced NIPs
5 lessonsLesson 16
Classify Event Kinds and State Models
Differentiate standard immutable notes from single-state and parameterized events
Lesson 17
Manage Follow Graphs and Contacts (NIP-02)
Construct and publish kind: 3 contact lists with relay hints and petnames
Lesson 18
Store Custom Application Data with NIP-78
Serialize and retrieve arbitrary application metadata stored on relays
Lesson 19
Publish Long-Form Articles with NIP-23
Implement parameterized replaceable events for blogs and structured content
Lesson 20
Construct Deep Links with NIP-21 URIs
Parse and generate nostr: uniform resource identifiers for cross-app interoperability
Module 5: Modern Privacy, Messaging & Production Apps
5 lessonsLesson 21
Implement Modern Encryption with NIP-44
Encrypt and decrypt payload contents using versioned cryptographic standards
Lesson 22
Build Secure Direct Messaging with NIP-17
Construct gift-wrapped, end-to-end encrypted private messages that obscure sender metadata
Lesson 23
Integrate Lightning Zaps and Micro-Transactions
Parse zap receipts and implement Bitcoin payments within client applications
Lesson 24
Audit Codebases for Common Nostr Vulnerabilities
Inspect applications to eliminate raw key exposure and deprecated NIP-04 usage
Lesson 25
Deploy a Production-Ready Nostr Application
Package and ship a decentralized client or bot using robust TypeScript or Rust SDKs
Forking copies the syllabus and lesson text into your private library.