A resilient, decentralized uptime monitoring and consensus system using distributed validators, gossip, Raft, Kafka, and real-time alerting.
- Distributed validators ping websites from multiple regions
- Gossip protocol for vote sharing and quorum
- Aggregator node for consensus and alerting
- Raft-based log replication for durability
- Real-time WebSocket and REST APIs
- Kafka integration for event streaming
- Email alerts for downtime
- PostgreSQL persistence via Prisma ORM
- Modern React dashboard (Vite, Tailwind)
[Validator Nodes] <-> [Gossip] <-> [Aggregator (Raft Leader)] <-> [Kafka/DB/Alerts]
| |
+-------------------[WebSocket/API]----------------------+
apps/server— Node.js backend (validators, aggregator, API)apps/web— React client dashboardapps/docs— Documentation sitemonitoring/— Prometheus/Grafana configspackages/— Shared code, configs, and types
- Clone & Install
git clone ... cd distributed-validator pnpm install - Copy and configure env files
- See
.env.examplein each app (server, web, etc.) - Example for aggregator:
IS_AGGREGATOR=true PORT=3000 VALIDATOR_IDS=1,2 KAFKA_BROKER_LIST=kafka:9092 ...
- See
- Run with Docker Compose
docker-compose up --build
- Access the dashboard
- Each service has its own
.env.example(seeapps/server,apps/web) - Common variables:
PORT— Service portDATABASE_URL— PostgreSQL connection stringKAFKA_BROKER_LIST— Kafka brokersIS_AGGREGATOR— Set totruefor aggregator nodeVALIDATOR_ID— Unique ID for each validatorPEERS— Comma-separated peer addressesLOCATION— Validator location labelPING_INTERVAL_MS— Ping interval in msSMTP_*— Email alert config- See each
.env.examplefor full details
- REST:
/api/*for CRUD, logs, status, simulation - WebSocket:
/api/wsfor live consensus updates - Kafka: Internal event streaming
- Fork, branch, and PR with clear description
- Add/modify
.env.examplefor any new config - See
CONTRIBUTING.mdfor style and test guidelines
MIT © Kartik Tomar