Skip to content

highly-classified/API-Monitoring-Platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API Usage Analytics & Monitoring Platform

Overview

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.

Key Features

  • 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

Tech Stack

  • Backend: Node.js, Express
  • Database: PostgreSQL
  • Frontend: React (minimal)
  • Logging: Winston

Architecture

See ARCHITECTURE.md

API Endpoints

Core APIs

  • GET /api/users
  • GET /api/orders
  • GET /api/payments

Metrics

  • GET /metrics/summary
  • GET /metrics/endpoints
  • GET /metrics/errors
  • GET /metrics/slow

Alerts

  • GET /alerts/check
  • GET /alerts

Design Decisions

  • 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

How to Run

  1. Start PostgreSQL
  2. Configure .env
  3. Run backend: npm run dev
  4. Run dashboard: npm start

Future Improvements

  • Configurable alert thresholds
  • Authenticated API keys
  • Background job processing

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors