# miracle606/mathcandy architecture

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

- Interactive diagram: https://gitdiagram.com/miracle606/mathcandy
- Repository: https://github.com/miracle606/mathcandy

## Overview

This is a static Chinese mathematics study site: users browse past exam questions and topic-based study material, with mathematical notation typeset in the browser. The tree also shows a search index and separate history, linear algebra, and miscellaneous collections. The only sampled source is the MathJax configuration; navigation and search wiring are therefore not confirmed, so those relationships are left unverified.

Main entry points: [`40/index.html`](https://github.com/miracle606/mathcandy/blob/main/40/index.html) (Exam Archive), [`javascripts/mathjax.js`](https://github.com/miracle606/mathcandy/blob/main/javascripts/mathjax.js) (MathJax Config), [`40`](https://github.com/miracle606/mathcandy/tree/main/40) (Yearly Exams), [`AM`](https://github.com/miracle606/mathcandy/tree/main/AM) (Advanced Math)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_exam["Past Exams"]
  node_exam_index["Exam Archive<br/>[index.html]"]
  node_exam_years["Yearly Exams"]
end

subgraph group_topics["Study Topics"]
  node_advanced_math["Advanced Math"]
  node_linear_algebra["Linear Algebra"]
  node_history["Math History"]
  node_misc["Other Problems"]
end

subgraph group_runtime["Site Runtime"]
  node_home["Home Page<br/>[index.html]"]
  node_search_index[("Search Index<br/>[search_index.json]")]
  node_mathjax_config["MathJax Config<br/>[mathjax.js]"]
end

node_visitor(("Learner"))
node_mathjax["MathJax Engine"]
node_browser(("Browser"))

node_visitor -.->|"opens"| node_home
node_visitor -.->|"browses"| node_exam_index
node_exam_index -.->|"links to"| node_exam_years
node_visitor -.->|"browses"| node_advanced_math
node_visitor -.->|"browses"| node_linear_algebra
node_visitor -.->|"browses"| node_history
node_visitor -.->|"browses"| node_misc
node_visitor -.->|"searches"| node_search_index
node_browser -.->|"loads"| node_mathjax_config
node_mathjax_config -->|"typesets math"| node_mathjax

click node_home "https://github.com/miracle606/mathcandy/blob/main/index.html"
click node_exam_index "https://github.com/miracle606/mathcandy/blob/main/40/index.html"
click node_exam_years "https://github.com/miracle606/mathcandy/tree/main/40"
click node_advanced_math "https://github.com/miracle606/mathcandy/tree/main/AM"
click node_linear_algebra "https://github.com/miracle606/mathcandy/tree/main/LA"
click node_history "https://github.com/miracle606/mathcandy/tree/main/History"
click node_misc "https://github.com/miracle606/mathcandy/tree/main/Misc"
click node_search_index "https://github.com/miracle606/mathcandy/blob/main/search/search_index.json"
click node_mathjax_config "https://github.com/miracle606/mathcandy/blob/main/javascripts/mathjax.js"

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_exam_index,node_exam_years,node_browser toneBlue
class node_advanced_math,node_linear_algebra,node_history,node_misc toneAmber
class node_home,node_search_index,node_mathjax_config toneMint
class node_visitor,node_mathjax toneIndigo
```

## Components

### Past Exams

- [Exam Archive](https://github.com/miracle606/mathcandy/blob/main/40/index.html): `40/index.html`
- [Yearly Exams](https://github.com/miracle606/mathcandy/tree/main/40): `40`

### Study Topics

- [Advanced Math](https://github.com/miracle606/mathcandy/tree/main/AM): `AM`
- [Linear Algebra](https://github.com/miracle606/mathcandy/tree/main/LA): `LA`
- [Math History](https://github.com/miracle606/mathcandy/tree/main/History): `History`
- [Other Problems](https://github.com/miracle606/mathcandy/tree/main/Misc): `Misc`

### Site Runtime

- [Home Page](https://github.com/miracle606/mathcandy/blob/main/index.html): `index.html`
- [Search Index](https://github.com/miracle606/mathcandy/blob/main/search/search_index.json): `search/search_index.json`
- [MathJax Config](https://github.com/miracle606/mathcandy/blob/main/javascripts/mathjax.js): `javascripts/mathjax.js`

### Other components

- **Learner**
- **MathJax Engine**
- **Browser**

## Connections

- Learner → Home Page: opens
- Learner → Exam Archive: browses
- Exam Archive → Yearly Exams: links to
- Learner → Advanced Math: browses
- Learner → Linear Algebra: browses
- Learner → Math History: browses
- Learner → Other Problems: browses
- Learner → Search Index: searches
- Browser → MathJax Config: loads
- MathJax Config → MathJax Engine: typesets math (evidence: `javascripts/mathjax.js`)
