Docs
govbase.dev production deployment
govbase.dev production deployment
Intended production architecture for GovBase / GovAI on govbase.dev. Topology JSON: ../../hosted-saas/govbase-production-topology.json.
Architecture overview#
Surfaces#
| Surface | URL | Notes |
|---|---|---|
| Marketing and dashboard | https://govbase.dev | Next.js dashboard/ |
| Documentation | https://govbase.dev/docs | Canonical docs/*.md |
| Help center | https://govbase.dev/help | Operator guides |
| Hosted audit API | https://audit.govbase.dev | Evidence ingest and summaries |
| Tenant console | https://govbase.dev/tenant-console | Snapshot-driven UI |
| Onboarding | https://govbase.dev/onboarding | Live checklist backed by tenant_onboarding_progress |
Environment variables#
Dashboard (Vercel)#
| Variable | Purpose |
|---|---|
NEXT_PUBLIC_SITE_URL | https://govbase.dev |
NEXT_PUBLIC_GOVAI_API_BASE_URL | https://audit.govbase.dev |
AIGOV_AUDIT_URL | Server-side audit fetches |
SUPABASE_URL | Session auth |
SUPABASE_SERVICE_ROLE_KEY | Server auth (secret) |
Audit API#
| Variable | Purpose |
|---|---|
DATABASE_URL | Postgres connection |
GOVAI_BASE_URL | Canonical public URL in /status |
GOVAI_STRIPE_SECRET_KEY | Optional billing |
GOVAI_STRIPE_WEBHOOK_SECRET | Optional webhooks |
See also ../hosted-backend-deployment.md and ../env-resolution.md.
Production secrets#
Store in the operator secret manager; rotate at least every 90 days. Never commit .env with production values.
Database#
Managed Postgres with TLS, RLS per tenant, and automated backups (see backup-and-disaster-recovery.md).
Monitoring#
- Liveness:
GET https://audit.govbase.dev/health - Readiness:
GET https://audit.govbase.dev/ready - Metrics:
GET https://audit.govbase.dev/metrics
Backups#
Follow backup-and-disaster-recovery.md. Verify restore in staging each quarter.
Signup-to-ready flow#
- User signs in on
govbase.dev(Supabase). - Dashboard calls
POST /api/tenantsonaudit.govbase.devwith the access token. - Audit API provisions tenant, team, ledger binding, billing row, onboarding steps, and optional API key.
- User completes
/onboarding; progress is stored intenant_onboarding_progress. - Integrations use the issued API key against
/evidenceand/compliance-summary(hash-resolved tenant scope).
Legacy pilots may still set GOVAI_API_KEYS / GOVAI_API_KEYS_JSON; provisioned keys in tenant_api_keys work without adding plaintext to env.
Deployment checklist#
-
NEXT_PUBLIC_SITE_URLandGOVAI_BASE_URLmatch public DNS - Migrations applied through
0022_tenant_registry.sql(sqlx migrate orGOVAI_AUTO_MIGRATE) -
/readygreen on audit origin - Stripe webhooks registered when billing enabled
- WAF / rate limits configured at edge
-
make hosted-saas-readiness-checkpasses in CI - On-call rotation and status page configured