# anonymus-coder2403/carryover architecture

> Architecture diagram of the GitHub repository anonymus-coder2403/carryover, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/anonymus-coder2403/carryover
- Repository: https://github.com/anonymus-coder2403/carryover

## Overview

Carryover turns an AI transcript into a reusable context capsule, then renders it as a target-specific resume prompt and can score fidelity against the original. Users can chain capsules across sessions, search saved capsules, or use the same save/load capabilities through MCP. The web app handles account access and OAuth consent; the FastAPI service exposes the product workflows, with Supabase-backed persistence and authentication and Gemini model calls. Capsule and MCP implementation details were not sampled, so their internal wiring is shown only where README claims support it.

Main entry points: [`apps/api/app/routes.py`](https://github.com/anonymus-coder2403/carryover/blob/main/apps/api/app/routes.py) (HTTP workflows), [`apps/api/app/capsules.py`](https://github.com/anonymus-coder2403/carryover/blob/main/apps/api/app/capsules.py) (Capsule workflows), [`apps/api/app/db.py`](https://github.com/anonymus-coder2403/carryover/blob/main/apps/api/app/db.py) (Database access), [`apps/web/lib/supabase/server.ts`](https://github.com/anonymus-coder2403/carryover/blob/main/apps/web/lib/supabase/server.ts) (Supabase web client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_webapp["Carryover web app<br/>[page.tsx]"]
  node_signup["Sign up<br/>[signup-form.tsx]"]
  node_login["Log in<br/>[login-form.tsx]"]
  node_account["Account config<br/>[page.tsx]"]
  node_consent["OAuth consent<br/>[page.tsx]"]
end

subgraph group_api["Capsule service"]
  node_apiapp["FastAPI app<br/>[main.py]"]
  node_routes["HTTP workflows<br/>[routes.py]"]
  node_capsules["Capsule workflows<br/>[capsules.py]"]
  node_gemini["Gemini model<br/>[gemini.py]"]
  node_config["Service config<br/>[config.py]"]
end

subgraph group_identity["Identity and access"]
  node_websupabase["Supabase web client<br/>[server.ts]"]
  node_auth["Token verification<br/>[auth.py]"]
  node_supabaseauth["Supabase Auth"]
end

subgraph group_state["Persistence and models"]
  node_dbsession["Database access<br/>[db.py]"]
  node_capsulemodel["Capsule records<br/>[models.py]"]
  node_database[("Postgres")]
end

subgraph group_assistant["Assistant integration"]
  node_mcp["MCP tools<br/>[mcp.py]"]
end

node_person(("User"))
node_assistantclient(("MCP client"))

node_person -->|"uses"| node_webapp
node_person -->|"signs up"| node_signup
node_person -->|"logs in"| node_login
node_person -->|"gets config"| node_account
node_person -->|"approves access"| node_consent
node_signup -->|"creates account"| node_websupabase
node_login -->|"authenticates"| node_websupabase
node_account -->|"reads session"| node_websupabase
node_consent -->|"checks session"| node_websupabase
node_websupabase -->|"authenticates"| node_supabaseauth
node_consent -->|"gets authorization"| node_supabaseauth
node_webapp -->|"submits transcript"| node_routes
node_apiapp -->|"dispatches HTTP"| node_routes
node_apiapp -->|"dispatches MCP"| node_mcp
node_apiapp -->|"initializes store"| node_dbsession
node_routes -->|"compresses, loads, renders"| node_capsules
node_routes -->|"searches"| node_capsules
node_routes -->|"checks fidelity"| node_gemini
node_capsules -->|"compresses transcript"| node_gemini
node_capsules -->|"reads and writes capsules"| node_dbsession
node_routes -->|"reads parent link"| node_dbsession
node_dbsession -->|"maps records"| node_capsulemodel
node_dbsession -->|"reads and writes"| node_database
node_assistantclient -->|"calls tools"| node_mcp
node_mcp -->|"checks bearer token"| node_auth
node_auth -->|"verifies signing keys"| node_supabaseauth
node_mcp -->|"saves and loads"| node_capsules
node_config -.->|"configures auth"| node_supabaseauth

click node_webapp "https://github.com/anonymus-coder2403/carryover/blob/main/apps/web/app/page.tsx"
click node_signup "https://github.com/anonymus-coder2403/carryover/blob/main/apps/web/app/signup/signup-form.tsx"
click node_login "https://github.com/anonymus-coder2403/carryover/blob/main/apps/web/app/login/login-form.tsx"
click node_account "https://github.com/anonymus-coder2403/carryover/blob/main/apps/web/app/account/page.tsx"
click node_consent "https://github.com/anonymus-coder2403/carryover/blob/main/apps/web/app/oauth/consent/page.tsx"
click node_websupabase "https://github.com/anonymus-coder2403/carryover/blob/main/apps/web/lib/supabase/server.ts"
click node_apiapp "https://github.com/anonymus-coder2403/carryover/blob/main/apps/api/app/main.py"
click node_routes "https://github.com/anonymus-coder2403/carryover/blob/main/apps/api/app/routes.py"
click node_capsules "https://github.com/anonymus-coder2403/carryover/blob/main/apps/api/app/capsules.py"
click node_gemini "https://github.com/anonymus-coder2403/carryover/blob/main/apps/api/app/gemini.py"
click node_mcp "https://github.com/anonymus-coder2403/carryover/blob/main/apps/api/app/mcp.py"
click node_auth "https://github.com/anonymus-coder2403/carryover/blob/main/apps/api/app/auth.py"
click node_config "https://github.com/anonymus-coder2403/carryover/blob/main/apps/api/app/config.py"
click node_dbsession "https://github.com/anonymus-coder2403/carryover/blob/main/apps/api/app/db.py"
click node_capsulemodel "https://github.com/anonymus-coder2403/carryover/blob/main/apps/api/app/models.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_webapp,node_signup,node_login,node_account,node_consent,node_person,node_assistantclient toneBlue
class node_apiapp,node_routes,node_capsules,node_gemini,node_config toneAmber
class node_websupabase,node_auth,node_supabaseauth toneMint
class node_dbsession,node_capsulemodel,node_database toneRose
class node_mcp toneIndigo
```

## Components

### Web experience

- [Carryover web app](https://github.com/anonymus-coder2403/carryover/blob/main/apps/web/app/page.tsx): `apps/web/app/page.tsx`
- [Sign up](https://github.com/anonymus-coder2403/carryover/blob/main/apps/web/app/signup/signup-form.tsx): `apps/web/app/signup/signup-form.tsx`
- [Log in](https://github.com/anonymus-coder2403/carryover/blob/main/apps/web/app/login/login-form.tsx): `apps/web/app/login/login-form.tsx`
- [Account config](https://github.com/anonymus-coder2403/carryover/blob/main/apps/web/app/account/page.tsx): `apps/web/app/account/page.tsx`
- [OAuth consent](https://github.com/anonymus-coder2403/carryover/blob/main/apps/web/app/oauth/consent/page.tsx): `apps/web/app/oauth/consent/page.tsx`

### Capsule service

- [FastAPI app](https://github.com/anonymus-coder2403/carryover/blob/main/apps/api/app/main.py): `apps/api/app/main.py`
- [HTTP workflows](https://github.com/anonymus-coder2403/carryover/blob/main/apps/api/app/routes.py): `apps/api/app/routes.py`
- [Capsule workflows](https://github.com/anonymus-coder2403/carryover/blob/main/apps/api/app/capsules.py): `apps/api/app/capsules.py`
- [Gemini model](https://github.com/anonymus-coder2403/carryover/blob/main/apps/api/app/gemini.py): `apps/api/app/gemini.py`
- [Service config](https://github.com/anonymus-coder2403/carryover/blob/main/apps/api/app/config.py): `apps/api/app/config.py`

### Identity and access

- [Supabase web client](https://github.com/anonymus-coder2403/carryover/blob/main/apps/web/lib/supabase/server.ts): `apps/web/lib/supabase/server.ts`
- [Token verification](https://github.com/anonymus-coder2403/carryover/blob/main/apps/api/app/auth.py): `apps/api/app/auth.py`
- **Supabase Auth**

### Persistence and models

- [Database access](https://github.com/anonymus-coder2403/carryover/blob/main/apps/api/app/db.py): `apps/api/app/db.py`
- [Capsule records](https://github.com/anonymus-coder2403/carryover/blob/main/apps/api/app/models.py): `apps/api/app/models.py`
- **Postgres**

### Assistant integration

- [MCP tools](https://github.com/anonymus-coder2403/carryover/blob/main/apps/api/app/mcp.py): `apps/api/app/mcp.py`

### Other components

- **User**
- **MCP client**

## Connections

- User → Carryover web app: uses
- User → Sign up: signs up
- User → Log in: logs in
- User → Account config: gets config
- User → OAuth consent: approves access
- Sign up → Supabase web client: creates account
- Log in → Supabase web client: authenticates
- Account config → Supabase web client: reads session
- OAuth consent → Supabase web client: checks session
- Supabase web client → Supabase Auth: authenticates
- OAuth consent → Supabase Auth: gets authorization
- Carryover web app → HTTP workflows: submits transcript
- FastAPI app → HTTP workflows: dispatches HTTP
- FastAPI app → MCP tools: dispatches MCP
- FastAPI app → Database access: initializes store
- HTTP workflows → Capsule workflows: compresses, loads, renders
- HTTP workflows → Capsule workflows: searches
- HTTP workflows → Gemini model: checks fidelity
- Capsule workflows → Gemini model: compresses transcript
- Capsule workflows → Database access: reads and writes capsules
- HTTP workflows → Database access: reads parent link
- Database access → Capsule records: maps records
- Database access → Postgres: reads and writes
- MCP client → MCP tools: calls tools
- MCP tools → Token verification: checks bearer token
- Token verification → Supabase Auth: verifies signing keys
- MCP tools → Capsule workflows: saves and loads
- Service config → Supabase Auth: configures auth
