Skip to content

Architecture

Kova runs as a single Bun process serving both the Hono REST API (/api/*) and the prebuilt Vite + React SPA:

  • Database: Local SQLite (bun:sqlite) in WAL mode (synchronous=NORMAL, foreign_keys=ON, busy_timeout=5000) with automatic startup migrations and SQLite FTS5 trigram search triggers, plus optional remote libSQL/Turso support.
  • Healthcheck: GET /api/health returns { status, version, db, uptimeSec } for Docker HEALTHCHECK and orchestrator probes.
  • Graceful Shutdown: On SIGTERM/SIGINT, Kova drains in-flight requests, destroys cached S3Client sockets, checkpoints WAL (PRAGMA wal_checkpoint(TRUNCATE)), and closes SQLite cleanly.