Skip to main content
Programming

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 course

Lesson 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 chapters
1

Module 1: Foundations & Protocol Basics

5 lessons
  1. Lesson 1

    Analyze the Decentralized Relay-Client Architecture

    Analyze how Nostr eliminates single points of failure without trusted central servers

  2. Lesson 2

    Examine the Anatomy of a Nostr Event (NIP-01)

    Dissect JSON event structures, identifiers, timestamps, and payload fields

  3. Lesson 3

    Implement Cryptographic Hashing and Serialization

    Write code to compute canonical event hashes and verify Schnorr signatures

  4. Lesson 4

    Establish Persistent WebSocket Connections

    Configure socket lifecycles to communicate with standard Nostr relays

  5. Lesson 5

    Transmit and Query Data with NIP-01 Verbs

    Build EVENT publishing, REQ subscriptions, and CLOSE message handlers

2

Module 2: Cryptographic Identity & Secure Signers

5 lessons
  1. Lesson 6

    Generate Asymmetric secp256k1 Keypairs

    Construct public/private key pairs and manage user identity securely

  2. Lesson 7

    Encode and Decode Identifiers with NIP-19

    Transform hex keys into human-readable npub, nsec, and note bech32 formats

  3. Lesson 8

    Integrate NIP-07 Browser Extensions

    Prompt browser-based signers to authorize actions without exposing raw secret keys

  4. Lesson 9

    Configure Remote Signers via Nostr Connect (NIP-46)

    Establish secure remote key management across client applications

  5. Lesson 10

    Build Authentication Flows Using External Signers

    Construct secure login and authorization mechanisms for client applications

3

Module 3: Relays, Connections & Discovery

5 lessons
  1. Lesson 11

    Build Multi-Relay Connection Pools

    Connect to multiple relays simultaneously for high availability and fault tolerance

  2. Lesson 12

    Implement Event Deduplication and Stream Merging

    Filter and deduplicate identical events arriving from overlapping relay subscriptions

  3. Lesson 13

    Enforce Relay Authentication with NIP-42

    Handle AUTH challenge-response workflows to access restricted relays

  4. Lesson 14

    Discover User Network Metadata with NIP-65

    Query and update kind: 10002 relay lists to locate user read/write nodes

  5. Lesson 15

    Handle Relay Failover and Network Disconnections

    Build resilient reconnection strategies for unstable network environments

4

Module 4: Data Modeling, Events & Advanced NIPs

5 lessons
  1. Lesson 16

    Classify Event Kinds and State Models

    Differentiate standard immutable notes from single-state and parameterized events

  2. Lesson 17

    Manage Follow Graphs and Contacts (NIP-02)

    Construct and publish kind: 3 contact lists with relay hints and petnames

  3. Lesson 18

    Store Custom Application Data with NIP-78

    Serialize and retrieve arbitrary application metadata stored on relays

  4. Lesson 19

    Publish Long-Form Articles with NIP-23

    Implement parameterized replaceable events for blogs and structured content

  5. Lesson 20

    Construct Deep Links with NIP-21 URIs

    Parse and generate nostr: uniform resource identifiers for cross-app interoperability

5

Module 5: Modern Privacy, Messaging & Production Apps

5 lessons
  1. Lesson 21

    Implement Modern Encryption with NIP-44

    Encrypt and decrypt payload contents using versioned cryptographic standards

  2. Lesson 22

    Build Secure Direct Messaging with NIP-17

    Construct gift-wrapped, end-to-end encrypted private messages that obscure sender metadata

  3. Lesson 23

    Integrate Lightning Zaps and Micro-Transactions

    Parse zap receipts and implement Bitcoin payments within client applications

  4. Lesson 24

    Audit Codebases for Common Nostr Vulnerabilities

    Inspect applications to eliminate raw key exposure and deprecated NIP-04 usage

  5. 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.