Skip to content

Repository files navigation

Sentinel Logo

Sentinel

A modern, full-stack API and HTTP uptime monitoring platform.


Overview

Sentinel is an automated API and HTTP uptime monitoring dashboard. It allows engineers to configure target endpoints with custom check intervals and latency thresholds, runs automated background health checks, tracks historical response times, and records downtime incidents with instant dashboard feedback.


⚡ Live Demo & Guest Credentials

Anyone can log in and test Sentinel using the pre-seeded guest demo account:

Field Demo Credential
Email demo@sentinel.dev
Password SentinelDemo123!

Tip: On the login page, you can also click "Auto-Fill" to populate the guest credentials in one click.


Architecture & Tech Stack

React 19 + TypeScript (Vite SPA)
               │
          HTTP / REST (JWT Auth)
               ▼
     FastAPI Backend (Python)
               │
   ┌───────────┴───────────┐
   ▼                       ▼
PostgreSQL          In-Process Monitor
(Relational Data)   (Async httpx loop)

Backend

  • FastAPI (Python): REST API handling authentication, multi-tenant endpoint configuration, and metrics aggregation.
  • PostgreSQL + SQLAlchemy: Relational persistence for users, projects, monitored endpoints, check results, incidents, and API keys.
  • JWT & Passlib (Bcrypt): Password hashing and token-based authentication with user-isolated data queries.
  • In-Process Monitoring Engine: Lightweight background daemon thread executing periodic non-blocking HTTP health checks using httpx.

Frontend

  • React 19 + TypeScript: Modular Single Page Application (SPA) built with Vite.
  • Tailwind CSS: Modern dashboard styling with full Dark and Light theme support.
  • Recharts: Latency trends (AreaChart) and 7-day uptime percentage (BarChart).
  • Lucide Icons & React Hot Toast: Clean icon set and feedback notifications.
  • Axios Client: Centralized request/response interceptors managing Bearer tokens and 401 session clearing.

Core Features

  • Multi-Tenant User Isolation: Secure registration and login. Endpoints and metrics are isolated per user account.
  • Automated Health Checks: Custom intervals (10s–300s), response threshold enforcement, and support for all standard HTTP methods (GET, POST, PUT, DELETE, PATCH).
  • Instant Manual Checks: Trigger on-demand health pings directly from the UI table.
  • Incident & Alert Tracking: Automatic incident detection for 4xx/5xx responses or latency breaches with automatic recovery resolution.
  • Interactive Metrics Dashboard: High-level KPIs (Total, Active, Down, Average Latency) with visual trends.
  • Search & Multi-Filtering: Fast client-side filtering by endpoint name, URL, HTTP status (UP, DOWN, NEW, PAUSED), and method.
  • API Key Management: Create and revoke cryptographic API keys.

Local Development Quickstart

Prerequisites

  • Python 3.10+
  • Node.js 18+
  • PostgreSQL database

1. Backend Setup

# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Configure environment variables (.env)
cp .env.example .env
# Edit .env with your PostgreSQL DATABASE_URL and SECRET_KEY

# Run database setup (or migrations)
python migrate_settings.py

# Start FastAPI server
uvicorn app.main:app --reload --port 8000

2. Frontend Setup

cd frontend

# Install dependencies
npm install

# Configure environment variables (.env.local)
cp .env.example .env.local

# Start Vite development server
npm run dev

Visit http://localhost:5173 to create an account and start monitoring endpoints.


Production Deployment Guide

1. Database (Neon PostgreSQL)

  1. Create a free PostgreSQL instance on Neon.
  2. Copy the pooled connection string (e.g. postgresql://user:password@ep-xyz.neon.tech/neondb?sslmode=require).

2. Backend (Render Web Service)

  1. Create a new Web Service on Render connected to your GitHub repository.
  2. Configure settings:
    • Environment: Python 3.11
    • Build Command: pip install -r requirements.txt
    • Start Command: uvicorn app.main:app --host 0.0.0.0 --port $PORT
  3. Add Environment Variables:
    • DATABASE_URL: Your Neon PostgreSQL connection string
    • SECRET_KEY: A secure random 32-character string
    • CORS_ORIGINS: https://<your-vercel-frontend-domain>.vercel.app,http://localhost:5173

3. Frontend (Vercel SPA)

  1. Import the repository into Vercel.
  2. Configure project:
    • Root Directory: frontend
    • Framework Preset: Vite
    • Build Command: npm run build
    • Output Directory: dist
  3. Add Environment Variable:
    • VITE_API_URL: https://<your-render-backend-service>.onrender.com

Notifications & Integrations Status

  • In-App Incident Alerts & History: Fully Operational. Outages, 4xx/5xx status codes, and latency breaches trigger active Alert records and update UI indicators. When an endpoint returns to healthy status, alerts are resolved automatically.
  • External Webhooks (Email, Slack, Discord, Telegram): Preview Mode. The database schema and settings UI support these configurations; outbound webhook workers can be plugged in as a post-MVP enhancement.

Known Limitations & Roadmap

  • Single Monitoring Region: Uptime pings originate from the host server region. Future iterations will support distributed worker edge nodes.
  • In-Process Poller: Scaled horizontally, checks are managed by the container instance daemon. A distributed job queue (e.g. Redis/Celery or RQ) can be attached for high-scale multi-worker scheduling.

License

MIT

About

A distributed API monitoring platform with scheduling, background workers, Redis caching, JWT auth, alerting, and deployment.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages