# corpuzceazar09-cmd/nodex architecture

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

- Interactive diagram: https://gitdiagram.com/corpuzceazar09-cmd/nodex
- Repository: https://github.com/corpuzceazar09-cmd/nodex

## Overview

This is a browser-based logic-gates and cabling learning game. Players start in the game flow, choose a learning tier, work through level challenges, and track completion; separate experiences provide gate study, circuit practice, a breadboard sandbox, and participant evaluation. GameProvider coordinates player state and persistence. The map is based on the supplied tree and indexed references; several routes and the bedroom experience were not sampled, so their internal wiring is not inferred.

Main entry points: [`components/GameProvider.tsx`](https://github.com/corpuzceazar09-cmd/nodex/blob/main/components/GameProvider.tsx) (Game state provider), [`app/circuits/page.tsx`](https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/circuits/page.tsx) (Circuit challenges), [`app/level/[levelId]/page.tsx`](https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/level/%5BlevelId%5D/page.tsx) (Level challenge), [`app/lab/LabClient.tsx`](https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/lab/LabClient.tsx) (Interactive gate lab)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_progression["Game progression"]
  node_start["Start and onboarding<br/>[page.tsx]"]
  node_tier_choice["Tier selection<br/>[page.tsx]"]
  node_tier_map["Tier map<br/>[page.tsx]"]
  node_level_challenge["Level challenge<br/>[page.tsx]"]
  node_tier_briefing["Tier briefing<br/>[page.tsx]"]
  node_completion["Tier completion<br/>[page.tsx]"]
end

subgraph group_practice["Learning activities"]
  node_gate_lab["Interactive gate lab<br/>[LabClient.tsx]"]
  node_circuit_practice["Circuit challenges<br/>[page.tsx]"]
  node_circuit_workbench["Circuit workbench"]
  node_cabling_board["Wiring board<br/>[WiringBoard.tsx]"]
  node_breadboard_sandbox["Breadboard sandbox<br/>[SandboxClient.tsx]"]
  node_bedroom["Bedroom scene<br/>[page.jsx]"]
end

subgraph group_state["Player state"]
  node_game_state["Game state provider<br/>[GameProvider.tsx]"]
  node_save_storage[("Local save storage<br/>[storage.ts]")]
  node_game_progress["Progress calculations<br/>[progress.ts]"]
end

subgraph group_content["Learning content"]
  node_gate_content["Gate reference data<br/>[gates.ts]"]
  node_tier_content["Tier definitions<br/>[tiers.ts]"]
  node_level_content["Level challenges<br/>[levels.ts]"]
  node_cabling_content["Cabling content<br/>[cabling.ts]"]
  node_topic_content["Topic content<br/>[topics.ts]"]
  node_circuit_content["Circuit scenarios<br/>[circuits.ts]"]
  node_logic_evaluator["Logic evaluator<br/>[logic.ts]"]
end

subgraph group_evaluation["Evaluation"]
  node_assessment_content["Assessment content<br/>[assessment.ts]"]
  node_evaluation_flow["Evaluation flow<br/>[page.tsx]"]
  node_survey_flow["Survey<br/>[page.tsx]"]
  node_evaluation_export["Evaluation export"]
end

node_player(("Player"))

node_player -.->|"starts"| node_start
node_start -.->|"continues"| node_tier_choice
node_tier_choice -->|"selects tier"| node_game_state
node_tier_map -->|"reads progress"| node_game_state
node_tier_map -.->|"opens level"| node_level_challenge
node_level_challenge -->|"loads challenge"| node_level_content
node_level_challenge -->|"renders wiring"| node_cabling_board
node_level_challenge -->|"records progress"| node_game_state
node_tier_briefing -->|"renders gate details"| node_gate_content
node_tier_briefing -->|"loads tier"| node_tier_content
node_completion -->|"reads completion"| node_game_state
node_gate_lab -->|"marks explored"| node_game_state
node_gate_lab -->|"loads gate"| node_gate_content
node_gate_lab -->|"renders workbench"| node_circuit_workbench
node_circuit_practice -->|"loads scenarios"| node_circuit_content
node_circuit_practice -->|"evaluates circuit"| node_logic_evaluator
node_circuit_practice -->|"renders workbench"| node_circuit_workbench
node_circuit_practice -->|"records completion"| node_game_state
node_cabling_board -->|"loads cabling data"| node_cabling_content
node_game_state -->|"loads and saves"| node_save_storage
node_game_state -->|"provides progress"| node_game_progress
node_game_state -->|"uses tier definitions"| node_tier_content
node_game_state -->|"uses gate definitions"| node_gate_content
node_game_state -->|"uses topic definitions"| node_topic_content
node_evaluation_flow -->|"reads evaluation state"| node_game_state
node_evaluation_flow -->|"exports results"| node_evaluation_export
node_survey_flow -->|"loads survey content"| node_assessment_content
node_survey_flow -->|"records responses"| node_game_state
node_game_state -->|"uses assessment types"| node_assessment_content
node_player -.->|"enters scene"| node_bedroom
node_player -.->|"opens sandbox"| node_breadboard_sandbox

click node_start "https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/page.tsx"
click node_tier_choice "https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/difficulty/page.tsx"
click node_tier_map "https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/map/%5Btier%5D/page.tsx"
click node_level_challenge "https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/level/%5BlevelId%5D/page.tsx"
click node_tier_briefing "https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/briefing/%5Btier%5D/page.tsx"
click node_completion "https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/complete/%5Btier%5D/page.tsx"
click node_gate_lab "https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/lab/LabClient.tsx"
click node_circuit_practice "https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/circuits/page.tsx"
click node_circuit_workbench "https://github.com/corpuzceazar09-cmd/nodex/blob/main/components/circuit/MovableWorkbench.tsx"
click node_cabling_board "https://github.com/corpuzceazar09-cmd/nodex/blob/main/components/cabling/WiringBoard.tsx"
click node_breadboard_sandbox "https://github.com/corpuzceazar09-cmd/nodex/blob/main/components/sandbox/SandboxClient.tsx"
click node_bedroom "https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/bedroom/page.jsx"
click node_game_state "https://github.com/corpuzceazar09-cmd/nodex/blob/main/components/GameProvider.tsx"
click node_save_storage "https://github.com/corpuzceazar09-cmd/nodex/blob/main/lib/storage.ts"
click node_game_progress "https://github.com/corpuzceazar09-cmd/nodex/blob/main/lib/progress.ts"
click node_gate_content "https://github.com/corpuzceazar09-cmd/nodex/blob/main/lib/data/gates.ts"
click node_tier_content "https://github.com/corpuzceazar09-cmd/nodex/blob/main/lib/data/tiers.ts"
click node_level_content "https://github.com/corpuzceazar09-cmd/nodex/blob/main/lib/data/levels.ts"
click node_cabling_content "https://github.com/corpuzceazar09-cmd/nodex/blob/main/lib/data/cabling.ts"
click node_topic_content "https://github.com/corpuzceazar09-cmd/nodex/blob/main/lib/data/topics.ts"
click node_circuit_content "https://github.com/corpuzceazar09-cmd/nodex/blob/main/lib/data/circuits.ts"
click node_logic_evaluator "https://github.com/corpuzceazar09-cmd/nodex/blob/main/lib/logic.ts"
click node_assessment_content "https://github.com/corpuzceazar09-cmd/nodex/blob/main/lib/data/assessment.ts"
click node_evaluation_flow "https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/evaluation/page.tsx"
click node_survey_flow "https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/evaluation/survey/page.tsx"
click node_evaluation_export "https://github.com/corpuzceazar09-cmd/nodex/blob/main/lib/evaluationExport.ts"

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_start,node_tier_choice,node_tier_map,node_level_challenge,node_tier_briefing,node_completion toneBlue
class node_gate_lab,node_circuit_practice,node_circuit_workbench,node_cabling_board,node_breadboard_sandbox,node_bedroom toneAmber
class node_game_state,node_save_storage,node_game_progress toneMint
class node_gate_content,node_tier_content,node_level_content,node_cabling_content,node_topic_content,node_circuit_content,node_logic_evaluator toneRose
class node_assessment_content,node_evaluation_flow,node_survey_flow,node_evaluation_export,node_player toneIndigo
```

## Components

### Game progression

- [Start and onboarding](https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/page.tsx): `app/page.tsx`
- [Tier selection](https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/difficulty/page.tsx): `app/difficulty/page.tsx`
- [Tier map](https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/map/%5Btier%5D/page.tsx): `app/map/[tier]/page.tsx`
- [Level challenge](https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/level/%5BlevelId%5D/page.tsx): `app/level/[levelId]/page.tsx`
- [Tier briefing](https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/briefing/%5Btier%5D/page.tsx): `app/briefing/[tier]/page.tsx`
- [Tier completion](https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/complete/%5Btier%5D/page.tsx): `app/complete/[tier]/page.tsx`

### Learning activities

- [Interactive gate lab](https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/lab/LabClient.tsx): `app/lab/LabClient.tsx`
- [Circuit challenges](https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/circuits/page.tsx): `app/circuits/page.tsx`
- [Circuit workbench](https://github.com/corpuzceazar09-cmd/nodex/blob/main/components/circuit/MovableWorkbench.tsx): `components/circuit/MovableWorkbench.tsx`
- [Wiring board](https://github.com/corpuzceazar09-cmd/nodex/blob/main/components/cabling/WiringBoard.tsx): `components/cabling/WiringBoard.tsx`
- [Breadboard sandbox](https://github.com/corpuzceazar09-cmd/nodex/blob/main/components/sandbox/SandboxClient.tsx): `components/sandbox/SandboxClient.tsx`
- [Bedroom scene](https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/bedroom/page.jsx): `app/bedroom/page.jsx`

### Player state

- [Game state provider](https://github.com/corpuzceazar09-cmd/nodex/blob/main/components/GameProvider.tsx): `components/GameProvider.tsx`
- [Local save storage](https://github.com/corpuzceazar09-cmd/nodex/blob/main/lib/storage.ts): `lib/storage.ts`
- [Progress calculations](https://github.com/corpuzceazar09-cmd/nodex/blob/main/lib/progress.ts): `lib/progress.ts`

### Learning content

- [Gate reference data](https://github.com/corpuzceazar09-cmd/nodex/blob/main/lib/data/gates.ts): `lib/data/gates.ts`
- [Tier definitions](https://github.com/corpuzceazar09-cmd/nodex/blob/main/lib/data/tiers.ts): `lib/data/tiers.ts`
- [Level challenges](https://github.com/corpuzceazar09-cmd/nodex/blob/main/lib/data/levels.ts): `lib/data/levels.ts`
- [Cabling content](https://github.com/corpuzceazar09-cmd/nodex/blob/main/lib/data/cabling.ts): `lib/data/cabling.ts`
- [Topic content](https://github.com/corpuzceazar09-cmd/nodex/blob/main/lib/data/topics.ts): `lib/data/topics.ts`
- [Circuit scenarios](https://github.com/corpuzceazar09-cmd/nodex/blob/main/lib/data/circuits.ts): `lib/data/circuits.ts`
- [Logic evaluator](https://github.com/corpuzceazar09-cmd/nodex/blob/main/lib/logic.ts): `lib/logic.ts`

### Evaluation

- [Assessment content](https://github.com/corpuzceazar09-cmd/nodex/blob/main/lib/data/assessment.ts): `lib/data/assessment.ts`
- [Evaluation flow](https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/evaluation/page.tsx): `app/evaluation/page.tsx`
- [Survey](https://github.com/corpuzceazar09-cmd/nodex/blob/main/app/evaluation/survey/page.tsx): `app/evaluation/survey/page.tsx`
- [Evaluation export](https://github.com/corpuzceazar09-cmd/nodex/blob/main/lib/evaluationExport.ts): `lib/evaluationExport.ts`

### Other components

- **Player**

## Connections

- Player → Start and onboarding: starts
- Start and onboarding → Tier selection: continues
- Tier selection → Game state provider: selects tier (evidence: `app/difficulty/page.tsx`)
- Tier map → Game state provider: reads progress (evidence: `app/map/[tier]/page.tsx`)
- Tier map → Level challenge: opens level
- Level challenge → Level challenges: loads challenge (evidence: `app/level/[levelId]/page.tsx`)
- Level challenge → Wiring board: renders wiring (evidence: `app/level/[levelId]/page.tsx`)
- Level challenge → Game state provider: records progress (evidence: `app/level/[levelId]/page.tsx`)
- Tier briefing → Gate reference data: renders gate details (evidence: `app/briefing/[tier]/page.tsx`)
- Tier briefing → Tier definitions: loads tier (evidence: `app/briefing/[tier]/page.tsx`)
- Tier completion → Game state provider: reads completion (evidence: `app/complete/[tier]/page.tsx`)
- Interactive gate lab → Game state provider: marks explored (evidence: `app/lab/LabClient.tsx`)
- Interactive gate lab → Gate reference data: loads gate (evidence: `app/lab/LabClient.tsx`)
- Interactive gate lab → Circuit workbench: renders workbench (evidence: `app/lab/LabClient.tsx`)
- Circuit challenges → Circuit scenarios: loads scenarios (evidence: `app/circuits/page.tsx`)
- Circuit challenges → Logic evaluator: evaluates circuit (evidence: `app/circuits/page.tsx`)
- Circuit challenges → Circuit workbench: renders workbench (evidence: `app/circuits/page.tsx`)
- Circuit challenges → Game state provider: records completion (evidence: `app/circuits/page.tsx`)
- Wiring board → Cabling content: loads cabling data (evidence: `components/cabling/WiringBoard.tsx`)
- Game state provider → Local save storage: loads and saves (evidence: `components/GameProvider.tsx`)
- Game state provider → Progress calculations: provides progress (evidence: `components/PlayerPanel.tsx`)
- Game state provider → Tier definitions: uses tier definitions (evidence: `components/GameProvider.tsx`)
- Game state provider → Gate reference data: uses gate definitions (evidence: `components/GameProvider.tsx`)
- Game state provider → Topic content: uses topic definitions (evidence: `components/GameProvider.tsx`)
- Evaluation flow → Game state provider: reads evaluation state (evidence: `app/evaluation/page.tsx`)
- Evaluation flow → Evaluation export: exports results (evidence: `app/evaluation/page.tsx`)
- Survey → Assessment content: loads survey content (evidence: `app/evaluation/survey/page.tsx`)
- Survey → Game state provider: records responses (evidence: `app/evaluation/survey/page.tsx`)
- Game state provider → Assessment content: uses assessment types (evidence: `components/GameProvider.tsx`)
- Player → Bedroom scene: enters scene
- Player → Breadboard sandbox: opens sandbox
