Skip to main content

Operations overview

This page gives operators a map of the Better Comply deployment stack before they dive into individual configuration guides.

Who this is for

Operators - IT engineers, system administrators, or DevOps engineers who deploy and maintain Better Comply.

Deployment shape

Better Comply is composed of three independently deployable layers:

LayerTechnologyHosted on
Web applicationReact SPA, built with ViteNetlify (static CDN)
Backend APIFastify on Node 20Google Cloud Run
Data, auth, and storagePostgres + pgvector + GoTrue + Object StorageSupabase
Screenshot pendingarchitecture diagram showing three layers and their connections

Web (Netlify)

The frontend is a static Vite build deployed to Netlify. Netlify serves the assets from its CDN, applies security headers (CSP, HSTS, Permissions-Policy), and rewrites all paths to /index.html for client-side routing.

The build requires one environment variable: VITE_BACKEND_URL pointing at the Cloud Run service URL.

See Architecture for the full security-header inventory.

Backend (Cloud Run)

All server-side logic runs as a single Fastify service on Google Cloud Run. This includes AI content generation, certificate issuance, document processing, lifecycle audit trail writes, and the scheduled cron endpoints.

The backend talks to Supabase using either the service-role key (for admin operations) or the caller's forwarded JWT (for RLS-scoped operations).

Data (Supabase)

Supabase provides:

  • Postgres + pgvector - primary datastore and vector search for RAG retrieval.
  • GoTrue - authentication and session management (email/password and emailless employee PIN).
  • Object Storage - completion certificates, controlled document binaries and Markdown blobs, quiz image assets.
  • Row Level Security (RLS) - every data access from the browser is scoped to the authenticated user's role.

What the browser calls directly

The browser talks to Supabase directly for read queries and calls the Cloud Run backend (POST /v1/<route>) for every state-changing or AI-bearing operation. Supabase Edge Functions were retired in May 2026 - all HTTP routes now live in the Cloud Run backend.

Next steps

PageWhat it covers
ArchitectureComponent data flow, security headers, where audit evidence lives
Environment variablesAll env vars grouped by concern
Scheduled jobsCron endpoints, cadences, and secret gating
Email deliveryResend vs console provider, from address
Document processingRAG indexing modes and stuck-job recovery
Demo and seedingNon-production demo data (double-gated)
Backups and releasesRelease SOP, rollback, migration notes