Skip to content

andraokta/devpulse

Repository files navigation

DevPulse

Real-time, local-first system observability for developers.
Monitor CPU, memory, disk, network, processes, alerts, and historical metrics from one responsive dashboard.

Python FastAPI CI License

Why DevPulse?

Cloud monitoring products are excessive when you only need a fast answer to what is happening on this machine? DevPulse keeps collection and storage local, requires no account, and exposes both a polished dashboard and an OpenAPI-documented API.

Features

  • Live WebSocket telemetry for CPU, memory, disk, network, process count, and uptime
  • Process explorer ranked by resident memory usage
  • Threshold alerts configurable through environment variables
  • SQLite history with bounded API queries
  • Interactive API docs generated by FastAPI
  • Automatic reconnect when the WebSocket connection drops
  • Responsive dashboard with zero frontend dependencies
  • Cross-platform collection through psutil (Windows, Linux, macOS)
  • Docker support, health check, non-root container, CI, lint, tests, and coverage gate

Preview

DevPulse dashboard

The dashboard is designed as a developer observability console: live metric cards, animated sparklines, transfer visualization, threshold warnings, and a real-time process table.

Quick start

Requirements

  • Python 3.11+
  • uv (recommended)

Run locally

git clone https://github.com/andraokta/devpulse.git
cd devpulse
uv sync --extra dev
uv run devpulse

Open:

Run with Docker

docker compose up --build

Configuration

Copy .env.example to .env and override what you need:

Variable Default Purpose
DEVPULSE_HOST 127.0.0.1 Bind address
DEVPULSE_PORT 8000 HTTP port
DEVPULSE_SAMPLE_INTERVAL 2 Seconds between samples
DEVPULSE_DATABASE_PATH data/devpulse.db SQLite location
DEVPULSE_CPU_THRESHOLD 85 CPU alert percentage
DEVPULSE_MEMORY_THRESHOLD 90 Memory alert percentage
DEVPULSE_DISK_THRESHOLD 90 Disk alert percentage

API

Method Endpoint Description
GET /api/health Service health and version
GET /api/metrics/current Current metrics and active alerts
GET /api/metrics/history?limit=60 Historical samples
GET /api/processes?limit=10 Top processes by memory
WS /ws/metrics Real-time metric stream

Example:

curl http://127.0.0.1:8000/api/metrics/current

Development

uv sync --extra dev
uv run ruff check .
uv run pytest --cov=devpulse --cov-report=term-missing
uv build

Tests cover metric normalization, process ordering, alert evaluation, API health, current metrics, process limits, and invalid request validation.

Architecture

Operating System ──psutil──> Collector ──> Alert Engine
                                 │
                                 ├──────> SQLite history
                                 ├──────> REST API / OpenAPI
                                 └──────> WebSocket ──> Dashboard

See docs/ARCHITECTURE.md for component boundaries, data flow, and security considerations.

Security

DevPulse binds to localhost by default. Process names and system metrics may be sensitive; if you expose the service to a network, place it behind an authenticated reverse proxy.

  • No shell execution
  • Parameterized SQLite queries
  • Bounded query parameters
  • Non-root Docker runtime
  • Read-only GitHub Actions permissions

Roadmap

  • Per-process CPU trend charts
  • Export history to CSV
  • Configurable retention policy
  • Optional authenticated remote mode
  • Prometheus-compatible endpoint

Contributing

Issues and pull requests are welcome. Please run lint and tests before submitting changes.

License

MIT © 2026 Andra Dwi Okta Ramadhan

About

Real-time local-first system monitor with FastAPI, WebSockets, SQLite, Docker, and a responsive dashboard.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages