This project is a backend-focused API monitoring system that tracks request usage, latency, and errors using middleware-based interception. It provides analytics and rule-based alerts to help backend teams understand API behavior and detect issues early.
- Middleware-based request monitoring
- Time-series request storage (PostgreSQL)
- Aggregated metrics (latency, error rate, traffic)
- Rule-based anomaly detection
- Non-blocking logging for performance safety
- Minimal dashboard for visualization
- Backend: Node.js, Express
- Database: PostgreSQL
- Frontend: React (minimal)
- Logging: Winston
See ARCHITECTURE.md
- GET /api/users
- GET /api/orders
- GET /api/payments
- GET /metrics/summary
- GET /metrics/endpoints
- GET /metrics/errors
- GET /metrics/slow
- GET /alerts/check
- GET /alerts
- Used middleware for request interception to avoid modifying business logic
- Used SQL aggregations for analytics instead of in-memory computation
- Implemented async logging to avoid performance bottlenecks
- Used rule-based alerts instead of ML for simplicity and reliability
- Start PostgreSQL
- Configure
.env - Run backend:
npm run dev - Run dashboard:
npm start
- Configurable alert thresholds
- Authenticated API keys
- Background job processing