Skip to content

BigBrotr

Enterprise-grade infrastructure for indexing, monitoring, and analyzing the Nostr protocol ecosystem

BigBrotr is a production-ready, modular system for archiving and monitoring the Nostr protocol ecosystem. Built with Python 3.9+ and PostgreSQL 16+, it provides comprehensive tools for relay discovery, health monitoring, and event synchronization across both clearnet and Tor networks.

BigBrotr follows a three-layer architecture that separates concerns and enables maximum flexibility:

  • Core Layer: Reusable infrastructure components (connection pooling, database interface, logging)
  • Service Layer: Business logic and service orchestration (Finder, Monitor, Synchronizer)
  • Implementation Layer: Deployment-specific configuration (BigBrotr full-featured, LilBrotr lightweight)

Relay Discovery

Automatically discover Nostr relays from public APIs (nostr.watch) and seed lists. Track over 8,800+ relays across clearnet and Tor networks.

Health Monitoring

Continuous NIP-11 and NIP-66 compliance testing with round-trip time (RTT) measurements. Monitor relay capabilities: openable, readable, writable.

Event Synchronization

High-performance multicore event collection using aiomultiprocess. Incremental sync with per-relay timestamp tracking for efficient updates.

Tor Network Support

Full support for .onion relay addresses via SOCKS5 proxy. Separate timeout configurations for Tor relays.

SQL Analytics

Pre-built views for statistics, event analysis, and relay metrics. Ready-to-query analytics without complex SQL.


BigBrotr’s architecture enables multiple deployment configurations from the same codebase:

ImplementationStorageTor SupportUse Case
BigBrotrFull (id, pubkey, created_at, kind, tags, content, sig)EnabledComplete archiving with full event data
LilBrotrEssential (id, pubkey, created_at, kind, sig)DisabledLightweight indexing without heavy content

Both implementations index all events - LilBrotr simply omits the storage-heavy tags and content fields, saving ~60% disk space while retaining core event metadata for analytics and queries.


TechnologyPurpose
Python 3.9+Primary programming language
PostgreSQL 16+Primary data storage with PGBouncer pooling
asyncpgHigh-performance async PostgreSQL driver
PydanticConfiguration validation and type safety
aiomultiprocessMulticore async processing
DockerContainerized deployment

Quick Start

Deploy BigBrotr in minutes with Docker Compose. Get started →

Architecture

Understand the three-layer architecture and design patterns. Learn more →

Services

Explore the Initializer, Finder, Monitor, and Synchronizer services. View services →

Database

Learn about the schema, tables, views, and stored procedures. View schema →


  • Three-layer modular architecture
  • Core layer (Pool, Brotr, BaseService, Logger)
  • All services (Initializer, Finder, Monitor, Synchronizer)
  • Async database with asyncpg + PGBouncer
  • Docker Compose deployment
  • 174 unit tests with full type hints
  • REST API service with OpenAPI documentation
  • NIP-90 Data Vending Machine (DVM) support
  • Prometheus metrics export
  • Admin dashboard
  • Database backup automation

BigBrotr is open source under the MIT license. Contributions are welcome!