How rahulnikam2002/api-monitoring-system works
This repository implements an API-hit monitoring product: clients submit hit data, the server queues events for processing and analytics, and users inspect dashboard summaries. The dashboard also supports authentication, client/API-key management, and theme settings. The tree and excerpts establish the ingest path and dashboard composition; analytics, processor, and repository connections are less directly evidenced, so uncertain links are omitted or dashed.
Main entry points: server.js HTTP server · App.jsx Dashboard app · OverviewPage.jsx Overview page · api.js Dashboard API client
Components 30
Dashboard
- Dashboard app
dashboard/src/App.jsx - Login
dashboard/src/components/Login.jsx - Dashboard layout
dashboard/src/components/layout/DashboardLayout.jsx - Overview page
dashboard/src/pages/OverviewPage.jsx - Settings page
dashboard/src/pages/SettingsPage.jsx - Dashboard query
dashboard/src/hooks/useDashboardQuery.js - Dashboard API client
dashboard/src/api/api.js - Stats and charts
dashboard/src/components
Identity and clients
- Auth routes
server/src/services/auth/routes/authRouter.js - Auth service
server/src/services/auth/service/authService.js - User repository
server/src/services/auth/repository/UserRepository.js - Client routes
server/src/services/client/routes/clientRoutes.js - Client service
server/src/services/client/services/clientService.js - Client and key stores
server/src/services/client/repository
Hit ingestion
- Ingest routes
server/src/services/ingest/routes/ingestRoutes.js - Ingest controller
server/src/services/ingest/controller/ingestController.js - Ingest service
server/src/services/ingest/services/ingestServices.js - Event producer
server/src/shared/events/producer/eventProducer.js - RabbitMQ queue
server/src/shared/config/rabbitmq.js
Processing and analytics
- Event consumer
server/src/services/processor/consumer.js - Hit processor
server/src/services/processor/service/ProcessorService.js - Metrics repository
server/src/services/processor/repository/MetricsRepository.js - Analytics routes
server/src/services/analytics/routes/analyticsRoutes.js - Analytics controller
server/src/services/analytics/controller/analyticsController.js - Analytics service
server/src/services/analytics/services/analyticsService.js
Shared platform
- HTTP server
server/src/server.js - MongoDB
server/src/shared/config/mongodb.js - PostgreSQL
server/src/shared/config/postgres.js
Other components
- API client
- Dashboard user
Connections 32
- Dashboard user → Dashboard app: opens
dashboard/src/App.jsx - Dashboard app → Login: renders
dashboard/src/App.jsx - Dashboard app → Dashboard layout: renders
dashboard/src/App.jsx - Dashboard app → Overview page: routes to
dashboard/src/App.jsx - Dashboard app → Settings page: routes to
dashboard/src/App.jsx - Login → Dashboard API client: auth requests
dashboard/src/components/Login.jsx - Overview page → Dashboard query: loads data
dashboard/src/pages/OverviewPage.jsx - Overview page → Stats and charts: renders
dashboard/src/pages/OverviewPage.jsx - Settings page → Stats and charts: renders
dashboard/src/pages/SettingsPage.jsx - Dashboard query → Dashboard API client: fetches dashboard
dashboard/src/hooks/useDashboardQuery.js - Dashboard API client → HTTP server: HTTP requests
dashboard/src/api/api.js - API client → HTTP server: submits hits
- HTTP server → Auth routes: mounts
server/src/server.js - HTTP server → Client routes: mounts
server/src/server.js - HTTP server → Ingest routes: mounts
server/src/server.js - HTTP server → Analytics routes: mounts
server/src/server.js - Auth routes → Auth service: dispatches
- Auth service → User repository: reads and writes
- Client routes → Client service: dispatches
server/src/services/client/routes/clientRoutes.js - Client service → Client and key stores: uses repositories
- Ingest routes → Ingest controller: dispatches
server/src/services/ingest/routes/ingestRoutes.js - Ingest controller → Ingest service: submits hit
server/src/services/ingest/controller/ingestController.js - Ingest service → Event producer: publishes event
server/src/services/ingest/services/ingestServices.js - Event producer → RabbitMQ queue: enqueues event
- RabbitMQ queue → Event consumer: delivers event
- Event consumer → Hit processor: dispatches
- Hit processor → Metrics repository: stores metrics
- Analytics routes → Analytics controller: dispatches
- Analytics controller → Analytics service: requests analytics
- Analytics service → Metrics repository: reads metrics
- HTTP server → MongoDB: connects
server/src/server.js - HTTP server → PostgreSQL: connects
server/src/server.js