A lightweight, robust URL uptime monitoring system built with Go and PostgreSQL. This service tracks user-submitted URLs, performs periodic health checks, and persists monitoring results for analysis.
This is a monorepo:
apps/api Go + PostgreSQL backend (see apps/api/README below via CLAUDE.md)
apps/web Next.js frontend
packages/api-client Shared TS client for the Go API, used by apps/web (and, later, a React Native app)
The JS/TS side is managed with Bun + Turborepo:
bun install # from repo root, installs all workspaces
bunx turbo run dev # run dev serversThe Go API is its own module rooted at apps/api — run Go commands from inside that directory.
The system is currently designed as a synchronous, interval-based monitoring engine. It runs a background scheduling loop that ensures every URL is checked according to its defined interval.

- API Server: Handles user registration, login, and URL management via
net/httpandchi/mux. - Database: Uses
PostgreSQLfor persistence andsqlcfor type-safe database interactions. - Checker Service: A background scheduler that fetches due tasks and synchronously validates URL health (status codes, latency).
- Linear Processing: Currently utilizes a single-goroutine scheduler for simplicity and reliability.
- Resilient Scheduling: Implements an
UpdateURLNextCheckmechanism to ensure no duplicate checks occur and tasks are reliably rescheduled after each execution. - Robust Error Handling: Handles network issues (e.g., DNS failures, connection timeouts) and database hiccups gracefully, ensuring the scheduler survives temporary infrastructure outages.
As the project scales, the following optimizations are planned:
Transition from a linear scheduler to a Concurrent Worker Pool. This will decouple task dispatching from task execution, allowing thousands of URLs to be monitored in parallel without blocking the main scheduler.
To handle 1,000+ simultaneous checks, we will implement:
- Batch Inserts: Replace individual
INSERTqueries for check results with bulk inserts to reduce database round-trips. - Producer-Consumer-Writer Pattern: Separate HTTP checkers (async) from database writers (batch) to minimize database connection pressure.
- Alerting System: Send notifications (e.g., Slack, Email, Webhooks) when a URL transition state changes from
UPtoDOWN. - Advanced Checks: Add support for regex response body matching, custom HTTP headers, and SSL certificate expiration monitoring.
- Language: Go
- Database: PostgreSQL
- Database Tools:
sqlc,goose(migrations) - Networking: Standard
net/http