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

# Production Review

> A guided review for senior engineering sign-off on Terra's production readiness

# Production Review

> This section is a self-guided review for a senior engineer evaluating whether Terra is ready for real user data in production.

<Note>
  All current users and data are test/internal. This review is the gate before
  handling real PII and public traffic.
</Note>

## How to Use This Guide

Each page explains a system area with real code, points you to tests you can run, and suggests things to try to break. You don't need to read every line — the guide tells you where to focus.

```bash theme={null}
# Run the current Terra unit/integration suite
pnpm --dir apps/terra test

# Enforced no-skip policy for Playwright specs
node apps/terra/scripts/check-terra-skipped-tests.mjs

# Launch-critical smoke (public status page)
pnpm --dir apps/terra exec playwright test tests/status-lookup.spec.ts --project=chromium --grep "Smoke Tests"

# Type check
pnpm --dir apps/terra tsc --noEmit
```

Current snapshot from a local verification run:

* Vitest: `634 passed`, `0 skipped`.
* Playwright inventory: `93` executions across 3 browsers (`31` test specs), with no static `test.skip/describe.skip` in `tests/`.

## Architecture at a Glance

```mermaid theme={null}
flowchart TB
    subgraph Public
        Form["/f/slug — Public Form"]
        Status["/status — Status Lookup"]
    end

    subgraph Dashboard["Dashboard (Auth Required)"]
        Admin["/applications, /settings"]
        Forms["/forms — Form Management"]
        Subs["/submissions — Review Data"]
    end

    subgraph Auth
        MW["Middleware — Session + RBAC"]
        Guards["Auth Guards — Server Actions"]
    end

    subgraph Data
        Encrypt["Encryption — PII at Rest"]
        Audit["Audit Log — SOC 2 Trail"]
        DB["Supabase — PostgreSQL"]
    end

    subgraph Async
        Queue["Async Queue — Retries + Backoff"]
        WH["Webhooks"]
        AT["Airtable Sync"]
        Notif["Email / SMS"]
    end

    Form -->|submit| Guards
    Dashboard --> MW --> Guards
    Guards --> DB
    Guards --> Encrypt --> DB
    Guards --> Audit --> DB
    Guards --> Queue
    Queue --> WH & AT & Notif
```

## Review Categories

<CardGroup cols={2}>
  <Card title="Security" icon="shield" href="/review/security">
    Auth, RBAC, input validation, rate limiting
  </Card>

  <Card title="Data Protection" icon="lock" href="/review/data-protection">
    PII encryption, data isolation, audit logging
  </Card>

  <Card title="Functional Logic" icon="gears" href="/review/functional-logic">
    Submission flow, notifications, integrations
  </Card>

  <Card title="Test Coverage" icon="vial" href="/review/test-coverage">
    Every test case and how to run it
  </Card>

  <Card title="Known Gaps" icon="triangle-exclamation" href="/review/known-gaps">
    What's missing and the remediation plan
  </Card>

  <Card title="PR Review Guide" icon="code-pull-request" href="/review/pr-review-guide">
    How to review ongoing PRs efficiently
  </Card>
</CardGroup>
