How eziokwuche/sentinel-api works
Sentinel API monitors registered HTTP endpoints on schedules or manual requests, persists check history and alert records, and presents status and latency analytics in a polling React dashboard. The graph follows the principal UI-to-API and check-to-result paths, plus documented alerting and analytics capabilities. Edges cite shown calls or README relationships; unsampled route/controller behavior is represented only where supported by the README and source index.
Main entry points: index.js Express API · api.js Axios client · App.jsx App · monitorService.js Check and classify
Components 26
React dashboard
- App
frontend/src/App.jsx - Endpoint form
frontend/src/components/AddEndpointForm.jsx - Dashboard
frontend/src/components/Dashboard.jsx - Endpoint card
frontend/src/components/EndpointCard.jsx - Latency chart
frontend/src/components/ResponseTimeChart.jsx - Status badge
frontend/src/components/StatusBadge.jsx - Endpoint polling
frontend/src/hooks/useEndpoints.js - Axios client
frontend/src/services/api.js
REST API
- Express API
backend/src/index.js - Endpoint routes
backend/src/routes/endpointRoutes.js - Endpoint management
backend/src/controllers/endpointController.js - Check routes
backend/src/routes/checkRoutes.js - Manual check handler
backend/src/controllers/checkController.js - Dashboard routes
backend/src/routes/dashboardRoutes.js - Health route
backend/src/routes/healthRoutes.js
Monitoring and alerts
- Cron scheduler
backend/src/scheduler/cronJobs.js - Check and classify
backend/src/services/monitorService.js - Alert evaluation and email
backend/src/services/alertService.js
Persistence
- Persistence and analytics queries
backend/src/services/dbService.js - PostgreSQL connection
backend/src/config/db.js - Database schema
backend/sql/schema.sql
Other components
- Developer
- Browser user
- Monitored HTTP endpoint
- Gmail SMTP
- PostgreSQL
Connections 35
- Browser user → App: uses
README.md - App → Endpoint form: renders
frontend/src/App.jsx - App → Dashboard: renders
frontend/src/App.jsx - App → Endpoint polling: loads endpoints
frontend/src/App.jsx - Endpoint form → Axios client: submits endpoint
frontend/src/components/AddEndpointForm.jsx - Endpoint polling → Axios client: polls endpoints
frontend/src/hooks/useEndpoints.js - Dashboard → Axios client: loads summary
frontend/src/components/Dashboard.jsx - Dashboard → Endpoint card: renders
frontend/src/components/Dashboard.jsx - Endpoint card → Axios client: deletes endpoint
frontend/src/components/EndpointCard.jsx - Endpoint card → Latency chart: renders
frontend/src/components/EndpointCard.jsx - Endpoint card → Status badge: renders
frontend/src/components/EndpointCard.jsx - Latency chart → Axios client: loads history
frontend/src/components/ResponseTimeChart.jsx - Axios client → Express API: sends REST requests
README.md - Express API → Endpoint routes: mounts
backend/src/index.js - Express API → Check routes: mounts
backend/src/index.js - Express API → Dashboard routes: mounts
backend/src/index.js - Express API → Health route: mounts
backend/src/index.js - Endpoint routes → Endpoint management: dispatches
backend/src/routes/endpointRoutes.js - Dashboard routes → Endpoint management: dispatches
backend/src/routes/dashboardRoutes.js - Check routes → Manual check handler: dispatches
backend/src/routes/checkRoutes.js - Endpoint management → Persistence and analytics queries: manages endpoints
backend/src/controllers/endpointController.js - Endpoint management → Cron scheduler: updates schedules
backend/src/controllers/endpointController.js - Manual check handler → Check and classify: runs check
backend/src/controllers/checkController.js - Cron scheduler → Persistence and analytics queries: loads active endpoints
backend/src/scheduler/cronJobs.js - Cron scheduler → Check and classify: runs scheduled check
backend/src/scheduler/cronJobs.js - Check and classify → Monitored HTTP endpoint: checks HTTP status
backend/src/services/monitorService.js - Check and classify → Persistence and analytics queries: reads and saves checks
backend/src/services/monitorService.js - Check and classify → Alert evaluation and email: evaluates alerts
backend/src/services/monitorService.js - Alert evaluation and email → Persistence and analytics queries: stores alert
backend/src/services/alertService.js - Alert evaluation and email → Gmail SMTP: sends email
backend/src/services/alertService.js - Persistence and analytics queries → PostgreSQL connection: queries
backend/src/services/dbService.js - PostgreSQL connection → PostgreSQL: connects
README.md - Database schema → PostgreSQL: defines tables
README.md - App → Dashboard: refreshes after registration
frontend/src/App.jsx - Express API → Cron scheduler: initializes jobs
backend/src/index.js