# ubc-igem/wiki-2026 architecture

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

- Interactive diagram: https://gitdiagram.com/ubc-igem/wiki-2026
- Repository: https://github.com/ubc-igem/wiki-2026

## Overview

The repository is a UBC iGEM wiki monorepo. Its clearest workflow is the exporter: read a configured Notion master page, build a content map, export pages and supporting team, citation, and media assets, then write outputs. The tree also contains an Astro web package, but the supplied excerpts do not establish its page-level runtime or how it consumes export results. Edges below are limited to calls or dependencies visible in excerpts or the source index; unsampled implementation details are not inferred.

Main entry points: [`exporter/src/main.ts`](https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/main.ts) (Export entrypoint), [`exporter/src/markdown/blocks.ts`](https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/markdown/blocks.ts) (Block conversion), [`exporter/src/parse.ts`](https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/parse.ts) (Page export), [`exporter/src/markdown/components.ts`](https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/markdown/components.ts) (Custom components)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_export["Wiki export"]
  node_entry["Export entrypoint<br/>[main.ts]"]
  node_config["Export config<br/>[config.ts]"]
  node_mapping["Page mapping<br/>[map.ts]"]
  node_parser["Page export<br/>[parse.ts]"]
  node_team["Team page<br/>[team.ts]"]
  node_outputs["Output utilities<br/>[utils.ts]"]
end

subgraph group_markdown["Content conversion"]
  node_blocks["Block conversion<br/>[blocks.ts]"]
  node_richtext["Rich text<br/>[rich-text.ts]"]
  node_components["Custom components<br/>[components.ts]"]
  node_citations["Citation rendering<br/>[citations.ts]"]
  node_links["Link resolution<br/>[link.ts]"]
  node_mdx["MDX helpers<br/>[mdx.ts]"]
end

subgraph group_integrations["External integrations"]
  node_notion["Notion client<br/>[notion.ts]"]
  node_notion_api(("Notion API"))
  node_media["Media handling<br/>[media.ts]"]
  node_tools["iGEM tools client<br/>[tools-api.ts]"]
  node_zotero["Zotero export<br/>[zotero.ts]"]
end

subgraph group_web["Web utilities"]
  node_webconfig["Astro configuration<br/>[astro.config.ts]"]
  node_webutils["Web utilities"]
  node_literature["Literature utility<br/>[literature.ts]"]
  node_sounds["Sound effects<br/>[sfx.ts]"]
end

node_operator(("Exporter operator"))

node_operator -->|"runs"| node_entry
node_entry -->|"reads"| node_config
node_entry -->|"exports pages"| node_parser
node_entry -->|"exports team"| node_team
node_entry -->|"saves database"| node_zotero
node_entry -->|"adds nav links"| node_mapping
node_entry -->|"writes outputs"| node_outputs
node_parser -->|"reads pages"| node_notion
node_parser -->|"uses routes"| node_mapping
node_parser -->|"converts content"| node_blocks
node_notion -->|"retrieves blocks"| node_notion_api
node_mapping -->|"uses page IDs"| node_notion
node_blocks -->|"dispatches components"| node_components
node_blocks -->|"converts text"| node_richtext
node_blocks -->|"resolves mentions"| node_links
node_blocks -->|"builds MDX"| node_mdx
node_components -->|"uploads media"| node_media
node_components -->|"converts text"| node_richtext
node_components -->|"parses CSV"| node_outputs
node_richtext -->|"resolves links"| node_links
node_richtext -->|"creates citations"| node_citations
node_links -->|"finds literature"| node_zotero
node_citations -->|"creates elements"| node_mdx
node_media -->|"uploads assets"| node_tools
node_tools -->|"uses settings"| node_config
node_team -->|"reads team data"| node_notion
node_team -->|"uses asset client"| node_tools
node_webconfig -->|"references config"| node_config

