Skip to content

Architecture

GOVERN is built on Cloudflare Workers + Durable Objects (edge), Supabase (Postgres + pgvector), and Upstash Redis (cache). The stack is 100% serverless with no persistent servers to manage.

System layers

┌─────────────────────────────────────────────────┐
│ Client Layer │
│ Dashboard | App | Admin | Customer | │
│ SDK (TS/Python/Go) | CLI | Probe │
└───────────────────┬─────────────────────────────┘
│ HTTPS / WebSocket
┌───────────────────▼─────────────────────────────┐
│ API Gateway (CF Worker) │
│ Hono router | Auth middleware | Rate limit │
│ Assessment engine | Policy evaluator │
│ SSE streaming | WebSocket hub (DO) │
└──────┬──────────────────────────┬───────────────┘
│ Supabase client │ Redis client
┌──────▼──────┐ ┌────────▼────────────────┐
│ Supabase │ │ Upstash Redis │
│ Postgres │ │ Session cache │
│ pgvector │ │ Rate limiting │
│ Auth │ │ Real-time pub/sub │
└─────────────┘ └─────────────────────────┘

Key Cloudflare primitives

PrimitiveGOVERN usage
WorkerAPI gateway — all HTTP and WebSocket traffic
Durable Object (Coordinator)WebSocket hub, real-time broadcast
Durable Object (AutonomyKernel)60s governance heartbeat
Durable Object (AgentDO)Per-monitoring-agent state and task execution
R2Artifact storage (exports, reports, model snapshots)
PagesDashboard, App, Admin, Customer, and all docs sites

Monorepo structure

Chairman-Infrastructure/
├── packages/
│ ├── api-gateway/ ← CF Worker — THE backend
│ ├── govern-dashboard/ ← Practitioner UI
│ ├── govern-app/ ← End-user portal
│ ├── govern-admin/ ← Operator console
│ ├── govern-customer/ ← Customer self-service
│ ├── govern-docs/ ← User documentation (Astro/Starlight)
│ ├── govern-developer-docs/← Developer docs (Astro/Starlight)
│ ├── govern-admin-docs/ ← Admin docs (Astro/Starlight)
│ ├── govern-internal-docs/ ← Engineering docs (Astro/Starlight)
│ ├── core/ ← Shared types and constants
│ └── db/ ← Supabase migrations