# jakmann86/hexagon-maths architecture

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

- Interactive diagram: https://gitdiagram.com/jakmann86/hexagon-maths
- Repository: https://github.com/jakmann86/hexagon-maths

## Overview

hexagon-maths is a React teaching app for presenting curriculum lessons, interactive math visuals and practice, with client-side worksheet PDFs as a separate capability. The principal workflow is a learner entering the app, navigating the curriculum and viewing lesson sections; section content is rendered with math-aware components and shared UI state. The repository also contains question generators and a worksheet-generation pipeline. The README provides no product details, and several routing and content modules were not sampled, so some subsystem links are intentionally omitted or marked unverified.

Main entry points: [`maths-teaching-app/src/components/sections/StarterSectionBase.jsx`](https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/components/sections/StarterSectionBase.jsx) (Starter section base), [`maths-teaching-app/src/components/layout/MainLayout.jsx`](https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/components/layout/MainLayout.jsx) (Main layout), [`maths-teaching-app/src/worksheets/WorksheetBuilder.js`](https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/worksheets/WorksheetBuilder.js) (Worksheet builder), [`maths-teaching-app/src/App.jsx`](https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/App.jsx) (App shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and navigation"]
  node_entry["React entry<br/>[main.jsx]"]
  node_app_root["App shell<br/>[App.jsx]"]
  node_layout["Main layout<br/>[MainLayout.jsx]"]
  node_navigation["Section navigation<br/>[SectionNav.jsx]"]
  node_ui_state["UI state<br/>[UIContext.jsx]"]
end

subgraph group_lessons["Lessons and teaching"]
  node_curriculum["Curriculum map<br/>[curriculum.js]"]
  node_lesson_provider["Lesson provider"]
  node_lesson_sections["Topic lesson sections"]
  node_section_base["Starter section base"]
  node_content_renderer["Content renderer"]
  node_question_generators["Question generators"]
end

subgraph group_math["Math visuals"]
  node_math_display["Math display<br/>[MathDisplay.jsx]"]
  node_math_visuals["Math visualizations"]
  node_puzzle_display["Puzzle displays"]
end

subgraph group_worksheets["Worksheet PDFs"]
  node_worksheet_builder["Worksheet builder"]
  node_worksheet_generators["Worksheet questions"]
  node_worksheet_renderers["Diagram renderers"]
  node_pdf_generator["PDF generator<br/>[PDFGenerator.js]"]
end

node_learner(("Learner"))

node_learner -.->|"opens app"| node_entry
node_entry -->|"renders"| node_app_root
node_app_root -->|"provides state"| node_ui_state
node_app_root -->|"renders"| node_layout
node_layout -->|"renders"| node_navigation
node_layout -->|"reads"| node_curriculum
node_layout -->|"renders"| node_lesson_provider
node_navigation -.->|"selects from"| node_curriculum
node_lesson_provider -.->|"loads sections"| node_lesson_sections
node_lesson_sections -.->|"uses section base"| node_section_base
node_section_base -->|"reads answers state"| node_ui_state
node_section_base -.->|"renders content"| node_content_renderer
node_section_base -->|"renders math"| node_math_display
node_content_renderer -->|"renders math"| node_math_display
node_section_base -->|"renders puzzles"| node_puzzle_display
node_section_base -->|"renders visuals"| node_math_visuals
node_lesson_sections -.->|"uses generators"| node_question_generators
node_worksheet_builder -->|"generates questions"| node_worksheet_generators
node_worksheet_builder -->|"renders diagrams"| node_worksheet_renderers
node_worksheet_builder -->|"builds PDF"| node_pdf_generator

click node_entry "https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/main.jsx"
click node_app_root "https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/App.jsx"
click node_layout "https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/components/layout/MainLayout.jsx"
click node_navigation "https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/components/navigation/SectionNav.jsx"
click node_ui_state "https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/context/UIContext.jsx"
click node_curriculum "https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/data/curriculum.js"
click node_lesson_provider "https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/content/LessonContentProvider.jsx"
click node_lesson_sections "https://github.com/jakmann86/hexagon-maths/tree/main/maths-teaching-app/src/content/topics"
click node_section_base "https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/components/sections/StarterSectionBase.jsx"
click node_content_renderer "https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/components/common/ContentRenderer.jsx"
click node_math_display "https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/components/common/MathDisplay.jsx"
click node_math_visuals "https://github.com/jakmann86/hexagon-maths/tree/main/maths-teaching-app/src/components/math/visualizations"
click node_puzzle_display "https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/components/math/puzzles/SymbolPuzzleDisplay.jsx"
click node_question_generators "https://github.com/jakmann86/hexagon-maths/tree/main/maths-teaching-app/src/generators"
click node_worksheet_builder "https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/worksheets/WorksheetBuilder.js"
click node_worksheet_generators "https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/worksheets/generators/pythagorasWorksheetGenerators.js"
click node_worksheet_renderers "https://github.com/jakmann86/hexagon-maths/tree/main/maths-teaching-app/src/worksheets/renderers"
click node_pdf_generator "https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/worksheets/pdf/PDFGenerator.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_entry,node_app_root,node_layout,node_navigation,node_ui_state toneBlue
class node_curriculum,node_lesson_provider,node_lesson_sections,node_section_base,node_content_renderer,node_question_generators toneAmber
class node_math_display,node_math_visuals,node_puzzle_display toneMint
class node_worksheet_builder,node_worksheet_generators,node_worksheet_renderers,node_pdf_generator toneRose
class node_learner toneIndigo
```

## Components

### App and navigation

- [React entry](https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/main.jsx): `maths-teaching-app/src/main.jsx`
- [App shell](https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/App.jsx): `maths-teaching-app/src/App.jsx`
- [Main layout](https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/components/layout/MainLayout.jsx): `maths-teaching-app/src/components/layout/MainLayout.jsx`
- [Section navigation](https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/components/navigation/SectionNav.jsx): `maths-teaching-app/src/components/navigation/SectionNav.jsx`
- [UI state](https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/context/UIContext.jsx): `maths-teaching-app/src/context/UIContext.jsx`

### Lessons and teaching

- [Curriculum map](https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/data/curriculum.js): `maths-teaching-app/src/data/curriculum.js`
- [Lesson provider](https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/content/LessonContentProvider.jsx): `maths-teaching-app/src/content/LessonContentProvider.jsx`
- [Topic lesson sections](https://github.com/jakmann86/hexagon-maths/tree/main/maths-teaching-app/src/content/topics): `maths-teaching-app/src/content/topics`
- [Starter section base](https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/components/sections/StarterSectionBase.jsx): `maths-teaching-app/src/components/sections/StarterSectionBase.jsx`
- [Content renderer](https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/components/common/ContentRenderer.jsx): `maths-teaching-app/src/components/common/ContentRenderer.jsx`
- [Question generators](https://github.com/jakmann86/hexagon-maths/tree/main/maths-teaching-app/src/generators): `maths-teaching-app/src/generators`

### Math visuals

- [Math display](https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/components/common/MathDisplay.jsx): `maths-teaching-app/src/components/common/MathDisplay.jsx`
- [Math visualizations](https://github.com/jakmann86/hexagon-maths/tree/main/maths-teaching-app/src/components/math/visualizations): `maths-teaching-app/src/components/math/visualizations`
- [Puzzle displays](https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/components/math/puzzles/SymbolPuzzleDisplay.jsx): `maths-teaching-app/src/components/math/puzzles/SymbolPuzzleDisplay.jsx`

### Worksheet PDFs

- [Worksheet builder](https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/worksheets/WorksheetBuilder.js): `maths-teaching-app/src/worksheets/WorksheetBuilder.js`
- [Worksheet questions](https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/worksheets/generators/pythagorasWorksheetGenerators.js): `maths-teaching-app/src/worksheets/generators/pythagorasWorksheetGenerators.js`
- [Diagram renderers](https://github.com/jakmann86/hexagon-maths/tree/main/maths-teaching-app/src/worksheets/renderers): `maths-teaching-app/src/worksheets/renderers`
- [PDF generator](https://github.com/jakmann86/hexagon-maths/blob/main/maths-teaching-app/src/worksheets/pdf/PDFGenerator.js): `maths-teaching-app/src/worksheets/pdf/PDFGenerator.js`

### Other components

- **Learner**

## Connections

- Learner → React entry: opens app
- React entry → App shell: renders (evidence: `maths-teaching-app/src/main.jsx`)
- App shell → UI state: provides state (evidence: `maths-teaching-app/src/App.jsx`)
- App shell → Main layout: renders (evidence: `maths-teaching-app/src/App.jsx`)
- Main layout → Section navigation: renders (evidence: `maths-teaching-app/src/components/layout/MainLayout.jsx`)
- Main layout → Curriculum map: reads (evidence: `maths-teaching-app/src/components/layout/MainLayout.jsx`)
- Main layout → Lesson provider: renders (evidence: `maths-teaching-app/src/components/layout/MainLayout.jsx`)
- Section navigation → Curriculum map: selects from
- Lesson provider → Topic lesson sections: loads sections
- Topic lesson sections → Starter section base: uses section base
- Starter section base → UI state: reads answers state (evidence: `maths-teaching-app/src/components/sections/StarterSectionBase.jsx`)
- Starter section base → Content renderer: renders content (evidence: `maths-teaching-app/src/components/sections/StarterSectionBase.jsx`)
- Starter section base → Math display: renders math (evidence: `maths-teaching-app/src/components/sections/StarterSectionBase.jsx`)
- Content renderer → Math display: renders math (evidence: `maths-teaching-app/src/components/common/ContentRenderer.jsx`)
- Starter section base → Puzzle displays: renders puzzles (evidence: `maths-teaching-app/src/components/sections/StarterSectionBase.jsx`)
- Starter section base → Math visualizations: renders visuals (evidence: `maths-teaching-app/src/components/sections/StarterSectionBase.jsx`)
- Topic lesson sections → Question generators: uses generators
- Worksheet builder → Worksheet questions: generates questions (evidence: `maths-teaching-app/src/worksheets/WorksheetBuilder.js`)
- Worksheet builder → Diagram renderers: renders diagrams (evidence: `maths-teaching-app/src/worksheets/WorksheetBuilder.js`)
- Worksheet builder → PDF generator: builds PDF (evidence: `maths-teaching-app/src/worksheets/WorksheetBuilder.js`)
