# mosalah992/centralized-dossier architecture

> Architecture diagram of the GitHub repository mosalah992/centralized-dossier, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mosalah992/centralized-dossier
- Repository: https://github.com/mosalah992/centralized-dossier

## Overview

Thalmor Embassy Archives is a public, read-only archive that presents community records as ceremonial volumes. Readers arrive at the shelf, open a volume, and read its rendered contents; spreadsheet-backed volumes are fetched from the read-only Google Sheets source, while kept and sealed volumes follow separate paths. The README documents the calendar, sealed Chronicles, search, and guided reading; their detailed implementation was not sampled, so those branches are shown at subsystem level. Edges reflect sampled references or explicit README statements; unsampled route wiring is omitted where uncertain.

Main entry points: [`web/src/views/Honors.tsx`](https://github.com/mosalah992/centralized-dossier/blob/main/web/src/views/Honors.tsx) (Calendar experience), [`web/src/App.tsx`](https://github.com/mosalah992/centralized-dossier/blob/main/web/src/App.tsx) (Archive app), [`functions/api/volumes`](https://github.com/mosalah992/centralized-dossier/tree/main/functions/api/volumes) (Volume endpoints), [`server/gsheets.ts`](https://github.com/mosalah992/centralized-dossier/blob/main/server/gsheets.ts) (Read-only Sheets client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Archive experience"]
  node_app["Archive app<br/>[App.tsx]"]
  node_shelf["Volume shelf<br/>[Shelf.tsx]"]
  node_volumes_ui["Volume views"]
  node_calendar["Calendar experience<br/>[Honors.tsx]"]
  node_chronicles["Chronicles book<br/>[Informants.tsx]"]
  node_reading["Scrying and reading aids<br/>[reading.tsx]"]
  node_page["Parchment page<br/>[Page.tsx]"]
  node_motion["Motion system<br/>[motion.ts]"]
  node_web_api["Volume data client<br/>[api.ts]"]
end

subgraph group_api["Data routes"]
  node_volume_route["Volume endpoints"]
  node_chronicle_gate["Chronicle gate"]
  node_sealed_endpoints["Sealed volume endpoints"]
  node_register_route["Register endpoint"]
  node_reports_route["Reports endpoint"]
  node_gate_session["Signed gate session<br/>[session.ts]"]
end

subgraph group_shared["Shared domain logic"]
  node_registry["Volume registry<br/>[volumes.ts]"]
  node_parsers["Register parsers"]
  node_calendar_parser["Calendar parser<br/>[calendar.ts]"]
  node_reckoning["Tamrielic reckoning<br/>[reckoning.ts]"]
  node_filings["Chronicle filings<br/>[filings.ts]"]
  node_history["Kept history volume<br/>[volumes.ts]"]
end

subgraph group_source["Record source"]
  node_sheet_reader["Read-only Sheets client<br/>[gsheets.ts]"]
  node_archive["Archive data assembly<br/>[archive.ts]"]
  node_reporter["Reports generation<br/>[index.ts]"]
end

node_reader(("Reader"))
node_spreadsheet[("Community spreadsheet")]

node_reader -->|"opens"| node_app
node_app -->|"shows shelf"| node_shelf
node_app -->|"routes to"| node_volumes_ui
node_shelf -->|"lists volumes"| node_registry
node_volumes_ui -->|"renders pages"| node_page
node_calendar -->|"loads volume"| node_web_api
node_calendar -->|"reads realm time"| node_reckoning
node_calendar -->|"renders calendar data"| node_calendar_parser
node_chronicles -->|"loads chronicle"| node_web_api
node_chronicles -->|"offers reading aids"| node_reading
node_page -->|"uses motion"| node_motion
node_web_api -.->|"requests data"| node_volume_route
node_volume_route -->|"resolves volumes"| node_registry
node_volume_route -->|"reads sheet"| node_sheet_reader
node_sheet_reader -->|"reads records"| node_spreadsheet
node_sheet_reader -->|"provides sheet data"| node_archive
node_archive -->|"parses records"| node_parsers
node_parsers -->|"includes calendar"| node_calendar_parser
node_registry -->|"defines kept volume"| node_history
node_chronicle_gate -->|"checks writ"| node_gate_session
node_chronicle_gate -->|"serves filings"| node_filings
node_sealed_endpoints -.->|"checks access"| node_gate_session
node_reports_route -->|"checks report scope"| node_gate_session
node_reports_route -.->|"obtains reports"| node_reporter
node_register_route -.->|"serves register"| node_archive

click node_app "https://github.com/mosalah992/centralized-dossier/blob/main/web/src/App.tsx"
click node_shelf "https://github.com/mosalah992/centralized-dossier/blob/main/web/src/components/Shelf.tsx"
click node_volumes_ui "https://github.com/mosalah992/centralized-dossier/tree/main/web/src/views"
click node_calendar "https://github.com/mosalah992/centralized-dossier/blob/main/web/src/views/Honors.tsx"
click node_chronicles "https://github.com/mosalah992/centralized-dossier/blob/main/web/src/views/Informants.tsx"
click node_reading "https://github.com/mosalah992/centralized-dossier/blob/main/web/src/reading.tsx"
click node_page "https://github.com/mosalah992/centralized-dossier/blob/main/web/src/components/Page.tsx"
click node_motion "https://github.com/mosalah992/centralized-dossier/blob/main/web/src/motion.ts"
click node_web_api "https://github.com/mosalah992/centralized-dossier/blob/main/web/src/api.ts"
click node_volume_route "https://github.com/mosalah992/centralized-dossier/tree/main/functions/api/volumes"
click node_chronicle_gate "https://github.com/mosalah992/centralized-dossier/tree/main/functions/api/chronicle"
click node_sealed_endpoints "https://github.com/mosalah992/centralized-dossier/tree/main/functions/api/enforcement"
click node_register_route "https://github.com/mosalah992/centralized-dossier/tree/main/functions/api/register"
click node_reports_route "https://github.com/mosalah992/centralized-dossier/tree/main/functions/api/reports"
click node_sheet_reader "https://github.com/mosalah992/centralized-dossier/blob/main/server/gsheets.ts"
click node_archive "https://github.com/mosalah992/centralized-dossier/blob/main/server/archive.ts"
click node_registry "https://github.com/mosalah992/centralized-dossier/blob/main/shared/volumes.ts"
click node_parsers "https://github.com/mosalah992/centralized-dossier/tree/main/shared/parsers"
click node_calendar_parser "https://github.com/mosalah992/centralized-dossier/blob/main/shared/parsers/calendar.ts"
click node_reckoning "https://github.com/mosalah992/centralized-dossier/blob/main/shared/reckoning.ts"
click node_filings "https://github.com/mosalah992/centralized-dossier/blob/main/shared/filings.ts"
click node_history "https://github.com/mosalah992/centralized-dossier/blob/main/shared/volumes.ts"
click node_gate_session "https://github.com/mosalah992/centralized-dossier/blob/main/functions/lib/session.ts"
click node_reporter "https://github.com/mosalah992/centralized-dossier/blob/main/reporter/src/index.ts"

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_app,node_shelf,node_volumes_ui,node_calendar,node_chronicles,node_reading,node_page,node_motion,node_web_api toneBlue
class node_volume_route,node_chronicle_gate,node_sealed_endpoints,node_register_route,node_reports_route,node_gate_session,node_spreadsheet toneAmber
class node_registry,node_parsers,node_calendar_parser,node_reckoning,node_filings,node_history toneMint
class node_sheet_reader,node_archive,node_reporter toneRose
class node_reader toneIndigo
```

## Components

### Archive experience

- [Archive app](https://github.com/mosalah992/centralized-dossier/blob/main/web/src/App.tsx): `web/src/App.tsx`
- [Volume shelf](https://github.com/mosalah992/centralized-dossier/blob/main/web/src/components/Shelf.tsx): `web/src/components/Shelf.tsx`
- [Volume views](https://github.com/mosalah992/centralized-dossier/tree/main/web/src/views): `web/src/views`
- [Calendar experience](https://github.com/mosalah992/centralized-dossier/blob/main/web/src/views/Honors.tsx): `web/src/views/Honors.tsx`
- [Chronicles book](https://github.com/mosalah992/centralized-dossier/blob/main/web/src/views/Informants.tsx): `web/src/views/Informants.tsx`
- [Scrying and reading aids](https://github.com/mosalah992/centralized-dossier/blob/main/web/src/reading.tsx): `web/src/reading.tsx`
- [Parchment page](https://github.com/mosalah992/centralized-dossier/blob/main/web/src/components/Page.tsx): `web/src/components/Page.tsx`
- [Motion system](https://github.com/mosalah992/centralized-dossier/blob/main/web/src/motion.ts): `web/src/motion.ts`
- [Volume data client](https://github.com/mosalah992/centralized-dossier/blob/main/web/src/api.ts): `web/src/api.ts`

### Data routes

- [Volume endpoints](https://github.com/mosalah992/centralized-dossier/tree/main/functions/api/volumes): `functions/api/volumes`
- [Chronicle gate](https://github.com/mosalah992/centralized-dossier/tree/main/functions/api/chronicle): `functions/api/chronicle`
- [Sealed volume endpoints](https://github.com/mosalah992/centralized-dossier/tree/main/functions/api/enforcement): `functions/api/enforcement`
- [Register endpoint](https://github.com/mosalah992/centralized-dossier/tree/main/functions/api/register): `functions/api/register`
- [Reports endpoint](https://github.com/mosalah992/centralized-dossier/tree/main/functions/api/reports): `functions/api/reports`
- [Signed gate session](https://github.com/mosalah992/centralized-dossier/blob/main/functions/lib/session.ts): `functions/lib/session.ts`

### Shared domain logic

- [Volume registry](https://github.com/mosalah992/centralized-dossier/blob/main/shared/volumes.ts): `shared/volumes.ts`
- [Register parsers](https://github.com/mosalah992/centralized-dossier/tree/main/shared/parsers): `shared/parsers`
- [Calendar parser](https://github.com/mosalah992/centralized-dossier/blob/main/shared/parsers/calendar.ts): `shared/parsers/calendar.ts`
- [Tamrielic reckoning](https://github.com/mosalah992/centralized-dossier/blob/main/shared/reckoning.ts): `shared/reckoning.ts`
- [Chronicle filings](https://github.com/mosalah992/centralized-dossier/blob/main/shared/filings.ts): `shared/filings.ts`
- [Kept history volume](https://github.com/mosalah992/centralized-dossier/blob/main/shared/volumes.ts): `shared/volumes.ts`

### Record source

- [Read-only Sheets client](https://github.com/mosalah992/centralized-dossier/blob/main/server/gsheets.ts): `server/gsheets.ts`
- [Archive data assembly](https://github.com/mosalah992/centralized-dossier/blob/main/server/archive.ts): `server/archive.ts`
- [Reports generation](https://github.com/mosalah992/centralized-dossier/blob/main/reporter/src/index.ts): `reporter/src/index.ts`

### Other components

- **Reader**
- **Community spreadsheet**

## Connections

- Reader → Archive app: opens (evidence: `README.md`)
- Archive app → Volume shelf: shows shelf (evidence: `web/src/App.tsx`)
- Archive app → Volume views: routes to (evidence: `web/src/App.tsx`)
- Volume shelf → Volume registry: lists volumes (evidence: `README.md`)
- Volume views → Parchment page: renders pages (evidence: `README.md`)
- Calendar experience → Volume data client: loads volume (evidence: `web/src/views/Honors.tsx`)
- Calendar experience → Tamrielic reckoning: reads realm time (evidence: `web/src/views/Honors.tsx`)
- Calendar experience → Calendar parser: renders calendar data (evidence: `web/src/views/Honors.tsx`)
- Chronicles book → Volume data client: loads chronicle (evidence: `web/src/views/Informants.tsx`)
- Chronicles book → Scrying and reading aids: offers reading aids (evidence: `README.md`)
- Parchment page → Motion system: uses motion (evidence: `web/src/components/Page.tsx`)
- Volume data client → Volume endpoints: requests data
- Volume endpoints → Volume registry: resolves volumes (evidence: `functions/api/volumes/index.ts`)
- Volume endpoints → Read-only Sheets client: reads sheet (evidence: `functions/api/volumes/index.ts`)
- Read-only Sheets client → Community spreadsheet: reads records (evidence: `README.md`)
- Read-only Sheets client → Archive data assembly: provides sheet data (evidence: `server/archive.ts`)
- Archive data assembly → Register parsers: parses records (evidence: `server/archive.ts`)
- Register parsers → Calendar parser: includes calendar (evidence: `shared/index.ts`)
- Volume registry → Kept history volume: defines kept volume (evidence: `shared/volumes.ts`)
- Chronicle gate → Signed gate session: checks writ (evidence: `functions/api/chronicle/index.ts`)
- Chronicle gate → Chronicle filings: serves filings (evidence: `functions/api/chronicle/index.ts`)
- Sealed volume endpoints → Signed gate session: checks access
- Reports endpoint → Signed gate session: checks report scope (evidence: `functions/api/reports/index.ts`)
- Reports endpoint → Reports generation: obtains reports
- Register endpoint → Archive data assembly: serves register
