# dpan538/graphic_design_archive architecture

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

- Interactive diagram: https://gitdiagram.com/dpan538/graphic_design_archive
- Repository: https://github.com/dpan538/graphic_design_archive

## Overview

MGDA is a rights-aware research archive: its main reader workflow is browsing the Index or searching, opening an eligible object record, and consulting its source and provenance information. Public reads use versioned projections rather than a live database connection; PostgreSQL and migration tooling support research and release preparation. TRACE adds Context Canvas, bounded Exploration, and a separately labelled Open Inquiry layer; Spacetime is documented but unreleased. The README establishes these capabilities, while sampled controllers show request dispatch for read APIs and Exploration. Wiring not evidenced by the supplied excerpts is omitted.

Main entry points: [`frontend/src/features/trace-v49/context/realdata/project.server.ts`](https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/features/trace-v49/context/realdata/project.server.ts) (Generated projections), [`frontend/src/lib/read-platform/server/read-api-controller.ts`](https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/lib/read-platform/server/read-api-controller.ts) (Public read API), [`frontend/src/app/directory/page.tsx`](https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/app/directory/page.tsx) (Index), [`frontend/src/app/search/page.tsx`](https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/app/search/page.tsx) (Search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public Archive"]
  node_index["Index<br/>[page.tsx]"]
  node_search["Search<br/>[page.tsx]"]
  node_object["Object records<br/>[page.tsx]"]
  node_eligibility["Reader eligibility<br/>[index.server.ts]"]
end

subgraph group_api["Read API"]
  node_readapi["Public read API"]
  node_indexroute["Index endpoint<br/>[route.ts]"]
  node_searchroute["Search endpoints<br/>[route.ts]"]
end

subgraph group_trace["TRACE Research"]
  node_tracecanvas["Context Canvas<br/>[index.ts]"]
  node_exploration["Exploration V2"]
  node_explorationview["Exploration views"]
  node_explorationv3["Exploration V3"]
  node_inquiry["Open Inquiry"]
  node_spacetime["Spacetime<br/>[index.ts]"]
end

subgraph group_data["Research Data"]
  node_readermodel["Generated projections<br/>[project.server.ts]"]
  node_database[("Research database<br/>[verify.py]")]
end

node_reader(("Archive reader"))
node_researcher(("Researcher"))

node_reader -->|"browses"| node_index
node_reader -->|"searches"| node_search
node_reader -->|"opens"| node_object
node_researcher -->|"researches with"| node_tracecanvas
node_researcher -->|"explores"| node_exploration
node_researcher -->|"reviews hypotheses"| node_inquiry
node_index -->|"requests catalogue"| node_indexroute
node_search -->|"requests results"| node_searchroute
node_indexroute -->|"dispatches reads"| node_readapi
node_searchroute -->|"dispatches reads"| node_readapi
node_object -->|"reads public data"| node_readapi
node_readapi -->|"reads projections"| node_readermodel
node_index -->|"filters readers"| node_eligibility
node_search -->|"filters readers"| node_eligibility
node_exploration -->|"loads read model"| node_readermodel
node_explorationview -->|"loads read model"| node_readermodel
node_explorationv3 -->|"loads read model"| node_readermodel
node_database -.->|"prepares release data"| node_readermodel

click node_index "https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/app/directory/page.tsx"
click node_search "https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/app/search/page.tsx"
click node_object "https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/app/surfaces/%5Bid%5D/page.tsx"
click node_eligibility "https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/features/reader-eligibility/index.server.ts"
click node_readapi "https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/lib/read-platform/server/read-api-controller.ts"
click node_indexroute "https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/app/api/index/v1/route.ts"
click node_searchroute "https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/app/api/search/v1/route.ts"
click node_tracecanvas "https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/features/trace-v49/context/canvas/index.ts"
click node_exploration "https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/features/trace-v49/exploration-v2/controller.server.ts"
click node_explorationview "https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/features/trace-v49/exploration-view/controller.server.ts"
click node_explorationv3 "https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/features/trace-v49/exploration-v3/controller.server.ts"
click node_inquiry "https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/features/trace-v49/open-inquiry-v1/controller.server.ts"
click node_spacetime "https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/features/trace-v49/spacetime/gis/index.ts"
click node_readermodel "https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/features/trace-v49/context/realdata/project.server.ts"
click node_database "https://github.com/dpan538/graphic_design_archive/blob/main/database/data-migrations/v48-to-v49/verify.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_index,node_search,node_object,node_eligibility toneBlue
class node_readapi,node_indexroute,node_searchroute toneAmber
class node_tracecanvas,node_exploration,node_explorationview,node_explorationv3,node_inquiry,node_spacetime toneMint
class node_readermodel,node_database toneRose
class node_reader,node_researcher toneIndigo
```

## Components

### Public Archive

- [Index](https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/app/directory/page.tsx): `frontend/src/app/directory/page.tsx`
- [Search](https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/app/search/page.tsx): `frontend/src/app/search/page.tsx`
- [Object records](https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/app/surfaces/%5Bid%5D/page.tsx): `frontend/src/app/surfaces/[id]/page.tsx`
- [Reader eligibility](https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/features/reader-eligibility/index.server.ts): `frontend/src/features/reader-eligibility/index.server.ts`

### Read API

- [Public read API](https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/lib/read-platform/server/read-api-controller.ts): `frontend/src/lib/read-platform/server/read-api-controller.ts`
- [Index endpoint](https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/app/api/index/v1/route.ts): `frontend/src/app/api/index/v1/route.ts`
- [Search endpoints](https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/app/api/search/v1/route.ts): `frontend/src/app/api/search/v1/route.ts`

### TRACE Research

- [Context Canvas](https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/features/trace-v49/context/canvas/index.ts): `frontend/src/features/trace-v49/context/canvas/index.ts`
- [Exploration V2](https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/features/trace-v49/exploration-v2/controller.server.ts): `frontend/src/features/trace-v49/exploration-v2/controller.server.ts`
- [Exploration views](https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/features/trace-v49/exploration-view/controller.server.ts): `frontend/src/features/trace-v49/exploration-view/controller.server.ts`
- [Exploration V3](https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/features/trace-v49/exploration-v3/controller.server.ts): `frontend/src/features/trace-v49/exploration-v3/controller.server.ts`
- [Open Inquiry](https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/features/trace-v49/open-inquiry-v1/controller.server.ts): `frontend/src/features/trace-v49/open-inquiry-v1/controller.server.ts`
- [Spacetime](https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/features/trace-v49/spacetime/gis/index.ts): `frontend/src/features/trace-v49/spacetime/gis/index.ts`

### Research Data

- [Generated projections](https://github.com/dpan538/graphic_design_archive/blob/main/frontend/src/features/trace-v49/context/realdata/project.server.ts): `frontend/src/features/trace-v49/context/realdata/project.server.ts`
- [Research database](https://github.com/dpan538/graphic_design_archive/blob/main/database/data-migrations/v48-to-v49/verify.py): `database/data-migrations/v48-to-v49/verify.py`

### Other components

- **Archive reader**
- **Researcher**

## Connections

- Archive reader → Index: browses
- Archive reader → Search: searches
- Archive reader → Object records: opens
- Researcher → Context Canvas: researches with
- Researcher → Exploration V2: explores
- Researcher → Open Inquiry: reviews hypotheses
- Index → Index endpoint: requests catalogue
- Search → Search endpoints: requests results
- Index endpoint → Public read API: dispatches reads
- Search endpoints → Public read API: dispatches reads
- Object records → Public read API: reads public data
- Public read API → Generated projections: reads projections
- Index → Reader eligibility: filters readers
- Search → Reader eligibility: filters readers
- Exploration V2 → Generated projections: loads read model
- Exploration views → Generated projections: loads read model
- Exploration V3 → Generated projections: loads read model
- Research database → Generated projections: prepares release data
