# mattpocock/rubix-cube architecture

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

- Interactive diagram: https://gitdiagram.com/mattpocock/rubix-cube
- Repository: https://github.com/mattpocock/rubix-cube

## Overview

#### Purpose and delivery model
This repository is a self-contained Rubik’s Cube learning curriculum: sequential browser-readable lessons, supporting reference material, learner progress records, and small verification/rendering utilities. It is primarily a static-content repository rather than an application server.
- `MISSION.md`
- `lessons/0001-anatomy-notation-white-cross.html`
- `reference/solve-card.html`

#### Curriculum entry points and progression
The ordered HTML lessons are the main learner entry points. The sequence begins with cube anatomy, notation, and the white cross; progresses through beginner-layer and last-layer techniques; then moves into F2L concepts and case handling.
- `lessons/0001-anatomy-notation-white-cross.html`
- `lessons/0007-orient-the-corners.html`
- `lessons/0019-what-f2l-actually-is.html`

The lesson numbering is the principal control flow: consumers should preserve numeric order when presenting or planning the curriculum.

#### Learning-state record
`learning-records/` captures milestone-based learner outcomes corresponding to the instructional path. These records form the evidence/history layer rather than executable state, documenting capability acquisition and later curriculum extensions.
- `learning-records/0001-can-build-white-cross.md`
- `learning-records/0007-first-full-solve.md`
- `learning-records/0018-f2l-reset-from-first-principles.md`

A planner can use these records to identify completed stages and select the next lesson or remediation topic.

#### Instructional stages
The architecture is organized around three teaching phases:
1. Foundation and beginner solve: notation, white cross/corners, second layer, and basic last layer.
2. Last-layer recognition and algorithms: corner cycles, case reading, Sune, PLL, and memory hooks.
3. F2L transition: insertions, pair-first thinking, pair construction, edge extraction, and wrong-slot recovery.
- `lessons/0003-second-layer.html`
- `lessons/0010-read-the-case.html`
- `lessons/0016-build-the-pair.html`

#### Interactive and visual assets
Browser-side visual support is concentrated in the assets directory. `cube-render.js` is the JavaScript rendering component, while shared lesson presentation is supplied by CSS. Lesson HTML is the boundary that consumes these static assets.
- `assets/cube-render.js`
- `assets/lesson.css`
- `assets/README.md`

The material runtime is therefore a web browser capable of loading static HTML, CSS, and JavaScript; no backend or external service is represented in the tree.

#### Cube-model and verification utilities
Python utilities provide an offline computational boundary for cube representation and F2L checking. They are separate from the static lesson delivery path and likely support authoring or validating instructional cases.
- `assets/cube.py`
- `assets/f2l_verify.py`
- `assets/cube-render.js`

#### Reference and supporting content
Reference pages provide reusable lookup material independent of lesson progression, while top-level mission, notes, and resources files hold curriculum intent and supporting context.
- `reference/glossary.html`
- `reference/solve-card.html`
- `RESOURCES.md`

