PROJECT SOVEREIGN // DAY 04 - GOVERNANCE LAYER

Audit Trail + Tamper Proof Log

Every BLOCK is saved. This is what an RBI auditor downloads. Hash chains like blockchain.

Storage: localStorage now, Postgres in prod. See schema below.
Run a check to generate audit entry
0 events stored
AuditIdDataRegionStatusRegHash
PROD SCHEMA - Day 04 to Day 10 migration (Postgres)
-- This localStorage will become this table in prod
CREATE TABLE audit_trail (
  audit_id TEXT PRIMARY KEY,
  timestamp TIMESTAMPTZ,
  data_type TEXT, -- aadhaar, pan, payment
  storage_provider TEXT, -- AWS S3
  region TEXT, -- us-east-1
  reg_id TEXT, -- RBI-2018, DPDP-16
  risk_id TEXT, -- RISK-02
  status TEXT, -- BLOCKED / ALLOWED
  control TEXT,
  prev_hash TEXT,
  hash TEXT -- SHA256(prev_hash + this_row) = tamper proof
);
-- For E2B sandboxing (Day 5), PII never leaves VM, only hash leaves
Day 03Day 02 Corpus
Next: Day 05 - E2B Sandboxing