Security Architecture
AUDT is built as a multi-tenant SaaS platform with defense-in-depth — every layer is independently secured so a failure at one layer does not compromise the platform.
Multi-Tenant Isolation
Every table in the AUDT database has Row-Level Security (RLS) enforced at the PostgreSQL layer. Tenant boundaries are enforced by the database engine, not application code, so there is no code path that can return data across organization boundaries.
India Data Residency
All customer data is stored and processed within India. AUDT was architected for India-first data residency to support DPDP Act 2023 compliance requirements out of the box.
Layered Architecture
AUDT uses a strict layered monolith where each layer has a single responsibility and zero upward dependencies. Business logic never lives in transport layers.
Next.js App Router pages, server actions, REST handlers
requireUser() for pages — validateApiKey() for API v1
lib/services/* — zero next/* imports, framework-agnostic TypeScript
lib/repositories/* — Drizzle ORM, optional transaction executor
lib/providers/* — only place SDK imports are allowed
Zero-Trust Authentication
Authentication is layered — Supabase Auth manages identity, AUDT adds session records, device trust, and enterprise enforcement on top.
Session Management
Every authenticated request is validated against an AUDT session record, not just the Supabase JWT. This enables fine-grained session control independent of the auth provider.
API Security
The AUDT REST API uses Bearer token authentication with bcrypt-hashed keys, scoped permissions, and in-process rate limiting.