How nisfeight8/pulsewatch works
PulseWatch lets users register and manage HTTP monitors, then independently checks them, records status transitions and incidents, and presents uptime data in a dashboard. The API and checker coordinate through Redis Streams; the checker has no database access. The graph preserves the documented email-alert path and frontend polling capability. Some worker, service, and task internals are represented by their exact enclosing directories because their source was not sampled.
Main entry points: main.py FastAPI application · scheduler.py Check scheduler · monitor Monitor management · handlers.py Status handlers
Components 23
Web frontend
- React application
frontend/src/App.tsx - Page routing
frontend/src/routes/AppRoutes.tsx - Dashboard and detail
frontend/src/pages - Polling queries
frontend/src/queries - API services
frontend/src/services - HTTP client
frontend/src/services/api-client.ts
Core API
- FastAPI application
api/app/main.py - Authentication
api/app/auth - Monitor management
api/app/monitor - Incident history
api/app/incident
Checker worker
- Monitor sync consumer
worker/worker/monitor_sync - Monitor snapshot
worker/worker/state.py - Check scheduler
worker/worker/scheduler.py - HTTP checker
worker/worker/checker.py
Event processing
- Status event consumer
api/consumer - Status handlers
api/consumer/handlers.py - Email alert tasks
api/app/incident/tasks.py - Celery worker
api/app/core/celery_app.py
Other components
- Monitor user
- PostgreSQL
- Redis Streams and broker
- Monitored endpoints
- SMTP service
Connections 27
- Monitor user → React application: uses
- React application → Page routing: renders
- Page routing → Dashboard and detail: routes to
- Dashboard and detail → Polling queries: requests data
- Polling queries → API services: calls
- API services → HTTP client: uses
- HTTP client → FastAPI application: REST requests
- FastAPI application → Authentication: dispatches auth
- FastAPI application → Monitor management: dispatches monitors
- FastAPI application → Incident history: dispatches incidents
- Authentication → PostgreSQL: reads/writes users
- Monitor management → PostgreSQL: reads/writes monitors
- Monitor management → Redis Streams and broker: publishes monitor_events
- Incident history → PostgreSQL: reads incidents
- Redis Streams and broker → Monitor sync consumer: delivers monitor_events
- Monitor sync consumer → Monitor snapshot: updates snapshot
- Check scheduler → Monitor snapshot: reads snapshot
- Check scheduler → HTTP checker: dispatches checks
- HTTP checker → Monitored endpoints: checks endpoints
- Check scheduler → Redis Streams and broker: publishes status_changes
- Redis Streams and broker → Status event consumer: delivers status_changes
- Status event consumer → Status handlers: dispatches events
- Status handlers → PostgreSQL: updates status/incidents
- Status handlers → Email alert tasks: queues alert task
- Email alert tasks → Redis Streams and broker: enqueues task
- Redis Streams and broker → Celery worker: delivers task
- Celery worker → SMTP service: sends email