# woduq1414/ko-microgpt architecture

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

- Interactive diagram: https://gitdiagram.com/woduq1414/ko-microgpt
- Repository: https://github.com/woduq1414/ko-microgpt

## Overview

ko-microgpt combines a Korean/English name-generation model with a scroll-based React lesson that explains the model’s data, tokenization, embedding, attention, loss, training, and inference stages. The frontend is the main user-facing workflow; the Python model is a separate training and inference runtime. The graph preserves the documented lesson capabilities, but does not infer connections to snapshot files or unsampled chapter components beyond the relationships shown in the source index and excerpts.

Main entry points: [`app/src/App.jsx`](https://github.com/woduq1414/ko-microgpt/blob/main/app/src/App.jsx) (Lesson app), [`app/src/components/chapters/shared/chapterUtils.js`](https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/chapters/shared/chapterUtils.js) (Token and math utilities), [`app/src/components/chapters/ChapterFiveTrainingDemo.jsx`](https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/chapters/ChapterFiveTrainingDemo.jsx) (Loss and gradients), [`app/src/components/chapters/ChapterSixTrainingDemo.jsx`](https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/chapters/ChapterSixTrainingDemo.jsx) (Training updates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Lesson application"]
  node_app["Lesson app<br/>[App.jsx]"]
  node_hero["Language and intro<br/>[HeroSection.jsx]"]
  node_lesson_sections["Chapter sections"]
  node_lesson_content["Lesson descriptions<br/>[lessonSections.js]"]
  node_localization["Localization<br/>[localization.js]"]
end

subgraph group_lessons["Model lessons"]
  node_chapter1["Name data"]
  node_chapter2_jamo["Jamo cloud"]
  node_chapter2_tokens["Tokenization"]
  node_chapter3["Embeddings"]
  node_chapter4["Attention"]
  node_chapter5["Loss and gradients"]
  node_chapter6["Training updates"]
  node_chapter7["Inference demo"]
  node_chapter8["Model comparison"]
end

subgraph group_runtime["Model runtime"]
  node_model_train["Training pipeline<br/>[ko_main.py]"]
  node_model_infer["Inference entrypoint<br/>[ko_inference.py]"]
  node_dataset["Name datasets"]
  node_checkpoints[("Trained checkpoints")]
end

subgraph group_shared["Lesson support"]
  node_utils["Token and math utilities<br/>[chapterUtils.js]"]
  node_constants["Lesson constants"]
  node_state_card["Unavailable state"]
end

node_learner(("Learner"))

node_learner -->|"uses"| node_app
node_app -->|"renders"| node_hero
node_app -->|"renders"| node_lesson_sections
node_app -->|"renders"| node_chapter1
node_app -->|"renders"| node_chapter2_jamo
node_app -->|"renders"| node_chapter2_tokens
node_app -->|"renders"| node_chapter3
node_app -->|"renders"| node_chapter4
node_app -->|"renders"| node_chapter5
node_app -->|"renders"| node_chapter6
node_app -->|"renders"| node_chapter7
node_app -->|"renders"| node_chapter8
node_app -->|"reads language settings"| node_localization
node_chapter2_tokens -->|"uses token helpers"| node_utils
node_chapter3 -->|"uses math and token helpers"| node_utils
node_chapter4 -->|"uses attention helpers"| node_utils
node_chapter5 -->|"uses shared helpers"| node_utils
node_chapter6 -->|"uses shared helpers"| node_utils
node_chapter7 -->|"uses inference helpers"| node_utils
node_utils -->|"imports constants"| node_constants
node_chapter5 -->|"uses fallback"| node_state_card
node_chapter6 -->|"uses fallback"| node_state_card
node_chapter7 -->|"uses fallback"| node_state_card
node_model_train -->|"loads training names"| node_dataset
node_model_train -->|"saves model"| node_checkpoints
node_model_infer -->|"calls inference"| node_model_train
node_model_infer -->|"uses checkpoint"| node_checkpoints

click node_app "https://github.com/woduq1414/ko-microgpt/blob/main/app/src/App.jsx"
click node_hero "https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/sections/HeroSection.jsx"
click node_lesson_sections "https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/sections/ChapterSectionShell.jsx"
click node_chapter1 "https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/chapters/ChapterOneDataCloud.jsx"
click node_chapter2_jamo "https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/chapters/ChapterTwoJamoCloud.jsx"
click node_chapter2_tokens "https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/chapters/ChapterTwoTokenizationDemo.jsx"
click node_chapter3 "https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/chapters/ChapterThreeEmbeddingDemo.jsx"
click node_chapter4 "https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/chapters/ChapterFourAttentionDemo.jsx"
click node_chapter5 "https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/chapters/ChapterFiveTrainingDemo.jsx"
click node_chapter6 "https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/chapters/ChapterSixTrainingDemo.jsx"
click node_chapter7 "https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/chapters/ChapterSevenInferenceDemo.jsx"
click node_chapter8 "https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/sections/ChapterEightSection.jsx"
click node_lesson_content "https://github.com/woduq1414/ko-microgpt/blob/main/app/src/constants/lessonSections.js"
click node_localization "https://github.com/woduq1414/ko-microgpt/blob/main/app/src/constants/localization.js"
click node_utils "https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/chapters/shared/chapterUtils.js"
click node_constants "https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/chapters/shared/chapterConstants.js"
click node_state_card "https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/common/SectionStateCard.jsx"
click node_model_train "https://github.com/woduq1414/ko-microgpt/blob/main/model/ko_main.py"
click node_model_infer "https://github.com/woduq1414/ko-microgpt/blob/main/model/ko_inference.py"
click node_dataset "https://github.com/woduq1414/ko-microgpt/tree/main/model/data"
click node_checkpoints "https://github.com/woduq1414/ko-microgpt/tree/main/model/checkpoints"

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_hero,node_lesson_sections,node_lesson_content,node_localization toneBlue
class node_chapter1,node_chapter2_jamo,node_chapter2_tokens,node_chapter3,node_chapter4,node_chapter5,node_chapter6,node_chapter7,node_chapter8 toneAmber
class node_model_train,node_model_infer,node_dataset,node_checkpoints toneMint
class node_utils,node_constants,node_state_card toneRose
class node_learner toneIndigo
```

## Components

### Lesson application

- [Lesson app](https://github.com/woduq1414/ko-microgpt/blob/main/app/src/App.jsx): `app/src/App.jsx`
- [Language and intro](https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/sections/HeroSection.jsx): `app/src/components/sections/HeroSection.jsx`
- [Chapter sections](https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/sections/ChapterSectionShell.jsx): `app/src/components/sections/ChapterSectionShell.jsx`
- [Lesson descriptions](https://github.com/woduq1414/ko-microgpt/blob/main/app/src/constants/lessonSections.js): `app/src/constants/lessonSections.js`
- [Localization](https://github.com/woduq1414/ko-microgpt/blob/main/app/src/constants/localization.js): `app/src/constants/localization.js`

### Model lessons

- [Name data](https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/chapters/ChapterOneDataCloud.jsx): `app/src/components/chapters/ChapterOneDataCloud.jsx`
- [Jamo cloud](https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/chapters/ChapterTwoJamoCloud.jsx): `app/src/components/chapters/ChapterTwoJamoCloud.jsx`
- [Tokenization](https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/chapters/ChapterTwoTokenizationDemo.jsx): `app/src/components/chapters/ChapterTwoTokenizationDemo.jsx`
- [Embeddings](https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/chapters/ChapterThreeEmbeddingDemo.jsx): `app/src/components/chapters/ChapterThreeEmbeddingDemo.jsx`
- [Attention](https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/chapters/ChapterFourAttentionDemo.jsx): `app/src/components/chapters/ChapterFourAttentionDemo.jsx`
- [Loss and gradients](https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/chapters/ChapterFiveTrainingDemo.jsx): `app/src/components/chapters/ChapterFiveTrainingDemo.jsx`
- [Training updates](https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/chapters/ChapterSixTrainingDemo.jsx): `app/src/components/chapters/ChapterSixTrainingDemo.jsx`
- [Inference demo](https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/chapters/ChapterSevenInferenceDemo.jsx): `app/src/components/chapters/ChapterSevenInferenceDemo.jsx`
- [Model comparison](https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/sections/ChapterEightSection.jsx): `app/src/components/sections/ChapterEightSection.jsx`

### Model runtime

- [Training pipeline](https://github.com/woduq1414/ko-microgpt/blob/main/model/ko_main.py): `model/ko_main.py`
- [Inference entrypoint](https://github.com/woduq1414/ko-microgpt/blob/main/model/ko_inference.py): `model/ko_inference.py`
- [Name datasets](https://github.com/woduq1414/ko-microgpt/tree/main/model/data): `model/data`
- [Trained checkpoints](https://github.com/woduq1414/ko-microgpt/tree/main/model/checkpoints): `model/checkpoints`

### Lesson support

- [Token and math utilities](https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/chapters/shared/chapterUtils.js): `app/src/components/chapters/shared/chapterUtils.js`
- [Lesson constants](https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/chapters/shared/chapterConstants.js): `app/src/components/chapters/shared/chapterConstants.js`
- [Unavailable state](https://github.com/woduq1414/ko-microgpt/blob/main/app/src/components/common/SectionStateCard.jsx): `app/src/components/common/SectionStateCard.jsx`

### Other components

- **Learner**

## Connections

- Learner → Lesson app: uses (evidence: `README.md`)
- Lesson app → Language and intro: renders (evidence: `app/src/App.jsx`)
- Lesson app → Chapter sections: renders (evidence: `app/src/App.jsx`)
- Lesson app → Name data: renders (evidence: `app/src/App.jsx`)
- Lesson app → Jamo cloud: renders (evidence: `app/src/App.jsx`)
- Lesson app → Tokenization: renders (evidence: `app/src/App.jsx`)
- Lesson app → Embeddings: renders (evidence: `app/src/App.jsx`)
- Lesson app → Attention: renders (evidence: `app/src/App.jsx`)
- Lesson app → Loss and gradients: renders (evidence: `app/src/App.jsx`)
- Lesson app → Training updates: renders (evidence: `app/src/App.jsx`)
- Lesson app → Inference demo: renders (evidence: `app/src/App.jsx`)
- Lesson app → Model comparison: renders (evidence: `app/src/App.jsx`)
- Lesson app → Localization: reads language settings (evidence: `app/src/App.jsx`)
- Tokenization → Token and math utilities: uses token helpers (evidence: `app/src/components/chapters/ChapterTwoTokenizationDemo.jsx`)
- Embeddings → Token and math utilities: uses math and token helpers (evidence: `app/src/components/chapters/ChapterThreeEmbeddingDemo.jsx`)
- Attention → Token and math utilities: uses attention helpers (evidence: `app/src/components/chapters/ChapterFourAttentionDemo.jsx`)
- Loss and gradients → Token and math utilities: uses shared helpers (evidence: `app/src/components/chapters/ChapterFiveTrainingDemo.jsx`)
- Training updates → Token and math utilities: uses shared helpers (evidence: `app/src/components/chapters/ChapterSixTrainingDemo.jsx`)
- Inference demo → Token and math utilities: uses inference helpers (evidence: `app/src/components/chapters/ChapterSevenInferenceDemo.jsx`)
- Token and math utilities → Lesson constants: imports constants (evidence: `app/src/components/chapters/shared/chapterUtils.js`)
- Loss and gradients → Unavailable state: uses fallback (evidence: `app/src/components/chapters/ChapterFiveTrainingDemo.jsx`)
- Training updates → Unavailable state: uses fallback (evidence: `app/src/components/chapters/ChapterSixTrainingDemo.jsx`)
- Inference demo → Unavailable state: uses fallback (evidence: `app/src/components/chapters/ChapterSevenInferenceDemo.jsx`)
- Training pipeline → Name datasets: loads training names (evidence: `model/ko_main.py`)
- Training pipeline → Trained checkpoints: saves model (evidence: `README.md`)
- Inference entrypoint → Training pipeline: calls inference (evidence: `model/ko_inference.py`)
- Inference entrypoint → Trained checkpoints: uses checkpoint (evidence: `README.md`)
