Skip to main content

Architecture

Pongo consists of three main components that work together:
┌─────────────────┐     ┌──────────────┐     ┌─────────────────┐
│   Next.js App   │────>│   Database   │<────│  Scheduler(s)   │
│  (Dashboard UI) │     │ (SQLite/PG)  │     │ (Monitor Runner) │
└─────────────────┘     └──────────────┘     └─────────────────┘

Components

  • Next.js App: Web dashboard for viewing monitors, managing alerts, and accessing status pages
  • Database: Shared data store (SQLite or PostgreSQL) for all configuration and check results
  • Scheduler: Standalone service that executes monitors on schedule, evaluates alerts, and dispatches webhooks
All services share one database. No message queues or service mesh required.

Deployment Scenarios

ScenarioDashboardSchedulerBest for
VercelVercelVercel CronServerless, auto-scaling
Fly.ioFly.ioFly.ioPersistent VMs, multi-region
HybridVercelVPS/DockerGlobal CDN + flexible scheduling
Self-hostedDockerDockerFull control

Choosing a Deployment Option

Vercel

Best for:
  • Teams already using Vercel
  • Serverless infrastructure preference
  • Automatic scaling requirements
  • Fast global CDN delivery
Considerations:
  • Vercel Cron runs every 30 seconds minimum
  • Requires PostgreSQL (not SQLite)
  • Cold starts may affect monitor timing
Deploy to Vercel →

Fly.io

Best for:
  • Always-on persistent VMs
  • Multi-region deployments
  • Fine-grained control over scheduling
  • SQLite or PostgreSQL support
Considerations:
  • Requires Fly.io account
  • Manual scaling configuration
  • Pay for always-running machines
Deploy to Fly.io →

Docker

Best for:
  • Containerized environments
  • Local development and testing
  • Docker Compose orchestration
  • Consistent deployment across platforms
Considerations:
  • Requires Docker knowledge
  • Manual container orchestration
  • Volume management for persistence
Deploy with Docker →

Self-Hosted

Best for:
  • Complete infrastructure control
  • On-premises requirements
  • Custom VPS configurations
  • Integration with existing infrastructure
Considerations:
  • Manual server setup and maintenance
  • Requires reverse proxy configuration
  • Process management setup needed
Self-Host Pongo →

Multi-Region Deployments

Deploy schedulers in different regions pointing at the same database:
PONGO_REGION=us-east bun scheduler   # Region 1
PONGO_REGION=eu-west bun scheduler   # Region 2
Configure regionThreshold on alerts to control when they fire across regions:
alerts: [
  {
    id: "api-down",
    name: "API Down",
    condition: { consecutiveFailures: 3 },
    regionThreshold: "majority", // "any" | "all" | "majority" | number
  },
]

Database Options

Pongo auto-detects the database from DATABASE_URL:
BackendDATABASE_URLNotes
SQLitefile:./pongo/pongo.db (default)WAL mode, zero config
PostgreSQLpostgres://user:pass@host:5432/pongoProduction recommended
Migrations run automatically on build.

Build docs developers (and LLMs) love