# techmc-wiki/gtmc architecture

> Architecture diagram of the GitHub repository techmc-wiki/gtmc, 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/techmc-wiki/gtmc
- Repository: https://github.com/techmc-wiki/gtmc

## Overview

Graduate Texts in Minecraft is a multilingual community-written technical Minecraft textbook and contribution website. Readers browse and search articles, explore a glossary, and access PDF editions; article pages render Markdown-based content. Contributors sign in, edit article or glossary drafts, upload assets, and submit changes for review through GitHub. The README identifies the articles as a separate repository pulled into the site. The graph preserves these documented capabilities; several subsystem links are based on the README and file layout because their implementation was not sampled.

Main entry points: [`app/[locale]/(public)/articles/[[...slug]]/page.tsx`](https://github.com/techmc-wiki/gtmc/blob/dev/app/%5Blocale%5D/(public)/articles/%5B%5B...slug%5D%5D/page.tsx) (Article reader), [`app/api/articles/search/route.ts`](https://github.com/techmc-wiki/gtmc/blob/dev/app/api/articles/search/route.ts) (Search API), [`components/editor/draft-editor.tsx`](https://github.com/techmc-wiki/gtmc/blob/dev/components/editor/draft-editor.tsx) (Draft editor), [`app/api/upload/draft/route.ts`](https://github.com/techmc-wiki/gtmc/blob/dev/app/api/upload/draft/route.ts) (Draft asset upload)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_reading["Reading experience"]
  node_article_pages["Article reader<br/>[page.tsx]"]
  node_homepage["Homepage"]
  node_glossary_pages["Glossary browser<br/>[page.tsx]"]
  node_search_ui["Search interface<br/>[search-command.tsx]"]
  node_pdf_page["PDF access<br/>[page.tsx]"]
end

subgraph group_content["Content services"]
  node_article_content["Article content<br/>[content.ts]"]
  node_markdown["Markdown renderer"]
  node_article_api["Article APIs<br/>[route.ts]"]
  node_search_api["Search API<br/>[route.ts]"]
  node_search_index["Search index<br/>[search-index.ts]"]
  node_glossary_api["Glossary API<br/>[route.ts]"]
  node_glossary_manifest["Glossary manifest<br/>[manifest.ts]"]
  node_pdf_proxy["PDF proxy<br/>[route.ts]"]
end

subgraph group_contribution["Contribution workflow"]
  node_login["Sign-in<br/>[page.tsx]"]
  node_draft_editor["Draft editor<br/>[draft-editor.tsx]"]
  node_article_actions["Article actions<br/>[article-draft.ts]"]
  node_article_submit["Article submission<br/>[article-submit.ts]"]
  node_glossary_actions["Glossary actions<br/>[glossary-draft.ts]"]
  node_glossary_submit["Glossary submission<br/>[glossary-submit.ts]"]
  node_article_upload["Article asset upload<br/>[route.ts]"]
  node_draft_upload["Draft asset upload<br/>[route.ts]"]
  node_draft_storage["Draft asset storage<br/>[storage.ts]"]
end

subgraph group_platform["External services"]
  node_github{{"GitHub"}}
  node_articles_repo[("Articles repository")]
  node_auth_service{{"GitHub sign-in"}}
  node_database[("Application database<br/>[prisma.ts]")]
  node_supabase[("Supabase storage")]
  node_pdf_store[("PDF hosting")]
end

node_reader(("Reader"))
node_contributor(("Contributor"))

node_reader -->|"opens"| node_homepage
node_reader -->|"reads"| node_article_pages
node_reader -->|"queries"| node_search_ui
node_reader -->|"browses"| node_glossary_pages
node_reader -->|"downloads"| node_pdf_page
node_homepage -->|"links to"| node_article_pages
node_article_pages -->|"loads content"| node_article_content
node_article_content -->|"reads articles"| node_articles_repo
node_article_pages -->|"renders with"| node_markdown
node_article_api -->|"serves content"| node_article_content
node_search_ui -->|"queries"| node_search_api
node_search_api -->|"searches"| node_search_index
node_search_api -->|"searches glossary"| node_glossary_manifest
node_glossary_pages -->|"loads entries"| node_glossary_api
node_glossary_api -->|"loads entries"| node_glossary_manifest
node_pdf_page -->|"requests PDF"| node_pdf_proxy
node_pdf_proxy -->|"fetches PDF"| node_pdf_store
node_contributor -->|"signs in"| node_login
node_login -->|"authenticates"| node_auth_service
node_contributor -->|"edits drafts"| node_draft_editor
node_draft_editor -->|"saves article"| node_article_actions
node_draft_editor -->|"saves glossary"| node_glossary_actions
node_article_actions -->|"stores draft"| node_database
node_glossary_actions -->|"stores draft"| node_database
node_contributor -->|"submits article"| node_article_submit
node_contributor -->|"submits glossary"| node_glossary_submit
node_article_submit -->|"opens pull request"| node_github
node_glossary_submit -->|"opens pull request"| node_github
node_github -->|"reviews changes"| node_articles_repo
node_contributor -->|"uploads asset"| node_article_upload
node_article_upload -->|"stores asset"| node_github
node_contributor -->|"uploads image"| node_draft_upload
node_draft_upload -->|"records asset"| node_database
node_draft_upload -->|"stores image"| node_draft_storage
node_draft_storage -->|"uploads and retrieves"| node_supabase

click node_article_pages "https://github.com/techmc-wiki/gtmc/blob/dev/app/%5Blocale%5D/(public)/articles/%5B%5B...slug%5D%5D/page.tsx"
click node_homepage "https://github.com/techmc-wiki/gtmc/blob/dev/app/%5Blocale%5D/_homepage/homepage-client.tsx"
click node_glossary_pages "https://github.com/techmc-wiki/gtmc/blob/dev/app/%5Blocale%5D/(public)/glossary/page.tsx"
click node_search_ui "https://github.com/techmc-wiki/gtmc/blob/dev/components/search/search-command.tsx"
click node_pdf_page "https://github.com/techmc-wiki/gtmc/blob/dev/app/%5Blocale%5D/(public)/pdf/page.tsx"
click node_article_content "https://github.com/techmc-wiki/gtmc/blob/dev/lib/articles/content.ts"
click node_markdown "https://github.com/techmc-wiki/gtmc/blob/dev/lib/markdown/markdown-renderer.tsx"
click node_article_api "https://github.com/techmc-wiki/gtmc/blob/dev/app/api/articles/%5Blocale%5D/%5B...slug%5D/route.ts"
click node_search_api "https://github.com/techmc-wiki/gtmc/blob/dev/app/api/articles/search/route.ts"
click node_search_index "https://github.com/techmc-wiki/gtmc/blob/dev/lib/search/search-index.ts"
click node_glossary_api "https://github.com/techmc-wiki/gtmc/blob/dev/app/api/glossary/route.ts"
click node_glossary_manifest "https://github.com/techmc-wiki/gtmc/blob/dev/lib/glossary/manifest.ts"
click node_pdf_proxy "https://github.com/techmc-wiki/gtmc/blob/dev/app/api/pdf/%5Bfilename%5D/route.ts"
click node_login "https://github.com/techmc-wiki/gtmc/blob/dev/app/%5Blocale%5D/(auth)/login/page.tsx"
click node_draft_editor "https://github.com/techmc-wiki/gtmc/blob/dev/components/editor/draft-editor.tsx"
click node_article_actions "https://github.com/techmc-wiki/gtmc/blob/dev/actions/article-draft.ts"
click node_article_submit "https://github.com/techmc-wiki/gtmc/blob/dev/actions/article-submit.ts"
click node_glossary_actions "https://github.com/techmc-wiki/gtmc/blob/dev/actions/glossary-draft.ts"
click node_glossary_submit "https://github.com/techmc-wiki/gtmc/blob/dev/actions/glossary-submit.ts"
click node_article_upload "https://github.com/techmc-wiki/gtmc/blob/dev/app/api/upload/article/route.ts"
click node_draft_upload "https://github.com/techmc-wiki/gtmc/blob/dev/app/api/upload/draft/route.ts"
click node_draft_storage "https://github.com/techmc-wiki/gtmc/blob/dev/lib/drafts/storage.ts"
click node_database "https://github.com/techmc-wiki/gtmc/blob/dev/lib/prisma.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_article_pages,node_homepage,node_glossary_pages,node_search_ui,node_pdf_page toneBlue
class node_article_content,node_markdown,node_article_api,node_search_api,node_search_index,node_glossary_api,node_glossary_manifest,node_pdf_proxy toneAmber
class node_login,node_draft_editor,node_article_actions,node_article_submit,node_glossary_actions,node_glossary_submit,node_article_upload,node_draft_upload,node_draft_storage toneMint
class node_github,node_articles_repo,node_auth_service,node_database,node_supabase,node_pdf_store toneRose
class node_reader,node_contributor toneIndigo
```

## Components

### Reading experience

- [Article reader](https://github.com/techmc-wiki/gtmc/blob/dev/app/%5Blocale%5D/(public)/articles/%5B%5B...slug%5D%5D/page.tsx): `app/[locale]/(public)/articles/[[...slug]]/page.tsx`
- [Homepage](https://github.com/techmc-wiki/gtmc/blob/dev/app/%5Blocale%5D/_homepage/homepage-client.tsx): `app/[locale]/_homepage/homepage-client.tsx`
- [Glossary browser](https://github.com/techmc-wiki/gtmc/blob/dev/app/%5Blocale%5D/(public)/glossary/page.tsx): `app/[locale]/(public)/glossary/page.tsx`
- [Search interface](https://github.com/techmc-wiki/gtmc/blob/dev/components/search/search-command.tsx): `components/search/search-command.tsx`
- [PDF access](https://github.com/techmc-wiki/gtmc/blob/dev/app/%5Blocale%5D/(public)/pdf/page.tsx): `app/[locale]/(public)/pdf/page.tsx`

### Content services

- [Article content](https://github.com/techmc-wiki/gtmc/blob/dev/lib/articles/content.ts): `lib/articles/content.ts`
- [Markdown renderer](https://github.com/techmc-wiki/gtmc/blob/dev/lib/markdown/markdown-renderer.tsx): `lib/markdown/markdown-renderer.tsx`
- [Article APIs](https://github.com/techmc-wiki/gtmc/blob/dev/app/api/articles/%5Blocale%5D/%5B...slug%5D/route.ts): `app/api/articles/[locale]/[...slug]/route.ts`
- [Search API](https://github.com/techmc-wiki/gtmc/blob/dev/app/api/articles/search/route.ts): `app/api/articles/search/route.ts`
- [Search index](https://github.com/techmc-wiki/gtmc/blob/dev/lib/search/search-index.ts): `lib/search/search-index.ts`
- [Glossary API](https://github.com/techmc-wiki/gtmc/blob/dev/app/api/glossary/route.ts): `app/api/glossary/route.ts`
- [Glossary manifest](https://github.com/techmc-wiki/gtmc/blob/dev/lib/glossary/manifest.ts): `lib/glossary/manifest.ts`
- [PDF proxy](https://github.com/techmc-wiki/gtmc/blob/dev/app/api/pdf/%5Bfilename%5D/route.ts): `app/api/pdf/[filename]/route.ts`

### Contribution workflow

- [Sign-in](https://github.com/techmc-wiki/gtmc/blob/dev/app/%5Blocale%5D/(auth)/login/page.tsx): `app/[locale]/(auth)/login/page.tsx`
- [Draft editor](https://github.com/techmc-wiki/gtmc/blob/dev/components/editor/draft-editor.tsx): `components/editor/draft-editor.tsx`
- [Article actions](https://github.com/techmc-wiki/gtmc/blob/dev/actions/article-draft.ts): `actions/article-draft.ts`
- [Article submission](https://github.com/techmc-wiki/gtmc/blob/dev/actions/article-submit.ts): `actions/article-submit.ts`
- [Glossary actions](https://github.com/techmc-wiki/gtmc/blob/dev/actions/glossary-draft.ts): `actions/glossary-draft.ts`
- [Glossary submission](https://github.com/techmc-wiki/gtmc/blob/dev/actions/glossary-submit.ts): `actions/glossary-submit.ts`
- [Article asset upload](https://github.com/techmc-wiki/gtmc/blob/dev/app/api/upload/article/route.ts): `app/api/upload/article/route.ts`
- [Draft asset upload](https://github.com/techmc-wiki/gtmc/blob/dev/app/api/upload/draft/route.ts): `app/api/upload/draft/route.ts`
- [Draft asset storage](https://github.com/techmc-wiki/gtmc/blob/dev/lib/drafts/storage.ts): `lib/drafts/storage.ts`

### External services

- **GitHub**
- **Articles repository**
- **GitHub sign-in**
- [Application database](https://github.com/techmc-wiki/gtmc/blob/dev/lib/prisma.ts): `lib/prisma.ts`
- **Supabase storage**
- **PDF hosting**

### Other components

- **Reader**
- **Contributor**

## Connections

- Reader → Homepage: opens
- Reader → Article reader: reads
- Reader → Search interface: queries
- Reader → Glossary browser: browses
- Reader → PDF access: downloads
- Homepage → Article reader: links to
- Article reader → Article content: loads content
- Article content → Articles repository: reads articles
- Article reader → Markdown renderer: renders with
- Article APIs → Article content: serves content
- Search interface → Search API: queries
- Search API → Search index: searches
- Search API → Glossary manifest: searches glossary
- Glossary browser → Glossary API: loads entries
- Glossary API → Glossary manifest: loads entries
- PDF access → PDF proxy: requests PDF
- PDF proxy → PDF hosting: fetches PDF
- Contributor → Sign-in: signs in
- Sign-in → GitHub sign-in: authenticates
- Contributor → Draft editor: edits drafts
- Draft editor → Article actions: saves article
- Draft editor → Glossary actions: saves glossary
- Article actions → Application database: stores draft
- Glossary actions → Application database: stores draft
- Contributor → Article submission: submits article
- Contributor → Glossary submission: submits glossary
- Article submission → GitHub: opens pull request
- Glossary submission → GitHub: opens pull request
- GitHub → Articles repository: reviews changes
- Contributor → Article asset upload: uploads asset
- Article asset upload → GitHub: stores asset
- Contributor → Draft asset upload: uploads image
- Draft asset upload → Application database: records asset
- Draft asset upload → Draft asset storage: stores image
- Draft asset storage → Supabase storage: uploads and retrieves
