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

# System overview

> The parts of the platform, where each one runs, and how a request moves through them.

This section is for developers. The rest of the handbook covers using the admin.

## The parts

```mermaid theme={null}
flowchart LR
  browser[Visitor's browser] --> vercel[Web app<br/>Next.js on Vercel]
  vercel -- "tRPC over HTTPS,<br/>cookies forwarded" --> cf[CloudFront]
  cf --> alb[Load balancer]
  alb --> api[API<br/>Bun on ECS Fargate]
  api --> rds[(Postgres<br/>RDS)]
  api --> s3[(S3<br/>reports, uploads)]
  api --> ses[SES email]
  api --> stripe[Stripe]
  browser -- "signed download link" --> dl[CloudFront<br/>downloads.oncoeverything.com]
  dl --> s3
```

| Part | Runs on | Code |
| - | - | - |
| Web app: public site, admin, buyer account | Vercel | `apps/web` |
| API: all data, sign-in, email, files, payments | AWS ECS Fargate, one task | `apps/api` |
| Database | AWS RDS Postgres 17 | `packages/db` |
| Report files and uploads | AWS S3, two private buckets | `apps/api/src/storage.ts` |
| Report downloads | AWS CloudFront signed URLs | `infra/delivery.tf` |
| Email | AWS SES | `apps/api/src/mailer.ts` |
| Card payments | Stripe hosted checkout | `apps/api/src/stripe.ts` |
| Infrastructure | Terraform | `infra/` |
| This handbook | Mintlify | `handbook/` |

Everything runs in OncoEverything's own AWS, Vercel, Stripe and GitHub accounts.

## The API boundary

The web app never touches the database. Every read and write goes over HTTP to the API. The two apps share only the TypeScript type of the API's router.

This keeps the database credentials and the data rules in one service. See [Web app and API](https://docs.oncoeverything.com/architecture/web-and-api.md).

## The repository

```
apps/web                Next.js 16 app (App Router, React 19, Tailwind v4)
apps/api                Bun service: tRPC, Better Auth, deliveries, Stripe
apps/video              Remotion: the platform tour video and its poster
packages/db             Drizzle schema and migrations
packages/ui             Design system: tokens, primitives, components
packages/directories    Cleans the directory spreadsheets into JSON
packages/eslint-config  Shared lint rules
packages/typescript-config
infra                   Terraform for AWS and Vercel
handbook                This site
docs                    Content model, restore drill log, account inventory
```

It is a Bun workspace with Turborepo. See [Local development](https://docs.oncoeverything.com/operations/local-development.md) to run it.

## What happens when someone sends a form

**1. The browser posts to the web app**

A server action in `apps/web` validates the form.

**2. The web app calls the API**

It calls a tRPC procedure over HTTPS and forwards the visitor's cookies.

**3. The API writes the request**

It writes one row to `requests` and one row to `request_events` in one transaction. Every form uses the same table.

**4. The API sends the notification**

SES emails [hello@oncoeverything.com](mailto:hello@oncoeverything.com) with the reference and a link to the request.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.