How frshaad/vigil works
Vigil is a full-stack website and API uptime-monitoring service. Users authenticate, create and manage monitors, and inspect dashboard metrics and check history. Scheduled or manual checks contact monitored endpoints; results update monitor state and history, status transitions create or resolve incidents, and notifications are delivered in-app or by email. The graph reflects documented product flows and sampled imports; unsampled subsystem links are included only where the README explicitly describes them.
Main entry points: prisma.ts Prisma data access · run-monitor-check.ts Check orchestration · page.tsx Dashboard · monitors Monitor pages
Components 23
Access and dashboard
- Sign-in pages
src/app/(auth)/login/page.tsx - Authentication
src/lib/auth/index.ts - Session and ownership
src/lib/auth/session.ts - Dashboard
src/app/(application)/dashboard/page.tsx
Monitor management
- Monitor pages
src/app/(application)/dashboard/monitors - Monitor list UI
src/features/monitors/components/monitor-list-client.tsx - Monitor mutations
src/features/monitors/actions - Monitor data access
src/features/monitors/dal.ts
Check and incident runtime
- Scheduled check route
src/app/api/cron/monitoring/route.ts - Due monitor scheduler
src/features/monitoring/scheduler/run-due-monitors.ts - Check orchestration
src/features/monitoring/run-monitor-check.ts - HTTP checker
src/features/monitoring/checker/check-monitor.ts - Check history and metrics
src/features/monitoring/history - Incident transitions
src/features/monitoring/incidents/handle-monitor-status.ts
Notifications and delivery
- Notification dispatch
src/features/notifications/dispatch-notification.ts - Notification data
src/features/notifications/dal.ts - Notification inbox UI
src/features/notifications/components/notification-bell-client.tsx - Email delivery
src/features/notifications/email/send-email-notification.ts
Persistence
- Prisma data access
src/lib/prisma.ts - PostgreSQL
Other components
- User
- Monitored endpoint
- Resend
Connections 28
- User → Sign-in pages: signs in
README.md - Sign-in pages → Authentication: authenticates
src/app/(auth)/login/page.tsx - Authentication → Session and ownership: provides session
src/lib/auth/session.ts - User → Dashboard: views
README.md - Dashboard → Session and ownership: requires session
src/app/(application)/dashboard/page.tsx - Dashboard → Monitor pages: opens monitors
src/app/(application)/dashboard/page.tsx - Monitor pages → Monitor list UI: renders list
src/features/monitors/components/monitor-list-client.tsx - Monitor pages → Monitor data access: loads monitor data
src/app/(application)/dashboard/monitors/[monitorId]/page.tsx - Monitor list UI → Monitor mutations: deletes monitor
src/features/monitors/components/monitor-list-client.tsx - Monitor mutations → Monitor data access: persists changes
- Scheduled check route → Due monitor scheduler: runs due checks
src/app/api/cron/monitoring/route.ts - Due monitor scheduler → Check orchestration: runs checks
README.md - Monitor mutations → Check orchestration: runs first check
README.md - Check orchestration → HTTP checker: checks endpoint
README.md - HTTP checker → Monitored endpoint: sends HTTP request
README.md - Check orchestration → Check history and metrics: stores check result
README.md - Check orchestration → Incident transitions: updates status
README.md - Incident transitions → Notification dispatch: dispatches on transition
README.md - Notification dispatch → Notification data: creates in-app alerts
- Notification dispatch → Email delivery: sends email alerts
README.md - Email delivery → Resend: delivers email
README.md - Notification inbox UI → Notification data: marks read
src/features/notifications/components/notification-bell-client.tsx - Dashboard → Prisma data access: reads dashboard data
README.md - Monitor data access → Prisma data access: queries monitors
src/features/monitors/dal.ts - Prisma data access → PostgreSQL: reads and writes
README.md - Check history and metrics → Prisma data access: stores history
README.md - Incident transitions → Prisma data access: stores transitions
README.md - Notification data → Prisma data access: stores notifications
README.md