A high-performance Nostr relay implementation powered by NestJS and PostgreSQL.
- Clone and Install:
git clone https://github.com/HumanjavaEnterprises/nostr-relay-nestjs.git
cd nostr-relay-nestjs
npm install
- Configure Environment:
cp .env.example .env
# Edit .env with your settings
- Run Migrations:
npx ts-node scripts/migrate-to-latest.ts
- Start the Relay:
npm run start:dev
📚 Core Documentation
- Installation Guide - Complete setup instructions
- Deployment Guide - Production deployment walkthrough
- Technical Specifications - Implementation details and NIPs
- Architecture Decisions - Key architectural choices
🔧 Operations
- Security Guide - Security best practices
- Monitoring Guide - System monitoring
- Troubleshooting Guide - Common issues
👩💻 Development
- Development Guide - Development workflow
- Testing Guide - Testing procedures and infrastructure
- Working with AI - AI-assisted development
The deployment process requires specific steps to ensure safe execution:
-
Prepare for Deployment:
# CRITICAL: Copy deploy script to parent directory first cp deploy.sh ../deploy-nostr.sh # Move to parent directory cd .. # Make script executable chmod +x deploy-nostr.sh
-
Execute Deployment:
# Run deployment from outside the project directory ./deploy-nostr.sh
⚠️ WARNING: Never run the deploy script from within the project directory! The deployment process removes and replaces the project directory, which could interrupt the script if run from within. -
After Deployment:
# Optional: Remove the copied deploy script rm deploy-nostr.sh
- Safety: Running from outside the target directory ensures the script continues executing even when the project directory is modified
- Reliability: Prevents script interruption during critical deployment steps
- Security: Maintains a clean deployment process with no self-copying scripts
For detailed deployment configuration and options, see our Deployment Guide.
🟢 Full implemented 🟡 Partially implemented 🔴 Not implemented
NIP | Status | Description |
---|---|---|
01 | 🟢 | Basic protocol flow |
02 | 🟢 | Contact List |
04 | 🟢 | Encrypted Direct Message |
05 | 🟢 | DNS Identifiers |
09 | 🔴 | Event Deletion |
11 | 🟢 | Relay Information |
13 | 🟢 | Proof of Work |
17 | 🟢 | Report Events |
22 | 🟢 | Event Timestamps |
26 | 🟢 | Delegated Events |
28 | 🟢 | Public Chat |
29 | 🟢 | Group Chat |
40 | 🟢 | Expiration |
42 | 🟢 | Authentication |
45 | 🔴 | Counting |
50 | 🟢 | Search |
For detailed NIP implementations, see our Technical Specifications.
We welcome contributions! Please see our Contributing Guide for details.
This project is licensed under the MIT License - see the LICENSE file for details.