# lakxhana/jelasverse architecture

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

- Interactive diagram: https://gitdiagram.com/lakxhana/jelasverse
- Repository: https://github.com/lakxhana/jelasverse

## Overview

Orbit Runner is a browser-based educational space game: learners choose a route, fly to a planet, land at a school, and explore learning activities. Its primary runtime is the game engine and page UI; separate Maths and Science Lab pages extend the learning experience. Learner progress and event support live in the shared data module, while a teacher dashboard offers a prototype progress view. The optional phone controller bridges live button input over the local network. Lab internals and some dashboard wiring are bundled or unsampled, so links to those internals are omitted.

Main entry points: [`jelasverse-data.js`](https://github.com/lakxhana/jelasverse/blob/main/jelasverse-data.js) (Learning data), [`src/OrbitRunnerGame.js`](https://github.com/lakxhana/jelasverse/blob/main/src/OrbitRunnerGame.js) (Game engine), [`index.html`](https://github.com/lakxhana/jelasverse/blob/main/index.html) (Game interface), [`src/main.js`](https://github.com/lakxhana/jelasverse/blob/main/src/main.js) (Game bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gameplay["Game experience"]
  node_gameui["Game interface<br/>[index.html]"]
  node_bootstrap["Game bootstrap<br/>[main.js]"]
  node_engine["Game engine<br/>[OrbitRunnerGame.js]"]
  node_translation["Game language"]
end

subgraph group_learning["Learning activities"]
  node_mathlab["Maths Lab"]
  node_mathcustom["Maths integration<br/>[customization.js]"]
  node_sciencelab["Science Lab"]
  node_sciencecustom["Science integration"]
end

subgraph group_data["Learner data"]
  node_datamodule["Learning data<br/>[jelasverse-data.js]"]
  node_studentgate["Learner session<br/>[student-gate.js]"]
  node_browserstore[("Browser storage")]
  node_firestore[("Firebase data")]
end

subgraph group_access["Access and control"]
  node_dashboard["Teacher dashboard"]
  node_controllerpage["Phone controls"]
  node_bridge["Controller bridge"]
end

node_learner(("Learner"))
node_teacher(("Teacher"))
node_phone(("Phone player"))

node_learner -->|"uses"| node_gameui
node_gameui -->|"starts"| node_bootstrap
node_bootstrap -->|"creates"| node_engine
node_learner -->|"plays"| node_engine
node_engine -->|"updates language"| node_translation
node_learner -->|"opens activity"| node_mathlab
node_learner -->|"opens activity"| node_sciencelab
node_mathlab -->|"loads"| node_mathcustom
node_sciencelab -->|"loads"| node_sciencecustom
node_mathcustom -.->|"polls controls"| node_bridge
node_studentgate -->|"starts session"| node_datamodule
node_datamodule -->|"reads and writes"| node_browserstore
node_datamodule -.->|"syncs data"| node_firestore
node_teacher -->|"views progress"| node_dashboard
node_dashboard -->|"reads progress"| node_browserstore
node_phone -->|"presses controls"| node_controllerpage
node_controllerpage -->|"posts input"| node_bridge

click node_gameui "https://github.com/lakxhana/jelasverse/blob/main/index.html"
click node_bootstrap "https://github.com/lakxhana/jelasverse/blob/main/src/main.js"
click node_engine "https://github.com/lakxhana/jelasverse/blob/main/src/OrbitRunnerGame.js"
click node_translation "https://github.com/lakxhana/jelasverse/blob/main/translation-system.js"
click node_mathlab "https://github.com/lakxhana/jelasverse/tree/main/maths-lab"
click node_mathcustom "https://github.com/lakxhana/jelasverse/blob/main/maths-lab/customization.js"
click node_sciencelab "https://github.com/lakxhana/jelasverse/tree/main/science-lab"
click node_sciencecustom "https://github.com/lakxhana/jelasverse/blob/main/science-lab/jelasverse-enhance.js"
click node_datamodule "https://github.com/lakxhana/jelasverse/blob/main/jelasverse-data.js"
click node_studentgate "https://github.com/lakxhana/jelasverse/blob/main/student-gate.js"
click node_dashboard "https://github.com/lakxhana/jelasverse/blob/main/teacher-dashboard.js"
click node_controllerpage "https://github.com/lakxhana/jelasverse/blob/main/phone-controller.html"
click node_bridge "https://github.com/lakxhana/jelasverse/blob/main/phone-controller-server.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_gameui,node_bootstrap,node_engine,node_translation toneBlue
class node_mathlab,node_mathcustom,node_sciencelab,node_sciencecustom toneAmber
class node_datamodule,node_studentgate,node_browserstore,node_firestore toneMint
class node_dashboard,node_controllerpage,node_bridge toneRose
class node_learner,node_teacher,node_phone toneIndigo
```

## Components

### Game experience

- [Game interface](https://github.com/lakxhana/jelasverse/blob/main/index.html): `index.html`
- [Game bootstrap](https://github.com/lakxhana/jelasverse/blob/main/src/main.js): `src/main.js`
- [Game engine](https://github.com/lakxhana/jelasverse/blob/main/src/OrbitRunnerGame.js): `src/OrbitRunnerGame.js`
- [Game language](https://github.com/lakxhana/jelasverse/blob/main/translation-system.js): `translation-system.js`

### Learning activities

- [Maths Lab](https://github.com/lakxhana/jelasverse/tree/main/maths-lab): `maths-lab`
- [Maths integration](https://github.com/lakxhana/jelasverse/blob/main/maths-lab/customization.js): `maths-lab/customization.js`
- [Science Lab](https://github.com/lakxhana/jelasverse/tree/main/science-lab): `science-lab`
- [Science integration](https://github.com/lakxhana/jelasverse/blob/main/science-lab/jelasverse-enhance.js): `science-lab/jelasverse-enhance.js`

### Learner data

- [Learning data](https://github.com/lakxhana/jelasverse/blob/main/jelasverse-data.js): `jelasverse-data.js`
- [Learner session](https://github.com/lakxhana/jelasverse/blob/main/student-gate.js): `student-gate.js`
- **Browser storage**
- **Firebase data**

### Access and control

- [Teacher dashboard](https://github.com/lakxhana/jelasverse/blob/main/teacher-dashboard.js): `teacher-dashboard.js`
- [Phone controls](https://github.com/lakxhana/jelasverse/blob/main/phone-controller.html): `phone-controller.html`
- [Controller bridge](https://github.com/lakxhana/jelasverse/blob/main/phone-controller-server.js): `phone-controller-server.js`

### Other components

- **Learner**
- **Teacher**
- **Phone player**

## Connections

- Learner → Game interface: uses
- Game interface → Game bootstrap: starts
- Game bootstrap → Game engine: creates
- Learner → Game engine: plays
- Game engine → Game language: updates language
- Learner → Maths Lab: opens activity
- Learner → Science Lab: opens activity
- Maths Lab → Maths integration: loads
- Science Lab → Science integration: loads
- Maths integration → Controller bridge: polls controls
- Learner session → Learning data: starts session
- Learning data → Browser storage: reads and writes
- Learning data → Firebase data: syncs data
- Teacher → Teacher dashboard: views progress
- Teacher dashboard → Browser storage: reads progress
- Phone player → Phone controls: presses controls
- Phone controls → Controller bridge: posts input
