- Who: For beginner programmers who want to learn how to build on Nostr
- What: A course with the assumption that the user has the least amount of knowledge.
- Minimum knowledge requirements:
- HTML, javascript, linux, node.js
- At least what Nostr is all about.
- Minimum knowledge requirements:
- Why: I want to learn as well.
- How: The course will be 100% sourced through prompts from ChatGPT4. Assume that I am copying almost verbatim from ChatGPT. I will be testing this as I go along
- Problems: Pull requests, issues, suggestions and corrections welcome.
Disclaimer: I am learning about Nostr myself and absolutely do not consider myself an expert on the matter. This is experimental. I could not vouch for the security or feasibility of any of the code. In short, by following this, you are taking responsibility for your own risks. Warning: As of March 4, 2024, there are bugs borne from the changes in nostr-tools and some other dependencies. I haven't gotten the time to review the code until lesson 4.6, but I am working on it.
- Introduction to Nostr and Setting Up the Environment
- Overview of Nostr protocol
- Installation of Node.js and setting up a new Node.js project
- Basics of using npm (Node Package Manager)
- Generating and Understanding Keys
- 2.1 Generating a private and public key using nostr-tools
- 2.2 Understanding the role of keys in Nostr
- Creating and Signing Events
- 3.1 Understanding what events are in Nostr
- 3.2 Code to create a basic event (e.g., a text post)
- Interacting with Relays
- 4.1 Explanation of Nostr relays and their role
- 4.2 Connecting to a relay and understanding relay functions
- 4.3 Nostr kinds
- 4.4 Project - Connect to a relay and subscribe to all kind 1 events
- 4.5 Project - Querying a relay NIP-11
- 4.6 Project - Publishing an event to a relay + NoteID
- Building a Basic User Interface
- 5.1 Setting up a basic web server with Express.js
- 5.2 Create a Basic Front End for the Express.js Nostr Server
- 5.3 Sending and receiving data from the client to the server
- Handling Real-time Updates with WebSockets
- 6.1 Integrating WebSockets for real-time communication
- 6.2 Establishing WebSocket connections between the client and server
- 6.3 Real-time display of events on the web app
- User Authentication and Session Management
- 7.1 Implementing basic user authentication using Nostr keys
- 7.2 Managing user sessions in the application
- 7.3 Enhancing security for user authentication
- Advanced Event Handling
- 8.1 Parsing and handling different types of events (e.g., likes, replies)
- 8.2 Implementing event filters and search functionality
- 8.3 Handling event validation and errors
- Building a Follow System
- 9.1 Implementing a system to follow/unfollow users
- 9.2 Fetching and displaying posts from followed users
- 9.3 Managing a user's follow list
- Optimizing and Scaling the Application
- 10.1 Best practices for code organization and modularity
- 10.2 Handling large numbers of concurrent users and events
- 10.3 Scaling the application with additional relays or resources
- Adding Additional Features
- 11.1 Implementing features like retweets, likes, and replies
- 11.2 User profile management
- 11.3 Customizing the user interface
- Deployment and Maintenance
- 12.1 Deploying the web application to a cloud provider
- 12.2 Setting up continuous integration/continuous deployment (CI/CD) pipelines
- 12.3 Monitoring and maintaining the application post-deployment
- Finalizing and Testing the Application
- 13.1 Conducting thorough testing (unit tests, integration tests)
- 13.2 Collecting user feedback and making final adjustments
- 13.3 Launching the application officially
- Conclusion and Future Directions
- 14.1 Recap of what has been built and learned
- 14.2 Discussing potential extensions and new features
- 14.3 Community involvement and open-source contributions