Main entry points: [`lessons/0001-anatomy-notation-white-cross.html`](https://github.com/mattpocock/rubix-cube/blob/main/lessons/0001-anatomy-notation-white-cross.html) (Foundation lessons), [`lessons/0016-build-the-pair.html`](https://github.com/mattpocock/rubix-cube/blob/main/lessons/0016-build-the-pair.html) (F2L transition), [`lessons/0007-orient-the-corners.html`](https://github.com/mattpocock/rubix-cube/blob/main/lessons/0007-orient-the-corners.html) (Last-layer techniques), [`reference/solve-card.html`](https://github.com/mattpocock/rubix-cube/blob/main/reference/solve-card.html) (Reference pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_curriculum["Sequential Curriculum"]
  node_foundation["Foundation lessons<br/>lesson stage"]
  node_second_layer["Second-layer lesson"]
  node_last_layer["Last-layer techniques<br/>lesson stage"]
  node_case_reading["Case reading<br/>lesson"]
  node_f2l["F2L transition<br/>lesson stage"]
  node_f2l_intro["F2L concepts<br/>lesson"]
end

subgraph group_state["Learning Evidence"]
  node_milestones["Milestone records<br/>learning record"]
  node_first_solve["First-solve record<br/>learning record"]
  node_f2l_reset["F2L reset record<br/>learning record"]
end

subgraph group_delivery["Static Delivery"]
  node_browser(("Web browser<br/>runtime"))
  node_css["Lesson styles<br/>stylesheet<br/>[lesson.css]"]
  node_renderer["Cube renderer<br/>browser script<br/>[cube-render.js]"]
  node_reference["Reference pages<br/>lookup content<br/>[solve-card.html]"]
  node_glossary["Glossary<br/>reference page<br/>[glossary.html]"]
end

subgraph group_authoring["Authoring Utilities"]
  node_cube_model["Cube model<br/>Python utility<br/>[cube.py]"]
  node_f2l_verify["F2L verifier<br/>Python utility<br/>[f2l_verify.py]"]
end

node_mission["Curriculum mission<br/>purpose<br/>[MISSION.md]"]
node_resources["Supporting resources<br/>supporting content<br/>[RESOURCES.md]"]

node_mission -->|"guides"| node_foundation
node_foundation -->|"numeric sequence"| node_second_layer
node_second_layer -->|"numeric sequence"| node_last_layer
node_last_layer -->|"continues"| node_case_reading
node_case_reading -->|"transitions to"| node_f2l
node_f2l -->|"continues"| node_f2l_intro
node_foundation -.->|"records progress"| node_milestones
node_last_layer -.->|"records milestone"| node_first_solve
node_f2l -.->|"records extension"| node_f2l_reset
node_milestones -.->|"informs next lesson"| node_foundation
node_browser -->|"renders"| node_foundation
node_browser -->|"renders"| node_last_layer
node_browser -->|"renders"| node_f2l
node_css -->|"styles"| node_foundation
node_renderer -->|"visualizes cube"| node_foundation
node_renderer -->|"visualizes cube"| node_f2l
node_browser -->|"renders"| node_reference
node_reference -.->|"complements"| node_glossary
node_cube_model -->|"supplies cube representation"| node_f2l_verify
node_f2l_verify -.->|"validates cases for"| node_f2l
node_resources -.->|"supports"| node_reference

click node_mission "https://github.com/mattpocock/rubix-cube/blob/main/MISSION.md"
click node_foundation "https://github.com/mattpocock/rubix-cube/blob/main/lessons/0001-anatomy-notation-white-cross.html"
click node_second_layer "https://github.com/mattpocock/rubix-cube/blob/main/lessons/0003-second-layer.html"
click node_last_layer "https://github.com/mattpocock/rubix-cube/blob/main/lessons/0007-orient-the-corners.html"
click node_case_reading "https://github.com/mattpocock/rubix-cube/blob/main/lessons/0010-read-the-case.html"
click node_f2l "https://github.com/mattpocock/rubix-cube/blob/main/lessons/0016-build-the-pair.html"
click node_f2l_intro "https://github.com/mattpocock/rubix-cube/blob/main/lessons/0019-what-f2l-actually-is.html"
click node_milestones "https://github.com/mattpocock/rubix-cube/blob/main/learning-records/0001-can-build-white-cross.md"
click node_first_solve "https://github.com/mattpocock/rubix-cube/blob/main/learning-records/0007-first-full-solve.md"
click node_f2l_reset "https://github.com/mattpocock/rubix-cube/blob/main/learning-records/0018-f2l-reset-from-first-principles.md"
click node_css "https://github.com/mattpocock/rubix-cube/blob/main/assets/lesson.css"
click node_renderer "https://github.com/mattpocock/rubix-cube/blob/main/assets/cube-render.js"
click node_reference "https://github.com/mattpocock/rubix-cube/blob/main/reference/solve-card.html"
click node_glossary "https://github.com/mattpocock/rubix-cube/blob/main/reference/glossary.html"
click node_resources "https://github.com/mattpocock/rubix-cube/blob/main/RESOURCES.md"
click node_cube_model "https://github.com/mattpocock/rubix-cube/blob/main/assets/cube.py"
click node_f2l_verify "https://github.com/mattpocock/rubix-cube/blob/main/assets/f2l_verify.py"

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_foundation,node_second_layer,node_last_layer,node_case_reading,node_f2l,node_f2l_intro toneBlue
class node_milestones,node_first_solve,node_f2l_reset toneAmber
class node_browser,node_css,node_renderer,node_reference,node_glossary toneMint
class node_cube_model,node_f2l_verify toneRose
class node_mission,node_resources toneNeutral
```

## Components

### Sequential Curriculum

Numbered lessons define learner progression.

- [Foundation lessons](https://github.com/mattpocock/rubix-cube/blob/main/lessons/0001-anatomy-notation-white-cross.html): lesson stage · Notation through beginner solve foundations. · `lessons/0001-anatomy-notation-white-cross.html`
- [Second-layer lesson](https://github.com/mattpocock/rubix-cube/blob/main/lessons/0003-second-layer.html): lesson · `lessons/0003-second-layer.html`
- [Last-layer techniques](https://github.com/mattpocock/rubix-cube/blob/main/lessons/0007-orient-the-corners.html): lesson stage · Recognition and algorithm practice. · `lessons/0007-orient-the-corners.html`
- [Case reading](https://github.com/mattpocock/rubix-cube/blob/main/lessons/0010-read-the-case.html): lesson · `lessons/0010-read-the-case.html`
- [F2L transition](https://github.com/mattpocock/rubix-cube/blob/main/lessons/0016-build-the-pair.html): lesson stage · Pair-first F2L concepts and recovery. · `lessons/0016-build-the-pair.html`
- [F2L concepts](https://github.com/mattpocock/rubix-cube/blob/main/lessons/0019-what-f2l-actually-is.html): lesson · `lessons/0019-what-f2l-actually-is.html`

### Learning Evidence

- [Milestone records](https://github.com/mattpocock/rubix-cube/blob/main/learning-records/0001-can-build-white-cross.md): learning record · Evidence used to select next or remediation work. · `learning-records/0001-can-build-white-cross.md`
- [First-solve record](https://github.com/mattpocock/rubix-cube/blob/main/learning-records/0007-first-full-solve.md): learning record · `learning-records/0007-first-full-solve.md`
- [F2L reset record](https://github.com/mattpocock/rubix-cube/blob/main/learning-records/0018-f2l-reset-from-first-principles.md): learning record · `learning-records/0018-f2l-reset-from-first-principles.md`

### Static Delivery

- **Web browser**: runtime · Loads the self-contained static curriculum.
- [Lesson styles](https://github.com/mattpocock/rubix-cube/blob/main/assets/lesson.css): stylesheet · `assets/lesson.css`
- [Cube renderer](https://github.com/mattpocock/rubix-cube/blob/main/assets/cube-render.js): browser script · Visual cube support for lesson pages. · `assets/cube-render.js`
- [Reference pages](https://github.com/mattpocock/rubix-cube/blob/main/reference/solve-card.html): lookup content · Reusable material outside lesson order. · `reference/solve-card.html`
- [Glossary](https://github.com/mattpocock/rubix-cube/blob/main/reference/glossary.html): reference page · `reference/glossary.html`

### Authoring Utilities

Offline cube-model and F2L verification tools.

- [Cube model](https://github.com/mattpocock/rubix-cube/blob/main/assets/cube.py): Python utility · Offline cube representation for authoring checks. · `assets/cube.py`
- [F2L verifier](https://github.com/mattpocock/rubix-cube/blob/main/assets/f2l_verify.py): Python utility · Validates instructional F2L cases offline. · `assets/f2l_verify.py`

### Other components

- [Curriculum mission](https://github.com/mattpocock/rubix-cube/blob/main/MISSION.md): purpose · `MISSION.md`
- [Supporting resources](https://github.com/mattpocock/rubix-cube/blob/main/RESOURCES.md): supporting content · `RESOURCES.md`

## Connections

- Curriculum mission → Foundation lessons: guides
- Foundation lessons → Second-layer lesson: numeric sequence
- Second-layer lesson → Last-layer techniques: numeric sequence
- Last-layer techniques → Case reading: continues
- Case reading → F2L transition: transitions to
- F2L transition → F2L concepts: continues
- Foundation lessons → Milestone records: records progress
- Last-layer techniques → First-solve record: records milestone
- F2L transition → F2L reset record: records extension
- Milestone records → Foundation lessons: informs next lesson
- Web browser → Foundation lessons: renders
- Web browser → Last-layer techniques: renders
- Web browser → F2L transition: renders
- Lesson styles → Foundation lessons: styles
- Cube renderer → Foundation lessons: visualizes cube
- Cube renderer → F2L transition: visualizes cube
- Web browser → Reference pages: renders
- Reference pages → Glossary: complements
- Cube model → F2L verifier: supplies cube representation
- F2L verifier → F2L transition: validates cases for
- Supporting resources → Reference pages: supports
