> ## Documentation Index
> Fetch the complete documentation index at: https://docs.divorce.law/llms.txt
> Use this file to discover all available pages before exploring further.

# Multi-Tenancy Architecture

> How Victoria AI OS ensures complete firm isolation

## 3-Layer Isolation

Victoria AI OS implements defense-in-depth with three layers of tenant isolation:

### Layer 1: Subdomain

Each firm gets a unique subdomain (e.g., `smith-law.divorce.law`) that serves as the first layer of isolation.

### Layer 2: Database RLS

PostgreSQL Row Level Security (RLS) with 100+ enforcement rules ensures no firm can access another's data at the database level.

### Layer 3: Application

API and Edge Function-level access checks provide an additional layer of security.

<Tip>
  This architecture means even in the unlikely event of an application bug, database RLS prevents cross-firm data access.
</Tip>
