Technical design and infrastructure overview
Receipts and decisions cannot be modified after creation
Organization-level isolation with RLS policies
Complete audit trail through chained receipts
Schema-less evidence payloads for adaptability
Complete lineage from data to deployment
Training data ingestion with hash
Model training evidence and metrics
Policy evaluation (accuracy, bias checks)
Production deployment approval
Runtime prediction tracking
Sealed evidence with signatures
PostgreSQL RLS enforces multi-tenant isolation at the database level. Users can only access data from their organization.
CREATE POLICY org_isolation ON receipts
USING (organization_id = current_organization_id())API routes use service role key to bypass RLS for server-side operations. Clients use anon key with RLS enforcement.
HITL approval tokens are SHA-256 hashed before storage. Only hash is stored, plain token sent via email link.
All evidence payloads are SHA-256 hashed for tamper detection. Hash chains link receipts to parent evidence.
Next.js 14 API Routes with service client
All API routes follow RESTful conventions under /api/v1/*
API routes use createServiceClient() with service role key to bypass RLS and perform server-side validation.