# jinglinsen/ai-engineering-from-scratch architecture

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

- Interactive diagram: https://gitdiagram.com/jinglinsen/ai-engineering-from-scratch
- Repository: https://github.com/jinglinsen/ai-engineering-from-scratch

## Overview

This repository is an open AI-engineering curriculum, not a single application: learners choose a route, study lessons, run the accompanying code, and produce reusable artifacts. Its content spans foundations, model-building, LLM engineering, tools and protocols, and capstone projects; separate Claude and MCP certification tracks extend the curriculum. The website JavaScript renders curriculum summaries and phase navigation, while API route files indicate lesson, certification, and Markdown access. The excerpts do not establish how those routes are wired, so no API-to-website calls are asserted.

Main entry points: [`phases`](https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases) (Runnable lesson code), [`phases/00-setup-and-tooling`](https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/00-setup-and-tooling) (Setup and tooling), [`site/app.js`](https://github.com/jinglinsen/ai-engineering-from-scratch/blob/main/site/app.js) (Curriculum website), [`phases/11-llm-engineering`](https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/11-llm-engineering) (LLM engineering)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web access"]
  node_webapp["Curriculum website<br/>[app.js]"]
  node_lesson_api["Lesson API<br/>[lesson.js]"]
  node_markdown_api["Markdown API<br/>[markdown.js]"]
  node_v1_markdown["Markdown API v1<br/>[markdown.js]"]
  node_cert_api["Certification API<br/>[certification.js]"]
end

subgraph group_foundations["Technical foundations"]
  node_phase0["Setup and tooling"]
  node_phase1["Math foundations"]
  node_phase2["ML fundamentals"]
  node_phase3["Deep learning"]
  node_phase4["Computer vision"]
  node_phase5["NLP and language"]
  node_phase6["Speech and audio"]
  node_phase7["Transformers"]
end

subgraph group_applications["AI applications"]
  node_phase8["Generative AI"]
  node_phase9["Reinforcement learning"]
  node_phase10["LLMs from scratch"]
  node_phase11["LLM engineering"]
end

subgraph group_protocols["Tools and protocols"]
  node_phase13["Tools and protocols"]
end

subgraph group_advanced["Advanced practice"]
  node_claude_cert["Claude certification"]
  node_mcpa_cert["MCP Associate certification"]
  node_capstones["Capstone projects"]
  node_lesson_artifacts["Runnable lesson code"]
end

node_learner(("Learner"))

node_learner -->|"browses curriculum"| node_webapp
node_learner -->|"starts learning"| node_phase0
node_learner -->|"studies lessons"| node_phase1
node_learner -->|"studies lessons"| node_phase2
node_learner -->|"studies lessons"| node_phase3
node_learner -->|"studies lessons"| node_phase4
node_learner -->|"studies lessons"| node_phase5
node_learner -->|"studies lessons"| node_phase6
node_learner -->|"studies lessons"| node_phase7
node_learner -->|"studies lessons"| node_phase8
node_learner -->|"studies lessons"| node_phase9
node_learner -->|"studies lessons"| node_phase10
node_learner -->|"builds applications"| node_phase11
node_learner -->|"studies integrations"| node_phase13
node_learner -->|"prepares for exam"| node_claude_cert
node_learner -->|"prepares for exam"| node_mcpa_cert
node_learner -->|"builds projects"| node_capstones
node_webapp -->|"renders phases"| node_phase0
node_phase0 -->|"runs lesson code"| node_lesson_artifacts
node_phase11 -->|"runs lesson code"| node_lesson_artifacts
node_phase13 -->|"runs lesson code"| node_lesson_artifacts
node_capstones -->|"runs project code"| node_lesson_artifacts

click node_webapp "https://github.com/jinglinsen/ai-engineering-from-scratch/blob/main/site/app.js"
click node_lesson_api "https://github.com/jinglinsen/ai-engineering-from-scratch/blob/main/api/lesson.js"
click node_markdown_api "https://github.com/jinglinsen/ai-engineering-from-scratch/blob/main/api/markdown.js"
click node_v1_markdown "https://github.com/jinglinsen/ai-engineering-from-scratch/blob/main/api/v1/markdown.js"
click node_cert_api "https://github.com/jinglinsen/ai-engineering-from-scratch/blob/main/api/certification.js"
click node_phase0 "https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/00-setup-and-tooling"
click node_phase1 "https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/01-math-foundations"
click node_phase2 "https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/02-ml-fundamentals"
click node_phase3 "https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/03-deep-learning-core"
click node_phase4 "https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/04-computer-vision"
click node_phase5 "https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/05-nlp-foundations-to-advanced"
click node_phase6 "https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/06-speech-and-audio"
click node_phase7 "https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/07-transformers-deep-dive"
click node_phase8 "https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/08-generative-ai"
click node_phase9 "https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/09-reinforcement-learning"
click node_phase10 "https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/10-llms-from-scratch"
click node_phase11 "https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/11-llm-engineering"
click node_phase13 "https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/13-tools-and-protocols"
click node_claude_cert "https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/certifications/claude"
click node_mcpa_cert "https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/certifications/mcpa"
click node_capstones "https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/19-capstone-projects"
click node_lesson_artifacts "https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases"

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_webapp,node_lesson_api,node_markdown_api,node_v1_markdown,node_cert_api toneBlue
class node_phase0,node_phase1,node_phase2,node_phase3,node_phase4,node_phase5,node_phase6,node_phase7 toneAmber
class node_phase8,node_phase9,node_phase10,node_phase11 toneMint
class node_phase13 toneRose
class node_claude_cert,node_mcpa_cert,node_capstones,node_lesson_artifacts,node_learner toneIndigo
```

## Components

### Web access

- [Curriculum website](https://github.com/jinglinsen/ai-engineering-from-scratch/blob/main/site/app.js): `site/app.js`
- [Lesson API](https://github.com/jinglinsen/ai-engineering-from-scratch/blob/main/api/lesson.js): `api/lesson.js`
- [Markdown API](https://github.com/jinglinsen/ai-engineering-from-scratch/blob/main/api/markdown.js): `api/markdown.js`
- [Markdown API v1](https://github.com/jinglinsen/ai-engineering-from-scratch/blob/main/api/v1/markdown.js): `api/v1/markdown.js`
- [Certification API](https://github.com/jinglinsen/ai-engineering-from-scratch/blob/main/api/certification.js): `api/certification.js`

### Technical foundations

- [Setup and tooling](https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/00-setup-and-tooling): `phases/00-setup-and-tooling`
- [Math foundations](https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/01-math-foundations): `phases/01-math-foundations`
- [ML fundamentals](https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/02-ml-fundamentals): `phases/02-ml-fundamentals`
- [Deep learning](https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/03-deep-learning-core): `phases/03-deep-learning-core`
- [Computer vision](https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/04-computer-vision): `phases/04-computer-vision`
- [NLP and language](https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/05-nlp-foundations-to-advanced): `phases/05-nlp-foundations-to-advanced`
- [Speech and audio](https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/06-speech-and-audio): `phases/06-speech-and-audio`
- [Transformers](https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/07-transformers-deep-dive): `phases/07-transformers-deep-dive`

### AI applications

- [Generative AI](https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/08-generative-ai): `phases/08-generative-ai`
- [Reinforcement learning](https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/09-reinforcement-learning): `phases/09-reinforcement-learning`
- [LLMs from scratch](https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/10-llms-from-scratch): `phases/10-llms-from-scratch`
- [LLM engineering](https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/11-llm-engineering): `phases/11-llm-engineering`

### Tools and protocols

- [Tools and protocols](https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/13-tools-and-protocols): `phases/13-tools-and-protocols`

### Advanced practice

- [Claude certification](https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/certifications/claude): `certifications/claude`
- [MCP Associate certification](https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/certifications/mcpa): `certifications/mcpa`
- [Capstone projects](https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases/19-capstone-projects): `phases/19-capstone-projects`
- [Runnable lesson code](https://github.com/jinglinsen/ai-engineering-from-scratch/tree/main/phases): `phases`

### Other components

- **Learner**

## Connections

- Learner → Curriculum website: browses curriculum
- Learner → Setup and tooling: starts learning
- Learner → Math foundations: studies lessons
- Learner → ML fundamentals: studies lessons
- Learner → Deep learning: studies lessons
- Learner → Computer vision: studies lessons
- Learner → NLP and language: studies lessons
- Learner → Speech and audio: studies lessons
- Learner → Transformers: studies lessons
- Learner → Generative AI: studies lessons
- Learner → Reinforcement learning: studies lessons
- Learner → LLMs from scratch: studies lessons
- Learner → LLM engineering: builds applications
- Learner → Tools and protocols: studies integrations
- Learner → Claude certification: prepares for exam
- Learner → MCP Associate certification: prepares for exam
- Learner → Capstone projects: builds projects
- Curriculum website → Setup and tooling: renders phases
- Setup and tooling → Runnable lesson code: runs lesson code
- LLM engineering → Runnable lesson code: runs lesson code
- Tools and protocols → Runnable lesson code: runs lesson code
- Capstone projects → Runnable lesson code: runs project code
