# vyslbysl/bimola architecture

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

- Interactive diagram: https://gitdiagram.com/vyslbysl/bimola
- Repository: https://github.com/vyslbysl/bimola

## Overview

BiMola is a browser-based multiplayer game lobby with four games. Players browse or join rooms, then play through game-specific clients connected to isolated server adapters and rules; the platform owns room lifecycle, routing, and broadcasts. The graph preserves each game’s distinct gameplay and major documented features, plus persistent scoring. Edges are limited to relationships shown in excerpts, the SOURCE INDEX, or README; unsampled subsystems are represented by their supported directory paths without inferred internal calls.

Main entry points: [`server/platform/runtime.js`](https://github.com/vyslbysl/bimola/blob/main/server/platform/runtime.js) (Room runtime), [`server.js`](https://github.com/vyslbysl/bimola/blob/main/server.js) (HTTP and Socket.IO server), [`public/platform/profile.js`](https://github.com/vyslbysl/bimola/blob/main/public/platform/profile.js) (Player name), [`public/games/prop-hunt/app.js`](https://github.com/vyslbysl/bimola/blob/main/public/games/prop-hunt/app.js) (Game screens and controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_platform["Lobby and platform"]
  node_lobby["Lobby and rooms<br/>[lobby.js]"]
  node_profile["Player name<br/>[profile.js]"]
  node_http["HTTP and Socket.IO server<br/>[server.js]"]
  node_catalog["Game catalog<br/>[registry.js]"]
  node_runtime["Room runtime<br/>[runtime.js]"]
  node_platformregistry["Platform registry<br/>[registry.js]"]
  node_scores[("Persistent scores<br/>[scores.js]")]
end

subgraph group_servergames["Game server systems"]
  node_propadapter["Room adapter<br/>[adapter.js]"]
  node_proprules["Round and hunt rules<br/>[game.js]"]
  node_bridgeadapter["Room adapter<br/>[adapter.js]"]
  node_bridgerules["Quiz rules<br/>[game.js]"]
  node_snakeadapter["Room adapter<br/>[adapter.js]"]
  node_snakerules["Snake arena rules<br/>[game.js]"]
  node_cengeladapter["Room adapter<br/>[adapter.js]"]
  node_cengelrules["Word game rules<br/>[game.js]"]
  node_cengelpool[("Prepared board pool<br/>[pool.js]")]
end

subgraph group_prop["Nesne Avı"]
  node_propclient["Game screens and controls<br/>[app.js]"]
  node_propworld["Maps and world geometry<br/>[world.js]"]
  node_propscene["3D scene<br/>[scene.js]"]
end

subgraph group_bridge["Ateş Köprüsü"]
  node_bridgeclient["Quiz screens and play<br/>[app.js]"]
  node_bridgequestions["Question sets<br/>[questions.js]"]
  node_bridgescene["Bridge scene<br/>[scene.js]"]
end

subgraph group_snake["Yılan Meydanı"]
  node_snakeclient["Arena screens and input<br/>[main.js]"]
  node_snake3d["3D arena rendering<br/>[scene3d.js]"]
  node_snakemath["Arena geometry<br/>[sceneMath.js]"]
end

subgraph group_cengel["Çengel Kapışması"]
  node_cengelclient["Puzzle screens and play<br/>[app.js]"]
  node_cengelpuzzle["Shared board validation<br/>[puzzle.js]"]
  node_cengelstarter["Example puzzle<br/>[starter.js]"]
end

node_player(("Player"))

node_player -->|"browses games"| node_lobby
node_lobby -->|"reads player name"| node_profile
node_lobby -->|"requests rooms and catalog"| node_http
node_http -->|"creates catalog"| node_catalog
node_http -->|"creates registry"| node_platformregistry
node_http -->|"creates runtime"| node_runtime
node_http -->|"creates score store"| node_scores
node_runtime -->|"loads game adapters"| node_catalog
node_player -->|"plays"| node_propclient
node_propclient -->|"reads saved name"| node_profile
node_propclient -->|"uses world data"| node_propworld
node_propclient -->|"creates scene"| node_propscene
node_propscene -->|"uses map geometry"| node_propworld
node_runtime -->|"dispatches room events"| node_propadapter
node_propadapter -->|"uses game rules"| node_proprules
node_proprules -->|"uses shared geometry"| node_propworld
node_player -->|"plays quiz"| node_bridgeclient
node_bridgeclient -->|"reads player name"| node_profile
node_bridgeclient -->|"parses question sets"| node_bridgequestions
node_bridgeclient -->|"updates scene state"| node_bridgescene
node_runtime -->|"dispatches room events"| node_bridgeadapter
node_bridgeadapter -->|"uses game rules"| node_bridgerules
node_bridgerules -->|"uses question definitions"| node_bridgequestions
node_player -->|"plays arena"| node_snakeclient
node_snakeclient -->|"reads saved name"| node_profile
node_snakeclient -->|"creates renderer"| node_snake3d
node_snakeclient -->|"uses input geometry"| node_snakemath
node_snake3d -->|"uses arena geometry"| node_snakemath
node_runtime -->|"dispatches room events"| node_snakeadapter
node_snakeadapter -->|"uses game rules"| node_snakerules
node_player -->|"plays word game"| node_cengelclient
node_cengelclient -->|"saves player name"| node_profile
node_cengelclient -->|"validates board"| node_cengelpuzzle
node_cengelclient -->|"loads example puzzle"| node_cengelstarter
node_runtime -->|"dispatches room events"| node_cengeladapter
node_cengeladapter -->|"uses game rules"| node_cengelrules
node_cengelrules -->|"uses board pool"| node_cengelpool
node_cengelpool -->|"uses puzzle validation"| node_cengelpuzzle

click node_lobby "https://github.com/vyslbysl/bimola/blob/main/public/platform/lobby.js"
click node_profile "https://github.com/vyslbysl/bimola/blob/main/public/platform/profile.js"
click node_http "https://github.com/vyslbysl/bimola/blob/main/server.js"
click node_catalog "https://github.com/vyslbysl/bimola/blob/main/server/games/registry.js"
click node_runtime "https://github.com/vyslbysl/bimola/blob/main/server/platform/runtime.js"
click node_platformregistry "https://github.com/vyslbysl/bimola/blob/main/server/platform/registry.js"
click node_scores "https://github.com/vyslbysl/bimola/blob/main/server/platform/scores.js"
click node_propclient "https://github.com/vyslbysl/bimola/blob/main/public/games/prop-hunt/app.js"
click node_propworld "https://github.com/vyslbysl/bimola/blob/main/public/games/prop-hunt/world.js"
click node_propscene "https://github.com/vyslbysl/bimola/blob/main/public/games/prop-hunt/scene.js"
click node_propadapter "https://github.com/vyslbysl/bimola/blob/main/server/games/prop-hunt/adapter.js"
click node_proprules "https://github.com/vyslbysl/bimola/blob/main/server/games/prop-hunt/game.js"
click node_bridgeclient "https://github.com/vyslbysl/bimola/blob/main/public/games/ates-koprusu/app.js"
click node_bridgequestions "https://github.com/vyslbysl/bimola/blob/main/public/games/ates-koprusu/questions.js"
click node_bridgescene "https://github.com/vyslbysl/bimola/blob/main/public/games/ates-koprusu/scene.js"
click node_bridgeadapter "https://github.com/vyslbysl/bimola/blob/main/server/games/ates-koprusu/adapter.js"
click node_bridgerules "https://github.com/vyslbysl/bimola/blob/main/server/games/ates-koprusu/game.js"
click node_snakeclient "https://github.com/vyslbysl/bimola/blob/main/public/games/snake/src/main.js"
click node_snake3d "https://github.com/vyslbysl/bimola/blob/main/public/games/snake/src/scene3d.js"
click node_snakemath "https://github.com/vyslbysl/bimola/blob/main/public/games/snake/src/sceneMath.js"
click node_snakeadapter "https://github.com/vyslbysl/bimola/blob/main/server/games/snake/adapter.js"
click node_snakerules "https://github.com/vyslbysl/bimola/blob/main/server/games/snake/game.js"
click node_cengelclient "https://github.com/vyslbysl/bimola/blob/main/public/games/cengel-kapismasi/app.js"
click node_cengelpuzzle "https://github.com/vyslbysl/bimola/blob/main/public/games/cengel-kapismasi/puzzle.js"
click node_cengelstarter "https://github.com/vyslbysl/bimola/blob/main/public/games/cengel-kapismasi/starter.js"
click node_cengeladapter "https://github.com/vyslbysl/bimola/blob/main/server/games/cengel-kapismasi/adapter.js"
click node_cengelrules "https://github.com/vyslbysl/bimola/blob/main/server/games/cengel-kapismasi/game.js"
click node_cengelpool "https://github.com/vyslbysl/bimola/blob/main/server/games/cengel-kapismasi/pool.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_lobby,node_profile,node_http,node_catalog,node_runtime,node_platformregistry,node_scores toneBlue
class node_propadapter,node_proprules,node_bridgeadapter,node_bridgerules,node_snakeadapter,node_snakerules,node_cengeladapter,node_cengelrules,node_cengelpool toneAmber
class node_propclient,node_propworld,node_propscene toneMint
class node_bridgeclient,node_bridgequestions,node_bridgescene toneRose
class node_snakeclient,node_snake3d,node_snakemath,node_player toneIndigo
class node_cengelclient,node_cengelpuzzle,node_cengelstarter toneTeal
```

## Components

### Lobby and platform

- [Lobby and rooms](https://github.com/vyslbysl/bimola/blob/main/public/platform/lobby.js): `public/platform/lobby.js`
- [Player name](https://github.com/vyslbysl/bimola/blob/main/public/platform/profile.js): `public/platform/profile.js`
- [HTTP and Socket.IO server](https://github.com/vyslbysl/bimola/blob/main/server.js): `server.js`
- [Game catalog](https://github.com/vyslbysl/bimola/blob/main/server/games/registry.js): `server/games/registry.js`
- [Room runtime](https://github.com/vyslbysl/bimola/blob/main/server/platform/runtime.js): `server/platform/runtime.js`
- [Platform registry](https://github.com/vyslbysl/bimola/blob/main/server/platform/registry.js): `server/platform/registry.js`
- [Persistent scores](https://github.com/vyslbysl/bimola/blob/main/server/platform/scores.js): `server/platform/scores.js`

### Game server systems

- [Room adapter](https://github.com/vyslbysl/bimola/blob/main/server/games/prop-hunt/adapter.js): `server/games/prop-hunt/adapter.js`
- [Round and hunt rules](https://github.com/vyslbysl/bimola/blob/main/server/games/prop-hunt/game.js): `server/games/prop-hunt/game.js`
- [Room adapter](https://github.com/vyslbysl/bimola/blob/main/server/games/ates-koprusu/adapter.js): `server/games/ates-koprusu/adapter.js`
- [Quiz rules](https://github.com/vyslbysl/bimola/blob/main/server/games/ates-koprusu/game.js): `server/games/ates-koprusu/game.js`
- [Room adapter](https://github.com/vyslbysl/bimola/blob/main/server/games/snake/adapter.js): `server/games/snake/adapter.js`
- [Snake arena rules](https://github.com/vyslbysl/bimola/blob/main/server/games/snake/game.js): `server/games/snake/game.js`
- [Room adapter](https://github.com/vyslbysl/bimola/blob/main/server/games/cengel-kapismasi/adapter.js): `server/games/cengel-kapismasi/adapter.js`
- [Word game rules](https://github.com/vyslbysl/bimola/blob/main/server/games/cengel-kapismasi/game.js): `server/games/cengel-kapismasi/game.js`
- [Prepared board pool](https://github.com/vyslbysl/bimola/blob/main/server/games/cengel-kapismasi/pool.js): `server/games/cengel-kapismasi/pool.js`

### Nesne Avı

- [Game screens and controls](https://github.com/vyslbysl/bimola/blob/main/public/games/prop-hunt/app.js): `public/games/prop-hunt/app.js`
- [Maps and world geometry](https://github.com/vyslbysl/bimola/blob/main/public/games/prop-hunt/world.js): `public/games/prop-hunt/world.js`
- [3D scene](https://github.com/vyslbysl/bimola/blob/main/public/games/prop-hunt/scene.js): `public/games/prop-hunt/scene.js`

### Ateş Köprüsü

- [Quiz screens and play](https://github.com/vyslbysl/bimola/blob/main/public/games/ates-koprusu/app.js): `public/games/ates-koprusu/app.js`
- [Question sets](https://github.com/vyslbysl/bimola/blob/main/public/games/ates-koprusu/questions.js): `public/games/ates-koprusu/questions.js`
- [Bridge scene](https://github.com/vyslbysl/bimola/blob/main/public/games/ates-koprusu/scene.js): `public/games/ates-koprusu/scene.js`

### Yılan Meydanı

- [Arena screens and input](https://github.com/vyslbysl/bimola/blob/main/public/games/snake/src/main.js): `public/games/snake/src/main.js`
- [3D arena rendering](https://github.com/vyslbysl/bimola/blob/main/public/games/snake/src/scene3d.js): `public/games/snake/src/scene3d.js`
- [Arena geometry](https://github.com/vyslbysl/bimola/blob/main/public/games/snake/src/sceneMath.js): `public/games/snake/src/sceneMath.js`

### Çengel Kapışması

- [Puzzle screens and play](https://github.com/vyslbysl/bimola/blob/main/public/games/cengel-kapismasi/app.js): `public/games/cengel-kapismasi/app.js`
- [Shared board validation](https://github.com/vyslbysl/bimola/blob/main/public/games/cengel-kapismasi/puzzle.js): `public/games/cengel-kapismasi/puzzle.js`
- [Example puzzle](https://github.com/vyslbysl/bimola/blob/main/public/games/cengel-kapismasi/starter.js): `public/games/cengel-kapismasi/starter.js`

### Other components

- **Player**

## Connections

- Player → Lobby and rooms: browses games
- Lobby and rooms → Player name: reads player name (evidence: `public/platform/lobby.js`)
- Lobby and rooms → HTTP and Socket.IO server: requests rooms and catalog
- HTTP and Socket.IO server → Game catalog: creates catalog (evidence: `server.js`)
- HTTP and Socket.IO server → Platform registry: creates registry (evidence: `server.js`)
- HTTP and Socket.IO server → Room runtime: creates runtime (evidence: `server.js`)
- HTTP and Socket.IO server → Persistent scores: creates score store (evidence: `server.js`)
- Room runtime → Game catalog: loads game adapters (evidence: `server/platform/runtime.js`)
- Player → Game screens and controls: plays
- Game screens and controls → Player name: reads saved name (evidence: `public/games/prop-hunt/app.js`)
- Game screens and controls → Maps and world geometry: uses world data (evidence: `public/games/prop-hunt/app.js`)
- Game screens and controls → 3D scene: creates scene (evidence: `public/games/prop-hunt/app.js`)
- 3D scene → Maps and world geometry: uses map geometry (evidence: `public/games/prop-hunt/scene.js`)
- Room runtime → Room adapter: dispatches room events (evidence: `server/platform/runtime.js`)
- Room adapter → Round and hunt rules: uses game rules (evidence: `server/games/prop-hunt/adapter.js`)
- Round and hunt rules → Maps and world geometry: uses shared geometry (evidence: `server/games/prop-hunt/game.js`)
- Player → Quiz screens and play: plays quiz
- Quiz screens and play → Player name: reads player name (evidence: `public/games/ates-koprusu/app.js`)
- Quiz screens and play → Question sets: parses question sets (evidence: `public/games/ates-koprusu/app.js`)
- Quiz screens and play → Bridge scene: updates scene state (evidence: `public/games/ates-koprusu/app.js`)
- Room runtime → Room adapter: dispatches room events (evidence: `server/platform/runtime.js`)
- Room adapter → Quiz rules: uses game rules (evidence: `server/games/ates-koprusu/adapter.js`)
- Quiz rules → Question sets: uses question definitions (evidence: `server/games/ates-koprusu/game.js`)
- Player → Arena screens and input: plays arena
- Arena screens and input → Player name: reads saved name (evidence: `public/games/snake/src/main.js`)
- Arena screens and input → 3D arena rendering: creates renderer (evidence: `public/games/snake/src/main.js`)
- Arena screens and input → Arena geometry: uses input geometry (evidence: `public/games/snake/src/main.js`)
- 3D arena rendering → Arena geometry: uses arena geometry (evidence: `public/games/snake/src/scene3d.js`)
- Room runtime → Room adapter: dispatches room events (evidence: `server/platform/runtime.js`)
- Room adapter → Snake arena rules: uses game rules (evidence: `server/games/snake/adapter.js`)
- Player → Puzzle screens and play: plays word game
- Puzzle screens and play → Player name: saves player name (evidence: `public/games/cengel-kapismasi/app.js`)
- Puzzle screens and play → Shared board validation: validates board (evidence: `public/games/cengel-kapismasi/app.js`)
- Puzzle screens and play → Example puzzle: loads example puzzle (evidence: `public/games/cengel-kapismasi/app.js`)
- Room runtime → Room adapter: dispatches room events (evidence: `server/platform/runtime.js`)
- Room adapter → Word game rules: uses game rules (evidence: `server/games/cengel-kapismasi/adapter.js`)
- Word game rules → Prepared board pool: uses board pool (evidence: `server/games/cengel-kapismasi/game.js`)
- Prepared board pool → Shared board validation: uses puzzle validation (evidence: `server/games/cengel-kapismasi/pool.js`)
