# piyushhjha/nexora architecture

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

- Interactive diagram: https://gitdiagram.com/piyushhjha/nexora
- Repository: https://github.com/piyushhjha/nexora

## Overview

HoloLearn is a browser-based educational 3D model explorer. A user explores procedural anatomy, biology, machinery, vehicles, and wonders; the app builds a particle model, then presents it through WebGL for gesture-, touch-, and voice-driven inspection. The app also exposes guided lessons, quizzes, X-ray views, and recording. The sampled app and module references support the main wiring; some feature internals and model modules were not excerpted, so their implementation details and connections are not expanded here.

Main entry points: [`src/models/catalog.js`](https://github.com/piyushhjha/nexora/blob/main/src/models/catalog.js) (Model catalog and buffers), [`src/app.js`](https://github.com/piyushhjha/nexora/blob/main/src/app.js) (Explorer app), [`src/lib/sampling.js`](https://github.com/piyushhjha/nexora/blob/main/src/lib/sampling.js) (Shape sampling), [`src/gl/renderer.js`](https://github.com/piyushhjha/nexora/blob/main/src/gl/renderer.js) (WebGL renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Learning experience"]
  node_app["Explorer app<br/>[app.js]"]
  node_education["Lessons and quiz<br/>[education.js]"]
  node_features["Voice commands<br/>[features.js]"]
  node_synth["Speech synthesis<br/>[synth.js]"]
end

subgraph group_interaction["Input and control"]
  node_hands["Hand tracking<br/>[hands.js]"]
  node_controller["Gesture controller<br/>[controller.js]"]
  node_gestures["Gesture detection<br/>[gestures.js]"]
  node_state["Explorer state<br/>[state.js]"]
end

subgraph group_rendering["Particle rendering"]
  node_renderer["WebGL renderer<br/>[renderer.js]"]
  node_shaders["GPU shaders<br/>[shaders.js]"]
  node_simref["Particle simulation seeds<br/>[simRef.js]"]
end

subgraph group_models["Educational models"]
  node_catalog["Model catalog and buffers<br/>[catalog.js]"]
  node_wonders["Wonders<br/>[wonders.js]"]
  node_engines["Engines<br/>[engines.js]"]
  node_vehicles["Vehicles<br/>[vehicles.js]"]
  node_anatomy["Anatomy<br/>[anatomy.js]"]
  node_anatomy2["Additional anatomy<br/>[anatomy2.js]"]
  node_body["Body models<br/>[body.js]"]
  node_biology["Biology models<br/>[biology.js]"]
  node_machines["Machines<br/>[machines.js]"]
end

subgraph group_geometry["Geometry utilities"]
  node_sampling["Shape sampling<br/>[sampling.js]"]
  node_shapes["Organic shape helpers<br/>[shapes.js]"]
  node_rng["Deterministic randomness<br/>[rng.js]"]
  node_vec["Vector math<br/>[vec.js]"]
end

node_learner(("Learner"))

node_learner -.->|"explores models"| node_app
node_app -->|"updates gestures"| node_controller
node_controller -->|"classifies poses"| node_gestures
node_controller -->|"updates state"| node_state
node_app -->|"uses tracking"| node_hands
node_app -->|"builds models"| node_catalog
node_app -->|"renders scene"| node_renderer
node_app -->|"parses commands"| node_features
node_app -->|"uses learning features"| node_education
node_app -->|"speaks responses"| node_synth
node_renderer -->|"uses shaders"| node_shaders
node_renderer -->|"seeds simulation"| node_simref
node_renderer -->|"creates random values"| node_rng
node_catalog -->|"imports models"| node_wonders
node_catalog -->|"imports models"| node_engines
node_catalog -->|"imports models"| node_vehicles
node_catalog -->|"imports models"| node_anatomy
node_catalog -->|"imports models"| node_anatomy2
node_catalog -->|"imports models"| node_body
node_catalog -->|"imports models"| node_biology
node_catalog -->|"imports models"| node_machines
node_catalog -->|"samples model points"| node_sampling
node_engines -->|"builds geometry"| node_sampling
node_engines -->|"uses vector math"| node_vec
node_machines -->|"reuses parts"| node_engines
node_machines -->|"uses shape helpers"| node_shapes
node_sampling -->|"samples deterministically"| node_rng
node_sampling -->|"uses vector math"| node_vec
node_shapes -->|"builds primitives"| node_sampling
node_shapes -->|"uses vector math"| node_vec

click node_app "https://github.com/piyushhjha/nexora/blob/main/src/app.js"
click node_education "https://github.com/piyushhjha/nexora/blob/main/src/education.js"
click node_features "https://github.com/piyushhjha/nexora/blob/main/src/features.js"
click node_synth "https://github.com/piyushhjha/nexora/blob/main/src/logic/synth.js"
click node_hands "https://github.com/piyushhjha/nexora/blob/main/src/hands.js"
click node_controller "https://github.com/piyushhjha/nexora/blob/main/src/logic/controller.js"
click node_gestures "https://github.com/piyushhjha/nexora/blob/main/src/logic/gestures.js"
click node_state "https://github.com/piyushhjha/nexora/blob/main/src/logic/state.js"
click node_renderer "https://github.com/piyushhjha/nexora/blob/main/src/gl/renderer.js"
click node_shaders "https://github.com/piyushhjha/nexora/blob/main/src/gl/shaders.js"
click node_simref "https://github.com/piyushhjha/nexora/blob/main/src/logic/simRef.js"
click node_catalog "https://github.com/piyushhjha/nexora/blob/main/src/models/catalog.js"
click node_wonders "https://github.com/piyushhjha/nexora/blob/main/src/models/wonders.js"
click node_engines "https://github.com/piyushhjha/nexora/blob/main/src/models/engines.js"
click node_vehicles "https://github.com/piyushhjha/nexora/blob/main/src/models/vehicles.js"
click node_anatomy "https://github.com/piyushhjha/nexora/blob/main/src/models/anatomy.js"
click node_anatomy2 "https://github.com/piyushhjha/nexora/blob/main/src/models/anatomy2.js"
click node_body "https://github.com/piyushhjha/nexora/blob/main/src/models/body.js"
click node_biology "https://github.com/piyushhjha/nexora/blob/main/src/models/biology.js"
click node_machines "https://github.com/piyushhjha/nexora/blob/main/src/models/machines.js"
click node_sampling "https://github.com/piyushhjha/nexora/blob/main/src/lib/sampling.js"
click node_shapes "https://github.com/piyushhjha/nexora/blob/main/src/lib/shapes.js"
click node_rng "https://github.com/piyushhjha/nexora/blob/main/src/lib/rng.js"
click node_vec "https://github.com/piyushhjha/nexora/blob/main/src/lib/vec.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_education,node_features,node_synth toneBlue
class node_hands,node_controller,node_gestures,node_state toneAmber
class node_renderer,node_shaders,node_simref toneMint
class node_catalog,node_wonders,node_engines,node_vehicles,node_anatomy,node_anatomy2,node_body,node_biology,node_machines toneRose
class node_sampling,node_shapes,node_rng,node_vec,node_learner toneIndigo
```

## Components

### Learning experience

- [Explorer app](https://github.com/piyushhjha/nexora/blob/main/src/app.js): `src/app.js`
- [Lessons and quiz](https://github.com/piyushhjha/nexora/blob/main/src/education.js): `src/education.js`
- [Voice commands](https://github.com/piyushhjha/nexora/blob/main/src/features.js): `src/features.js`
- [Speech synthesis](https://github.com/piyushhjha/nexora/blob/main/src/logic/synth.js): `src/logic/synth.js`

### Input and control

- [Hand tracking](https://github.com/piyushhjha/nexora/blob/main/src/hands.js): `src/hands.js`
- [Gesture controller](https://github.com/piyushhjha/nexora/blob/main/src/logic/controller.js): `src/logic/controller.js`
- [Gesture detection](https://github.com/piyushhjha/nexora/blob/main/src/logic/gestures.js): `src/logic/gestures.js`
- [Explorer state](https://github.com/piyushhjha/nexora/blob/main/src/logic/state.js): `src/logic/state.js`

### Particle rendering

- [WebGL renderer](https://github.com/piyushhjha/nexora/blob/main/src/gl/renderer.js): `src/gl/renderer.js`
- [GPU shaders](https://github.com/piyushhjha/nexora/blob/main/src/gl/shaders.js): `src/gl/shaders.js`
- [Particle simulation seeds](https://github.com/piyushhjha/nexora/blob/main/src/logic/simRef.js): `src/logic/simRef.js`

### Educational models

- [Model catalog and buffers](https://github.com/piyushhjha/nexora/blob/main/src/models/catalog.js): `src/models/catalog.js`
- [Wonders](https://github.com/piyushhjha/nexora/blob/main/src/models/wonders.js): `src/models/wonders.js`
- [Engines](https://github.com/piyushhjha/nexora/blob/main/src/models/engines.js): `src/models/engines.js`
- [Vehicles](https://github.com/piyushhjha/nexora/blob/main/src/models/vehicles.js): `src/models/vehicles.js`
- [Anatomy](https://github.com/piyushhjha/nexora/blob/main/src/models/anatomy.js): `src/models/anatomy.js`
- [Additional anatomy](https://github.com/piyushhjha/nexora/blob/main/src/models/anatomy2.js): `src/models/anatomy2.js`
- [Body models](https://github.com/piyushhjha/nexora/blob/main/src/models/body.js): `src/models/body.js`
- [Biology models](https://github.com/piyushhjha/nexora/blob/main/src/models/biology.js): `src/models/biology.js`
- [Machines](https://github.com/piyushhjha/nexora/blob/main/src/models/machines.js): `src/models/machines.js`

### Geometry utilities

- [Shape sampling](https://github.com/piyushhjha/nexora/blob/main/src/lib/sampling.js): `src/lib/sampling.js`
- [Organic shape helpers](https://github.com/piyushhjha/nexora/blob/main/src/lib/shapes.js): `src/lib/shapes.js`
- [Deterministic randomness](https://github.com/piyushhjha/nexora/blob/main/src/lib/rng.js): `src/lib/rng.js`
- [Vector math](https://github.com/piyushhjha/nexora/blob/main/src/lib/vec.js): `src/lib/vec.js`

### Other components

- **Learner**

## Connections

- Learner → Explorer app: explores models
- Explorer app → Gesture controller: updates gestures (evidence: `src/app.js`)
- Gesture controller → Gesture detection: classifies poses (evidence: `src/logic/controller.js`)
- Gesture controller → Explorer state: updates state (evidence: `src/logic/controller.js`)
- Explorer app → Hand tracking: uses tracking (evidence: `src/app.js`)
- Explorer app → Model catalog and buffers: builds models (evidence: `src/app.js`)
- Explorer app → WebGL renderer: renders scene (evidence: `src/app.js`)
- Explorer app → Voice commands: parses commands (evidence: `src/app.js`)
- Explorer app → Lessons and quiz: uses learning features (evidence: `src/app.js`)
- Explorer app → Speech synthesis: speaks responses (evidence: `src/app.js`)
- WebGL renderer → GPU shaders: uses shaders (evidence: `src/gl/renderer.js`)
- WebGL renderer → Particle simulation seeds: seeds simulation (evidence: `src/gl/renderer.js`)
- WebGL renderer → Deterministic randomness: creates random values (evidence: `src/gl/renderer.js`)
- Model catalog and buffers → Wonders: imports models (evidence: `src/models/catalog.js`)
- Model catalog and buffers → Engines: imports models (evidence: `src/models/catalog.js`)
- Model catalog and buffers → Vehicles: imports models (evidence: `src/models/catalog.js`)
- Model catalog and buffers → Anatomy: imports models (evidence: `src/models/catalog.js`)
- Model catalog and buffers → Additional anatomy: imports models (evidence: `src/models/catalog.js`)
- Model catalog and buffers → Body models: imports models (evidence: `src/models/catalog.js`)
- Model catalog and buffers → Biology models: imports models (evidence: `src/models/catalog.js`)
- Model catalog and buffers → Machines: imports models (evidence: `src/models/catalog.js`)
- Model catalog and buffers → Shape sampling: samples model points (evidence: `src/models/catalog.js`)
- Engines → Shape sampling: builds geometry (evidence: `src/models/engines.js`)
- Engines → Vector math: uses vector math (evidence: `src/models/engines.js`)
- Machines → Engines: reuses parts (evidence: `src/models/machines.js`)
- Machines → Organic shape helpers: uses shape helpers (evidence: `src/models/machines.js`)
- Shape sampling → Deterministic randomness: samples deterministically (evidence: `src/lib/sampling.js`)
- Shape sampling → Vector math: uses vector math (evidence: `src/lib/sampling.js`)
- Organic shape helpers → Shape sampling: builds primitives (evidence: `src/lib/shapes.js`)
- Organic shape helpers → Vector math: uses vector math (evidence: `src/lib/shapes.js`)
