# ybenyedder/volt-maps architecture

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

- Interactive diagram: https://gitdiagram.com/ybenyedder/volt-maps
- Repository: https://github.com/ybenyedder/volt-maps

## Overview

Volt Maps is a local-first mirror for playing Subway Surfers Reborn maps offline. A player opens the local gallery, selects a map and mode, and the launcher serves the game; the server prioritizes bundled files, then disk cache, and uses network fallback only when enabled. Enhanced activation is handled locally, while Pogo and Training provide distinct game-build routes. The README documents these links and capabilities; sampled code confirms server-to-activation dispatch and Pogo support. Several game-page and launcher internals are unsampled, so those relationships rely on README evidence.

Main entry points: [`telechargement/index.html`](https://github.com/ybenyedder/volt-maps/blob/master/telechargement/index.html) (Map gallery), [`serve_localhost.py`](https://github.com/ybenyedder/volt-maps/blob/master/serve_localhost.py) (Local server), [`telechargement/pogo`](https://github.com/ybenyedder/volt-maps/tree/master/telechargement/pogo) (Pogo game pages), [`telechargement/reborn`](https://github.com/ybenyedder/volt-maps/tree/master/telechargement/reborn) (Enhanced game)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Player entry"]
  node_gallery["Map gallery<br/>[index.html]"]
end

subgraph group_runtime["Local runtime"]
  node_webserver["Local server<br/>[serve_localhost.py]"]
  node_sitefiles["Site files"]
  node_diskcache[("Persistent cache")]
  node_activation["Local activation"]
end

subgraph group_modes["Game modes"]
  node_enhanced["Enhanced game"]
  node_pogo["Pogo game pages"]
  node_training["Training builds"]
end

subgraph group_support["Runtime support"]
  node_serviceworker["Asset service worker<br/>[sw.js]"]
  node_pogohelper["Pogo shared support<br/>[commun.js]"]
  node_unityloader["Unity loaders"]
  node_pogo_save["Pogo save injection<br/>[sauvegarde.js]"]
  node_timer["LiveSplit timer<br/>[tro-timer.js]"]
end

node_player(("Player"))
node_upstream(("Network fallback"))

node_player -->|"opens"| node_gallery
node_gallery -->|"requests routes"| node_webserver
node_webserver -->|"serves first"| node_sitefiles
node_webserver -->|"reads or writes"| node_diskcache
node_webserver -.->|"falls back"| node_upstream
node_gallery -->|"launches map"| node_enhanced
node_webserver -->|"dispatches activation"| node_activation
node_activation -->|"replays response"| node_diskcache
node_enhanced -->|"uses assets"| node_serviceworker
node_gallery -->|"offers Pogo mode"| node_pogo
node_pogo -->|"loads before boot"| node_pogohelper
node_pogo -->|"boots Unity"| node_unityloader
node_pogo -->|"injects save"| node_pogo_save
node_gallery -->|"routes Training"| node_training
node_enhanced -->|"loads on game routes"| node_timer

click node_gallery "https://github.com/ybenyedder/volt-maps/blob/master/telechargement/index.html"
click node_webserver "https://github.com/ybenyedder/volt-maps/blob/master/serve_localhost.py"
click node_sitefiles "https://github.com/ybenyedder/volt-maps/tree/master/telechargement"
click node_enhanced "https://github.com/ybenyedder/volt-maps/tree/master/telechargement/reborn"
click node_activation "https://github.com/ybenyedder/volt-maps/blob/master/activation_locale.py"
click node_serviceworker "https://github.com/ybenyedder/volt-maps/blob/master/telechargement/sw.js"
click node_pogo "https://github.com/ybenyedder/volt-maps/tree/master/telechargement/pogo"
click node_pogohelper "https://github.com/ybenyedder/volt-maps/blob/master/telechargement/pogo/commun.js"
click node_unityloader "https://github.com/ybenyedder/volt-maps/tree/master/telechargement/pogo/unity"
click node_pogo_save "https://github.com/ybenyedder/volt-maps/blob/master/telechargement/pogo/sauvegarde.js"
click node_training "https://github.com/ybenyedder/volt-maps/tree/master/telechargement"
click node_timer "https://github.com/ybenyedder/volt-maps/blob/master/telechargement/tro-timer.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_gallery toneBlue
class node_webserver,node_sitefiles,node_diskcache,node_activation toneAmber
class node_enhanced,node_pogo,node_training toneMint
class node_serviceworker,node_pogohelper,node_unityloader,node_pogo_save,node_timer toneRose
class node_player,node_upstream toneIndigo
```

## Components

### Player entry

- [Map gallery](https://github.com/ybenyedder/volt-maps/blob/master/telechargement/index.html): `telechargement/index.html`

### Local runtime

- [Local server](https://github.com/ybenyedder/volt-maps/blob/master/serve_localhost.py): `serve_localhost.py`
- [Site files](https://github.com/ybenyedder/volt-maps/tree/master/telechargement): `telechargement`
- **Persistent cache**
- [Local activation](https://github.com/ybenyedder/volt-maps/blob/master/activation_locale.py): `activation_locale.py`

### Game modes

- [Enhanced game](https://github.com/ybenyedder/volt-maps/tree/master/telechargement/reborn): `telechargement/reborn`
- [Pogo game pages](https://github.com/ybenyedder/volt-maps/tree/master/telechargement/pogo): `telechargement/pogo`
- [Training builds](https://github.com/ybenyedder/volt-maps/tree/master/telechargement): `telechargement`

### Runtime support

- [Asset service worker](https://github.com/ybenyedder/volt-maps/blob/master/telechargement/sw.js): `telechargement/sw.js`
- [Pogo shared support](https://github.com/ybenyedder/volt-maps/blob/master/telechargement/pogo/commun.js): `telechargement/pogo/commun.js`
- [Unity loaders](https://github.com/ybenyedder/volt-maps/tree/master/telechargement/pogo/unity): `telechargement/pogo/unity`
- [Pogo save injection](https://github.com/ybenyedder/volt-maps/blob/master/telechargement/pogo/sauvegarde.js): `telechargement/pogo/sauvegarde.js`
- [LiveSplit timer](https://github.com/ybenyedder/volt-maps/blob/master/telechargement/tro-timer.js): `telechargement/tro-timer.js`

### Other components

- **Player**
- **Network fallback**

## Connections

- Player → Map gallery: opens (evidence: `README.md`)
- Map gallery → Local server: requests routes (evidence: `README.md`)
- Local server → Site files: serves first (evidence: `README.md`)
- Local server → Persistent cache: reads or writes (evidence: `README.md`)
- Local server → Network fallback: falls back (evidence: `README.md`)
- Map gallery → Enhanced game: launches map (evidence: `README.md`)
- Local server → Local activation: dispatches activation (evidence: `serve_localhost.py`)
- Local activation → Persistent cache: replays response (evidence: `README.md`)
- Enhanced game → Asset service worker: uses assets (evidence: `README.md`)
- Map gallery → Pogo game pages: offers Pogo mode (evidence: `README.md`)
- Pogo game pages → Pogo shared support: loads before boot (evidence: `telechargement/pogo/commun.js`)
- Pogo game pages → Unity loaders: boots Unity (evidence: `README.md`)
- Pogo game pages → Pogo save injection: injects save (evidence: `README.md`)
- Map gallery → Training builds: routes Training (evidence: `README.md`)
- Enhanced game → LiveSplit timer: loads on game routes (evidence: `README.md`)
