Skip to main content

System Map

A bird’s-eye view of how Terra’s components connect.
This page provides visual maps of Terra’s architecture. Use it as a reference when navigating the codebase or debugging data flow issues.

High-Level Architecture

Terra follows a layered architecture with clear boundaries between concerns:

Request Flow

Every request follows a consistent path through the system:

Key Decision Points


Form Submission Flow

When an applicant submits a form, here’s what happens:

Timing

The applicant sees “Thank you” in ~300ms. Everything else happens in the background.

Authentication Flow

How users authenticate and how sessions are managed:

Session Management


Data Model Overview

The core database entities and their relationships: For complete schema documentation, see Database Schema.

File Upload Flow

How files move from the applicant’s browser to secure storage:

Storage Paths

Files are stored with unpredictable paths to prevent enumeration:

Async Queue Architecture

The persistent queue that powers background processing:

Operation Types


Directory Structure

Where to find things in the codebase:

Next Steps

Design Philosophy

Why we made these architectural choices

Database Schema

Complete table documentation