click node_entry "https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/main.ts"
click node_config "https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/config.ts"
click node_mapping "https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/map.ts"
click node_parser "https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/parse.ts"
click node_team "https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/team.ts"
click node_outputs "https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/utils.ts"
click node_notion "https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/notion.ts"
click node_blocks "https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/markdown/blocks.ts"
click node_richtext "https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/markdown/rich-text.ts"
click node_components "https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/markdown/components.ts"
click node_citations "https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/markdown/citations.ts"
click node_links "https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/markdown/link.ts"
click node_mdx "https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/markdown/mdx.ts"
click node_media "https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/markdown/media.ts"
click node_tools "https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/tools-api.ts"
click node_zotero "https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/zotero.ts"
click node_webconfig "https://github.com/ubc-igem/wiki-2026/blob/main/web/astro.config.ts"
click node_webutils "https://github.com/ubc-igem/wiki-2026/tree/main/web/src/utils"
click node_literature "https://github.com/ubc-igem/wiki-2026/blob/main/web/src/utils/literature.ts"
click node_sounds "https://github.com/ubc-igem/wiki-2026/blob/main/web/src/utils/sfx.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_entry,node_config,node_mapping,node_parser,node_team,node_outputs toneBlue
class node_blocks,node_richtext,node_components,node_citations,node_links,node_mdx toneAmber
class node_notion,node_notion_api,node_media,node_tools,node_zotero toneMint
class node_webconfig,node_webutils,node_literature,node_sounds toneRose
class node_operator toneIndigo
```

## Components

### Wiki export

- [Export entrypoint](https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/main.ts): `exporter/src/main.ts`
- [Export config](https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/config.ts): `exporter/src/config.ts`
- [Page mapping](https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/map.ts): `exporter/src/map.ts`
- [Page export](https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/parse.ts): `exporter/src/parse.ts`
- [Team page](https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/team.ts): `exporter/src/team.ts`
- [Output utilities](https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/utils.ts): `exporter/src/utils.ts`

### Content conversion

- [Block conversion](https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/markdown/blocks.ts): `exporter/src/markdown/blocks.ts`
- [Rich text](https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/markdown/rich-text.ts): `exporter/src/markdown/rich-text.ts`
- [Custom components](https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/markdown/components.ts): `exporter/src/markdown/components.ts`
- [Citation rendering](https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/markdown/citations.ts): `exporter/src/markdown/citations.ts`
- [Link resolution](https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/markdown/link.ts): `exporter/src/markdown/link.ts`
- [MDX helpers](https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/markdown/mdx.ts): `exporter/src/markdown/mdx.ts`

### External integrations

- [Notion client](https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/notion.ts): `exporter/src/notion.ts`
- **Notion API**
- [Media handling](https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/markdown/media.ts): `exporter/src/markdown/media.ts`
- [iGEM tools client](https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/tools-api.ts): `exporter/src/tools-api.ts`
- [Zotero export](https://github.com/ubc-igem/wiki-2026/blob/main/exporter/src/zotero.ts): `exporter/src/zotero.ts`

### Web utilities

- [Astro configuration](https://github.com/ubc-igem/wiki-2026/blob/main/web/astro.config.ts): `web/astro.config.ts`
- [Web utilities](https://github.com/ubc-igem/wiki-2026/tree/main/web/src/utils): `web/src/utils`
- [Literature utility](https://github.com/ubc-igem/wiki-2026/blob/main/web/src/utils/literature.ts): `web/src/utils/literature.ts`
- [Sound effects](https://github.com/ubc-igem/wiki-2026/blob/main/web/src/utils/sfx.ts): `web/src/utils/sfx.ts`

### Other components

- **Exporter operator**

## Connections

- Exporter operator → Export entrypoint: runs (evidence: `exporter/src/main.ts`)
- Export entrypoint → Export config: reads (evidence: `exporter/src/main.ts`)
- Export entrypoint → Page export: exports pages (evidence: `exporter/src/main.ts`)
- Export entrypoint → Team page: exports team (evidence: `exporter/src/main.ts`)
- Export entrypoint → Zotero export: saves database (evidence: `exporter/src/main.ts`)
- Export entrypoint → Page mapping: adds nav links (evidence: `exporter/src/main.ts`)
- Export entrypoint → Output utilities: writes outputs (evidence: `exporter/src/main.ts`)
- Page export → Notion client: reads pages (evidence: `exporter/src/parse.ts`)
- Page export → Page mapping: uses routes (evidence: `exporter/src/parse.ts`)
- Page export → Block conversion: converts content (evidence: `exporter/src/parse.ts`)
- Notion client → Notion API: retrieves blocks (evidence: `exporter/src/notion.ts`)
- Page mapping → Notion client: uses page IDs (evidence: `exporter/src/map.ts`)
- Block conversion → Custom components: dispatches components (evidence: `exporter/src/markdown/blocks.ts`)
- Block conversion → Rich text: converts text (evidence: `exporter/src/markdown/blocks.ts`)
- Block conversion → Link resolution: resolves mentions (evidence: `exporter/src/markdown/blocks.ts`)
- Block conversion → MDX helpers: builds MDX (evidence: `exporter/src/markdown/blocks.ts`)
- Custom components → Media handling: uploads media (evidence: `exporter/src/markdown/components.ts`)
- Custom components → Rich text: converts text (evidence: `exporter/src/markdown/components.ts`)
- Custom components → Output utilities: parses CSV (evidence: `exporter/src/markdown/components.ts`)
- Rich text → Link resolution: resolves links (evidence: `exporter/src/markdown/rich-text.ts`)
- Rich text → Citation rendering: creates citations (evidence: `exporter/src/markdown/rich-text.ts`)
- Link resolution → Zotero export: finds literature (evidence: `exporter/src/markdown/link.ts`)
- Citation rendering → MDX helpers: creates elements (evidence: `exporter/src/markdown/citations.ts`)
- Media handling → iGEM tools client: uploads assets (evidence: `exporter/src/markdown/media.ts`)
- iGEM tools client → Export config: uses settings (evidence: `exporter/src/tools-api.ts`)
- Team page → Notion client: reads team data (evidence: `exporter/src/team.ts`)
- Team page → iGEM tools client: uses asset client (evidence: `exporter/src/team.ts`)
- Astro configuration → Export config: references config (evidence: `web/astro.config.ts`)
