# mikapao/world-of-mikha architecture

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

- Interactive diagram: https://gitdiagram.com/mikapao/world-of-mikha
- Repository: https://github.com/mikapao/world-of-mikha

## Overview

World of Mikha is a calm, exploratory learning game for Android tablets and browsers. The player chooses an avatar, walks between themed islands, enters one of five monuments for a short challenge, and can return to the island; the game records visits and exposes trophies and parent settings. The map separates startup/game-loop orchestration, world construction, monument activities, and shared interaction services. README-described question updates and voice clips are retained as capabilities, but their runtime wiring is not established by the sampled excerpts, so those relationships are omitted.

Main entry points: [`src/main.js`](https://github.com/mikapao/world-of-mikha/blob/main/src/main.js) (Game orchestrator), [`src/ui/shell.js`](https://github.com/mikapao/world-of-mikha/blob/main/src/ui/shell.js) (Challenge window), [`src/monuments/index.js`](https://github.com/mikapao/world-of-mikha/blob/main/src/monuments/index.js) (Monument registry), [`src/ui/parent.js`](https://github.com/mikapao/world-of-mikha/blob/main/src/ui/parent.js) (Parent corner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Game runtime"]
  node_main["Game orchestrator<br/>[main.js]"]
  node_engine["3D engine<br/>[engine.js]"]
end

subgraph group_world["Explorable world"]
  node_layout["World layout<br/>[layout.js]"]
  node_home["Home island<br/>[homeIsland.js]"]
  node_bridges["Island bridges<br/>[bridge.js]"]
  node_crystal["Crystal Isle<br/>[crystalIsle.js]"]
  node_winter["Winter Wonderland<br/>[winterIsle.js]"]
  node_candy["Candy island<br/>[candyIsle.js]"]
  node_meadow["Firefly meadow<br/>[meadowIsle.js]"]
  node_lighting["Lighting moods<br/>[lighting.js]"]
end

subgraph group_activities["Learning activities"]
  node_monument_registry["Monument registry<br/>[index.js]"]
  node_waterfall["Counting Waterfall"]
  node_singing["Singing Stone<br/>[singingStone.js]"]
  node_snowman["Memory Snowman<br/>[snowman.js]"]
  node_lollipop["Giant Lollipop<br/>[lollipop.js]"]
  node_firefly["Firefly Pond<br/>[fireflyPond.js]"]
end

subgraph group_experience["Player experience"]
  node_challenge_shell["Challenge window<br/>[shell.js]"]
  node_parent_corner["Parent corner<br/>[parent.js]"]
  node_trophies["Trophy shelf<br/>[trophies.js]"]
  node_avatar_picker["Avatar picker<br/>[picker.js]"]
  node_avatars["Avatar builders<br/>[index.js]"]
  node_player_motion["Avatar movement<br/>[player.js]"]
  node_controls["Touch controls<br/>[controls.js]"]
end

subgraph group_services["Shared services"]
  node_content["Question updates<br/>[content.js]"]
  node_storage[("Visit history<br/>[storage.js]")]
  node_speech["Speech playback<br/>[speech.js]"]
  node_microphone["Microphone input<br/>[mic.js]"]
  node_music["Background music<br/>[music.js]"]
  node_sound["Sound effects<br/>[sound.js]"]
  node_settings["Brightness settings<br/>[settings.js]"]
end

node_player(("Child player"))

node_player -->|"plays"| node_main
node_main -->|"initializes"| node_engine
node_main -->|"creates"| node_monument_registry
node_main -->|"builds"| node_home
node_main -->|"builds"| node_bridges
node_main -->|"builds"| node_crystal
node_main -->|"builds"| node_candy
node_main -->|"builds"| node_meadow
node_main -->|"updates"| node_lighting
node_main -->|"reads movement"| node_controls
node_main -->|"updates"| node_player_motion
node_main -.->|"loads questions"| node_content
node_main -.->|"opens challenge"| node_challenge_shell
node_main -->|"saves visits"| node_storage
node_main -->|"awards trophies"| node_trophies
node_main -->|"sets up"| node_parent_corner
node_main -->|"shows"| node_avatar_picker
node_main -->|"speaks"| node_speech
node_main -->|"starts"| node_music
node_main -->|"plays effects"| node_sound
node_main -->|"updates"| node_winter
node_main -.->|"uses coordinates"| node_layout
node_controls -->|"uses"| node_engine
node_controls -->|"steers"| node_player_motion
node_player_motion -->|"uses"| node_engine
node_player_motion -->|"builds avatar"| node_avatars
node_player_motion -->|"plays footsteps"| node_sound
node_avatar_picker -->|"lists avatars"| node_avatars
node_parent_corner -->|"reads history"| node_storage
node_parent_corner -->|"calibrates"| node_microphone
node_parent_corner -->|"chooses voice"| node_speech
node_parent_corner -->|"adjusts brightness"| node_settings
node_monument_registry -->|"creates"| node_waterfall
node_monument_registry -->|"creates"| node_singing
node_monument_registry -->|"creates"| node_snowman
node_monument_registry -->|"creates"| node_lollipop
node_monument_registry -->|"creates"| node_firefly
node_waterfall -->|"renders challenge"| node_challenge_shell
node_singing -->|"renders challenge"| node_challenge_shell
node_snowman -->|"renders challenge"| node_challenge_shell
node_lollipop -->|"renders challenge"| node_challenge_shell
node_firefly -->|"renders challenge"| node_challenge_shell
node_singing -->|"uses input"| node_microphone
node_waterfall -->|"records score"| node_storage
node_snowman -->|"records score"| node_storage
node_lollipop -->|"records score"| node_storage
node_challenge_shell -->|"stops speech"| node_speech
node_lighting -->|"changes lights"| node_engine

click node_main "https://github.com/mikapao/world-of-mikha/blob/main/src/main.js"
click node_engine "https://github.com/mikapao/world-of-mikha/blob/main/src/engine.js"
click node_layout "https://github.com/mikapao/world-of-mikha/blob/main/src/world/layout.js"
click node_home "https://github.com/mikapao/world-of-mikha/blob/main/src/world/homeIsland.js"
click node_bridges "https://github.com/mikapao/world-of-mikha/blob/main/src/world/bridge.js"
click node_crystal "https://github.com/mikapao/world-of-mikha/blob/main/src/world/crystalIsle.js"
click node_winter "https://github.com/mikapao/world-of-mikha/blob/main/src/world/winterIsle.js"
click node_candy "https://github.com/mikapao/world-of-mikha/blob/main/src/world/candyIsle.js"
click node_meadow "https://github.com/mikapao/world-of-mikha/blob/main/src/world/meadowIsle.js"
click node_lighting "https://github.com/mikapao/world-of-mikha/blob/main/src/world/lighting.js"
click node_monument_registry "https://github.com/mikapao/world-of-mikha/blob/main/src/monuments/index.js"
click node_waterfall "https://github.com/mikapao/world-of-mikha/blob/main/src/monuments/countingWaterfall.js"
click node_singing "https://github.com/mikapao/world-of-mikha/blob/main/src/monuments/singingStone.js"
click node_snowman "https://github.com/mikapao/world-of-mikha/blob/main/src/monuments/snowman.js"
click node_lollipop "https://github.com/mikapao/world-of-mikha/blob/main/src/monuments/lollipop.js"
click node_firefly "https://github.com/mikapao/world-of-mikha/blob/main/src/monuments/fireflyPond.js"
click node_challenge_shell "https://github.com/mikapao/world-of-mikha/blob/main/src/ui/shell.js"
click node_parent_corner "https://github.com/mikapao/world-of-mikha/blob/main/src/ui/parent.js"
click node_trophies "https://github.com/mikapao/world-of-mikha/blob/main/src/ui/trophies.js"
click node_avatar_picker "https://github.com/mikapao/world-of-mikha/blob/main/src/ui/picker.js"
click node_avatars "https://github.com/mikapao/world-of-mikha/blob/main/src/avatars/index.js"
click node_player_motion "https://github.com/mikapao/world-of-mikha/blob/main/src/player.js"
click node_controls "https://github.com/mikapao/world-of-mikha/blob/main/src/controls.js"
click node_content "https://github.com/mikapao/world-of-mikha/blob/main/src/content.js"
click node_storage "https://github.com/mikapao/world-of-mikha/blob/main/src/storage.js"
click node_speech "https://github.com/mikapao/world-of-mikha/blob/main/src/speech.js"
click node_microphone "https://github.com/mikapao/world-of-mikha/blob/main/src/mic.js"
click node_music "https://github.com/mikapao/world-of-mikha/blob/main/src/music.js"
click node_sound "https://github.com/mikapao/world-of-mikha/blob/main/src/sound.js"
click node_settings "https://github.com/mikapao/world-of-mikha/blob/main/src/settings.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_main,node_engine toneBlue
class node_layout,node_home,node_bridges,node_crystal,node_winter,node_candy,node_meadow,node_lighting toneAmber
class node_monument_registry,node_waterfall,node_singing,node_snowman,node_lollipop,node_firefly toneMint
class node_challenge_shell,node_parent_corner,node_trophies,node_avatar_picker,node_avatars,node_player_motion,node_controls toneRose
class node_content,node_storage,node_speech,node_microphone,node_music,node_sound,node_settings,node_player toneIndigo
```

## Components

### Game runtime

- [Game orchestrator](https://github.com/mikapao/world-of-mikha/blob/main/src/main.js): `src/main.js`
- [3D engine](https://github.com/mikapao/world-of-mikha/blob/main/src/engine.js): `src/engine.js`

### Explorable world

- [World layout](https://github.com/mikapao/world-of-mikha/blob/main/src/world/layout.js): `src/world/layout.js`
- [Home island](https://github.com/mikapao/world-of-mikha/blob/main/src/world/homeIsland.js): `src/world/homeIsland.js`
- [Island bridges](https://github.com/mikapao/world-of-mikha/blob/main/src/world/bridge.js): `src/world/bridge.js`
- [Crystal Isle](https://github.com/mikapao/world-of-mikha/blob/main/src/world/crystalIsle.js): `src/world/crystalIsle.js`
- [Winter Wonderland](https://github.com/mikapao/world-of-mikha/blob/main/src/world/winterIsle.js): `src/world/winterIsle.js`
- [Candy island](https://github.com/mikapao/world-of-mikha/blob/main/src/world/candyIsle.js): `src/world/candyIsle.js`
- [Firefly meadow](https://github.com/mikapao/world-of-mikha/blob/main/src/world/meadowIsle.js): `src/world/meadowIsle.js`
- [Lighting moods](https://github.com/mikapao/world-of-mikha/blob/main/src/world/lighting.js): `src/world/lighting.js`

### Learning activities

- [Monument registry](https://github.com/mikapao/world-of-mikha/blob/main/src/monuments/index.js): `src/monuments/index.js`
- [Counting Waterfall](https://github.com/mikapao/world-of-mikha/blob/main/src/monuments/countingWaterfall.js): `src/monuments/countingWaterfall.js`
- [Singing Stone](https://github.com/mikapao/world-of-mikha/blob/main/src/monuments/singingStone.js): `src/monuments/singingStone.js`
- [Memory Snowman](https://github.com/mikapao/world-of-mikha/blob/main/src/monuments/snowman.js): `src/monuments/snowman.js`
- [Giant Lollipop](https://github.com/mikapao/world-of-mikha/blob/main/src/monuments/lollipop.js): `src/monuments/lollipop.js`
- [Firefly Pond](https://github.com/mikapao/world-of-mikha/blob/main/src/monuments/fireflyPond.js): `src/monuments/fireflyPond.js`

### Player experience

- [Challenge window](https://github.com/mikapao/world-of-mikha/blob/main/src/ui/shell.js): `src/ui/shell.js`
- [Parent corner](https://github.com/mikapao/world-of-mikha/blob/main/src/ui/parent.js): `src/ui/parent.js`
- [Trophy shelf](https://github.com/mikapao/world-of-mikha/blob/main/src/ui/trophies.js): `src/ui/trophies.js`
- [Avatar picker](https://github.com/mikapao/world-of-mikha/blob/main/src/ui/picker.js): `src/ui/picker.js`
- [Avatar builders](https://github.com/mikapao/world-of-mikha/blob/main/src/avatars/index.js): `src/avatars/index.js`
- [Avatar movement](https://github.com/mikapao/world-of-mikha/blob/main/src/player.js): `src/player.js`
- [Touch controls](https://github.com/mikapao/world-of-mikha/blob/main/src/controls.js): `src/controls.js`

### Shared services

- [Question updates](https://github.com/mikapao/world-of-mikha/blob/main/src/content.js): `src/content.js`
- [Visit history](https://github.com/mikapao/world-of-mikha/blob/main/src/storage.js): `src/storage.js`
- [Speech playback](https://github.com/mikapao/world-of-mikha/blob/main/src/speech.js): `src/speech.js`
- [Microphone input](https://github.com/mikapao/world-of-mikha/blob/main/src/mic.js): `src/mic.js`
- [Background music](https://github.com/mikapao/world-of-mikha/blob/main/src/music.js): `src/music.js`
- [Sound effects](https://github.com/mikapao/world-of-mikha/blob/main/src/sound.js): `src/sound.js`
- [Brightness settings](https://github.com/mikapao/world-of-mikha/blob/main/src/settings.js): `src/settings.js`

### Other components

- **Child player**

## Connections

- Child player → Game orchestrator: plays (evidence: `README.md`)
- Game orchestrator → 3D engine: initializes (evidence: `src/main.js`)
- Game orchestrator → Monument registry: creates (evidence: `src/main.js`)
- Game orchestrator → Home island: builds (evidence: `src/main.js`)
- Game orchestrator → Island bridges: builds (evidence: `src/main.js`)
- Game orchestrator → Crystal Isle: builds (evidence: `src/main.js`)
- Game orchestrator → Candy island: builds (evidence: `src/main.js`)
- Game orchestrator → Firefly meadow: builds (evidence: `src/main.js`)
- Game orchestrator → Lighting moods: updates (evidence: `src/main.js`)
- Game orchestrator → Touch controls: reads movement (evidence: `src/main.js`)
- Game orchestrator → Avatar movement: updates (evidence: `src/main.js`)
- Game orchestrator → Question updates: loads questions (evidence: `src/main.js`)
- Game orchestrator → Challenge window: opens challenge (evidence: `src/main.js`)
- Game orchestrator → Visit history: saves visits (evidence: `src/main.js`)
- Game orchestrator → Trophy shelf: awards trophies (evidence: `src/main.js`)
- Game orchestrator → Parent corner: sets up (evidence: `src/main.js`)
- Game orchestrator → Avatar picker: shows (evidence: `src/main.js`)
- Game orchestrator → Speech playback: speaks (evidence: `src/main.js`)
- Game orchestrator → Background music: starts (evidence: `src/main.js`)
- Game orchestrator → Sound effects: plays effects (evidence: `src/main.js`)
- Game orchestrator → Winter Wonderland: updates (evidence: `src/main.js`)
- Game orchestrator → World layout: uses coordinates (evidence: `src/main.js`)
- Touch controls → 3D engine: uses (evidence: `src/controls.js`)
- Touch controls → Avatar movement: steers (evidence: `src/controls.js`)
- Avatar movement → 3D engine: uses (evidence: `src/player.js`)
- Avatar movement → Avatar builders: builds avatar (evidence: `src/player.js`)
- Avatar movement → Sound effects: plays footsteps (evidence: `src/player.js`)
- Avatar picker → Avatar builders: lists avatars (evidence: `src/ui/picker.js`)
- Parent corner → Visit history: reads history (evidence: `src/ui/parent.js`)
- Parent corner → Microphone input: calibrates (evidence: `src/ui/parent.js`)
- Parent corner → Speech playback: chooses voice (evidence: `src/ui/parent.js`)
- Parent corner → Brightness settings: adjusts brightness (evidence: `src/ui/parent.js`)
- Monument registry → Counting Waterfall: creates (evidence: `src/monuments/index.js`)
- Monument registry → Singing Stone: creates (evidence: `src/monuments/index.js`)
- Monument registry → Memory Snowman: creates (evidence: `src/monuments/index.js`)
- Monument registry → Giant Lollipop: creates (evidence: `src/monuments/index.js`)
- Monument registry → Firefly Pond: creates (evidence: `src/monuments/index.js`)
- Counting Waterfall → Challenge window: renders challenge (evidence: `src/monuments/countingWaterfall.js`)
- Singing Stone → Challenge window: renders challenge (evidence: `src/monuments/singingStone.js`)
- Memory Snowman → Challenge window: renders challenge (evidence: `src/monuments/snowman.js`)
- Giant Lollipop → Challenge window: renders challenge (evidence: `src/monuments/lollipop.js`)
- Firefly Pond → Challenge window: renders challenge (evidence: `src/monuments/fireflyPond.js`)
- Singing Stone → Microphone input: uses input (evidence: `src/monuments/singingStone.js`)
- Counting Waterfall → Visit history: records score (evidence: `src/monuments/countingWaterfall.js`)
- Memory Snowman → Visit history: records score (evidence: `src/monuments/snowman.js`)
- Giant Lollipop → Visit history: records score (evidence: `src/monuments/lollipop.js`)
- Challenge window → Speech playback: stops speech (evidence: `src/ui/shell.js`)
- Lighting moods → 3D engine: changes lights (evidence: `src/world/lighting.js`)
