Skip to content

Backend-first API monitoring & analytics platform with scheduled health checks, time-series metrics, alerting, and Streamlit/React dashboards.

License

Notifications You must be signed in to change notification settings

Pravar-Gupta/PulseAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ PulseAPI โ€” API Monitoring & Analytics Platform

PulseAPI is a backend-first API observability system that continuously monitors APIs, stores historical performance data, computes reliability metrics, and visualizes trends through dashboards.

API Monitoring Terminal


๐Ÿ“‘ Table of Contents


๐Ÿ” Overview

PulseAPI helps answer critical operational questions:

  • Are my APIs up or down?
  • Are they getting slower over time?
  • How reliable are they historically?
  • When did errors or latency spikes occur?

Unlike simple API callers, PulseAPI is designed as a long-running monitoring system with background jobs, persistent storage, analytics, and multiple visualization layers.


๐Ÿง  Motivation

Most beginner projects:

  • Call an API once
  • Display the response
  • Stop there

PulseAPI focuses on observability and systems thinking by introducing:

  • Background schedulers
  • Persistent databases
  • Time-series analytics
  • Multiple frontend consumers

This makes it closer to real internal engineering tools used in production environments.


๐Ÿ—๏ธ Architecture

Scheduler (APScheduler) โ†“ API Health Checks (httpx) โ†“ PostgreSQL (Time-Series Logs) โ†“ Analytics Engine (FastAPI) โ†“ Dashboards (Streamlit / React)

Core Components

  • FastAPI Backend
    • API registry
    • Analytics endpoints
    • Alerting logic
  • Background Scheduler
    • Periodic API health checks
    • Latency & error detection
  • PostgreSQL
    • Persistent time-series storage
  • Streamlit Dashboard
    • Internal monitoring interface
  • React Dashboard
    • Experimental modern UI layer

๐Ÿ“Š Features

โœ… Monitoring

  • Periodic API health checks
  • Latency measurement
  • Error detection (timeouts, DNS failures, HTTP errors)

๐Ÿ“ˆ Analytics

  • Uptime percentage
  • Average latency
  • P95 / P99 latency
  • Error rate
  • Total number of checks
  • Last checked timestamp

๐Ÿ–ฅ๏ธ Dashboards

  • Streamlit
    • Internal monitoring dashboard
    • Status views (UP / DEGRADED / DOWN)
    • Latency charts and tables
  • React
    • Read-only analytics dashboard
    • Metrics cards
    • Latency trend visualization
    • Health status indicator

๐Ÿšจ Alerting

  • High latency alerts
  • Downtime alerts
  • Cooldown logic to prevent alert spam

๐Ÿ–ฅ๏ธ Dashboards Preview

Streamlit โ€” Internal Operations Dashboard

The Streamlit dashboard provides a real-time operational view of API health, latency trends, and failure states.

Streamlit Dashboard


React โ€” Experimental UI

React Dashboard

The React dashboard is an experimental visualization layer built on top of the same backend APIs.
It does not introduce new business logic.


๐Ÿš€ Running PulseAPI Locally

PulseAPI is designed to run locally, mirroring real production architecture.

๐Ÿ”ง Prerequisites

  • Python 3.10+
  • PostgreSQL
  • Node.js (for React dashboard)
  • Virtual environment or Anaconda (recommended)

1๏ธโƒฃ Clone the repository

git clone https://github.com/<your-username>/PulseAPI.git
cd PulseAPI

2๏ธโƒฃ Backend setup

Install dependencies:

pip install -r requirements.txt

Create environment variables:

cp .env.example .env

Update DATABASE_URL inside .env with your PostgreSQL credentials.


3๏ธโƒฃ Start the backend server

uvicorn app.main:app --reload
  • Backend: http://127.0.0.1:8000/
  • Swagger UI: http://127.0.0.1:8000/docs

4๏ธโƒฃ Scheduler

The scheduler starts automatically with the backend and performs periodic API checks.


5๏ธโƒฃ Run Streamlit dashboard

streamlit run dashboard/app.py

6๏ธโƒฃ Run React dashboard

cd react-dashboard
npm install
npm run dev

React UI will be available at:

http://localhost:5173

๐Ÿ“ธ Screenshots & Demos

Additional screenshots and demos are available in the ๐Ÿ“ screenshots/ directory, including:

  • Swagger API documentation
  • PostgreSQL tables
  • Streamlit latency table view
  • API dropdown selection
  • Terminal monitoring output

๐Ÿ“š Documentation

Detailed documentation is available in the ๐Ÿ“„ docs/ directory:

  • architecture.md โ€” System design and data flow
  • phases.md โ€” Phase-wise development roadmap
  • metrics.md โ€” Monitoring metrics explained
  • alerts.md โ€” Alerting logic and cooldown strategy

๐Ÿ”ฎ Future Improvements

Authentication & multi-user support

  • Per-API configurable thresholds
  • Email / Slack alert integrations
  • Cloud deployment
  • Advanced anomaly detection

About

Backend-first API monitoring & analytics platform with scheduled health checks, time-series metrics, alerting, and Streamlit/React dashboards.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published