A terminal-based downtime monitoring system with real-time updates.
- @downtime/server - tRPC server with PostgreSQL/TimescaleDB storage
- @downtime/tui-client - Ink-based TUI client with real-time subscriptions
- @downtime/shared - Shared types and Zod schemas
# Install dependencies
bun install
# Start PostgreSQL + TimescaleDB
docker compose up -d
# Create .env file for server
cp packages/server/.env.example packages/server/.env
# Edit packages/server/.env and set your API_KEY
# Run database migrations
bun run db:push
# Set up TimescaleDB hypertable
bun run --cwd packages/server db:setup-timescale
# Start the server (in one terminal)
bun run --cwd packages/server dev
# Create .env file for client
cp packages/tui-client/.env.example packages/tui-client/.env
# Edit packages/tui-client/.env with matching API_KEY
# Start the TUI client (in another terminal)
bun run --cwd packages/tui-client devj/kor↑/↓- Navigate targetsa- Add new targete- Edit selected targetd- Delete selected targetr- Force refreshq- Quit
- HTTP/HTTPS endpoint monitoring
- TCP port monitoring (coming soon)
- ICMP ping monitoring (coming soon)
- Configurable check intervals
- Failure threshold before marking down
- Real-time status updates via WebSocket
- 24h/7d/30d uptime statistics
- Webhook notifications on status changes
- TimescaleDB for efficient time-series storage
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/downtime
API_KEY=your-secret-api-key
PORT=3000
WS_PORT=3001
SERVER_URL=http://localhost:3000
WS_URL=ws://localhost:3001
API_KEY=your-secret-api-key
# Type check all packages
bun run typecheck
# Lint and format
bun run lint
bun run format
# Run both server and client in dev mode
bun run devThe server uses PostgreSQL with TimescaleDB extension for efficient time-series storage.
# Generate migration from schema changes
bun run db:generate
# Apply migrations
bun run db:migrate
# Push schema directly (development)
bun run db:push
# Open Drizzle Studio
bun run --cwd packages/server db:studio