# httpspycharmhelpers/teach architecture

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

- Interactive diagram: https://gitdiagram.com/httpspycharmhelpers/teach
- Repository: https://github.com/httpspycharmhelpers/teach

## Overview

This is a browser-based Three.js teaching tool. The main workflow is to adjust cuboid dimensions, inspect its volume and layered representation, and explore or annotate the model. Separate branches provide function plotting, geometry creation and definition from uploaded views, and difficulty-grouped math practice. The source excerpts show that app.js owns scene setup and UI dispatch; evidence for some UI-to-module links is documented by the README rather than shown in those excerpts.

Main entry points: [`js/app.js`](https://github.com/httpspycharmhelpers/teach/blob/main/js/app.js) (Scene and UI control), [`js/cubic.js`](https://github.com/httpspycharmhelpers/teach/blob/main/js/cubic.js) (Cuboid and layers), [`js/recognize.js`](https://github.com/httpspycharmhelpers/teach/blob/main/js/recognize.js) (Image-defined models), [`index.html`](https://github.com/httpspycharmhelpers/teach/blob/main/index.html) (Teaching interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Cuboid learning"]
  node_app["Scene and UI control<br/>[app.js]"]
  node_model["Cuboid and layers<br/>[cubic.js]"]
  node_units["Unit conversion<br/>[app.js]"]
end

subgraph group_explore["Visual exploration"]
  node_annotations["Annotation canvas<br/>[annotation.js]"]
  node_plot["Function plotting<br/>[functions.js]"]
end

subgraph group_geometry["Geometry tools"]
  node_developer["Parametric geometry<br/>[developer.js]"]
  node_defined["Image-defined models<br/>[recognize.js]"]
end

subgraph group_practice["Math practice"]
  node_problems["Math drills<br/>[math.js]"]
end

node_learner(("Learner"))
node_page["Teaching interface<br/>[index.html]"]

node_learner -->|"uses"| node_page
node_page -->|"starts"| node_app
node_app -->|"updates"| node_model
node_app -->|"dispatches plots"| node_plot
node_app -->|"creates geometry"| node_developer
node_app -->|"renders drills"| node_problems
node_model -.->|"uses notes"| node_annotations
node_learner -.->|"converts units"| node_units
node_app -.->|"opens model tools"| node_defined
node_defined -->|"registers models"| node_developer

click node_page "https://github.com/httpspycharmhelpers/teach/blob/main/index.html"
click node_app "https://github.com/httpspycharmhelpers/teach/blob/main/js/app.js"
click node_model "https://github.com/httpspycharmhelpers/teach/blob/main/js/cubic.js"
click node_annotations "https://github.com/httpspycharmhelpers/teach/blob/main/js/annotation.js"
click node_plot "https://github.com/httpspycharmhelpers/teach/blob/main/js/functions.js"
click node_developer "https://github.com/httpspycharmhelpers/teach/blob/main/js/developer.js"
click node_defined "https://github.com/httpspycharmhelpers/teach/blob/main/js/recognize.js"
click node_problems "https://github.com/httpspycharmhelpers/teach/blob/main/js/math.js"
click node_units "https://github.com/httpspycharmhelpers/teach/blob/main/js/app.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_app,node_model,node_units toneBlue
class node_annotations,node_plot toneAmber
class node_developer,node_defined toneMint
class node_problems toneRose
class node_learner toneIndigo
class node_page toneTeal
```

## Components

### Cuboid learning

- [Scene and UI control](https://github.com/httpspycharmhelpers/teach/blob/main/js/app.js): `js/app.js`
- [Cuboid and layers](https://github.com/httpspycharmhelpers/teach/blob/main/js/cubic.js): `js/cubic.js`
- [Unit conversion](https://github.com/httpspycharmhelpers/teach/blob/main/js/app.js): `js/app.js`

### Visual exploration

- [Annotation canvas](https://github.com/httpspycharmhelpers/teach/blob/main/js/annotation.js): `js/annotation.js`
- [Function plotting](https://github.com/httpspycharmhelpers/teach/blob/main/js/functions.js): `js/functions.js`

### Geometry tools

- [Parametric geometry](https://github.com/httpspycharmhelpers/teach/blob/main/js/developer.js): `js/developer.js`
- [Image-defined models](https://github.com/httpspycharmhelpers/teach/blob/main/js/recognize.js): `js/recognize.js`

### Math practice

- [Math drills](https://github.com/httpspycharmhelpers/teach/blob/main/js/math.js): `js/math.js`

### Other components

- **Learner**
- [Teaching interface](https://github.com/httpspycharmhelpers/teach/blob/main/index.html): `index.html`

## Connections

- Learner → Teaching interface: uses (evidence: `README.md`)
- Teaching interface → Scene and UI control: starts (evidence: `README.md`)
- Scene and UI control → Cuboid and layers: updates (evidence: `js/app.js`)
- Scene and UI control → Function plotting: dispatches plots (evidence: `js/app.js`)
- Scene and UI control → Parametric geometry: creates geometry (evidence: `js/app.js`)
- Scene and UI control → Math drills: renders drills (evidence: `js/app.js`)
- Cuboid and layers → Annotation canvas: uses notes
- Learner → Unit conversion: converts units
- Scene and UI control → Image-defined models: opens model tools
- Image-defined models → Parametric geometry: registers models (evidence: `js/recognize.js`)
