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/healthreturns{ status, version, db, uptimeSec }for DockerHEALTHCHECKand orchestrator probes. - Graceful Shutdown: On
SIGTERM/SIGINT, Kova drains in-flight requests, destroys cachedS3Clientsockets, checkpoints WAL (PRAGMA wal_checkpoint(TRUNCATE)), and closes SQLite cleanly.