sandwichfarm / nostr-watch
NIP-66 stack
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing sandwichfarm/nostr-watch in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler view@nostrwatch A TypeScript monorepo for monitoring, auditing, and describing Nostr relays. is an OpenSats grant recipient. Overview nostr-watch provides the infrastructure for observing the Nostr relay network. It implements NIP-66 (Relay Monitoring System) to crawl relays, check their health, audit their capabilities, and publish structured results back to the Nostr network. The stack includes client-facing dashboards, long-running monitoring agents, and a library ecosystem that other projects can use independently. Architecture Packages are organized into three layers with a strict dependency direction: • **internal/** — Infrastructure shared across the monorepo (logging, publishing, utilities) • **libraries/** — Reusable packages that can be consumed independently • **apps/** — Product applications (services, dashboards, CLI tools) See the Architecture Overview for details on the adapter pattern and cross-package conventions. Packages Apps | Package | Description | Status | Platform | |---------|-------------|--------|----------| | | NIP-66 Nostr relay dashboard | | Web | | | Relay health monitor with NIP-66 event publishing | | Node · Deno | | | Relay data crawler for the nostr-watch network | | Node · Deno | | | NIP-66 relay intelligence state machine with REST and MCP endpoints | | Node | | | Browser-based relay scanner | | Web | | | Browser extension for monitoring Nostr activity | | Web | | | Pre-configured Docker Compose stacks for nostr-watch services | — | Docker | | ~~ ~~ | ~~Relay monitoring daemon~~ — replaced by | | — | Libraries | Package | Description | Status | Platform | |---------|-------------|--------|----------| | | Extensible relay capability discovery framework | | Web · Node | | | NIP-66 relay aggregation and state management | | Web · Node | | | Relay validation against advertised NIP support | | Web · Node | | | Relay URL sanitization and normalization | | Isomorphic | | | Chronicle relay history from NIP-66 delta events | | Web · Node | | | Chart adapters for relay data visualization | | Web | | | In-memory Nostr relay for testing and embedding | | Web · Node | | | Nostr relay running in a Service Worker | | Web | | | Isomorphic WebSocket wrapper | | Web · Node · Deno | | | Transform nocap output into NIP-66 Kind 30166 events | | Web · Node | | | AJV wrappers for Nostr JSON schema validation | | Web · Node | | | Negentropy set reconciliation utilities | | Web · Node | | | Uptime Kuma push monitor for Nostr relays | | Node | | | SQLite database layer | | Node | | | Continuous event retrieval from Nostr relays | | Node | | | NIP-66 protocol reference documentation | | — | | ~~ ~~ | ~~JSON schemas for Nostr protocol~~ — moved to | | — | | ~~ ~~ | ~~Relay URL sanitization~~ — replaced by | | — | | ~~ ~~ | ~~IndexedDB wrapper~~ — never implemented | | — | | ~~ ~~ | ~~Adapter toolkit~~ — never completed | | — | | ~~ ~~ | ~~Data transformation library~~ — never implemented | | — | Internal | Package | Description | Status | Platform | |---------|-------------|--------|----------| | | Nostr event publishing with adapter pattern | | Web · Node | | | NIP-66 monitor announcement event generation | | Web · Node | | | Structured logging wrapper | | Web · Node | | | Shared utilities (keys, arrays, env detection) | | Web · Node | | | BullMQ queue management and backoff control | | Node | | | Relay seeding from multiple discovery sources | | Node | | | BullMQ/Redis dashboard server | | Node | | | Nostr event kind constants (placeholder) | | — | | ~~ ~~ | ~~LMDB caching layer~~ — caching inlined into consumers | | — | Getting Started **Prerequisites:** Node.js >= 20, pnpm >= 8, Git. Optional: Deno >= 1.4 (for trawler/relaymon), Docker (for docker-stacks). See the Getting Started guide for common workflows and development commands. Documentation The documentation site lives in and is built with VitePress. • Architecture Overview — Package layers, dependency direction, adapter patterns • Getting Started — Setup, build, test, and dev workflows • All Packages — Full package catalog with detailed documentation Contributing is not yet open to external contributions. Contribution guidelines and issue templates are being established. Watch this repo for updates. License MIT — Sandwich Farm LLC