# herchelleanne48-max/neon-dash architecture

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

- Interactive diagram: https://gitdiagram.com/herchelleanne48-max/neon-dash
- Repository: https://github.com/herchelleanne48-max/neon-dash

## Overview

Neon Dash is a browser-based rhythm platform game. The player enters through the menu and level selection, starts a run, times jumps to the beat while avoiding obstacles and collecting coins, then receives progress and score updates. Supporting branches include generated level layouts, profile and progression persistence, cosmetic skins, canvas rendering, backgrounds, and synthesized audio. The excerpts show key runtime calls, but not all UI handlers or result-screen behavior, so those links are omitted where unverified.

Main entry points: [`game.js`](https://github.com/herchelleanne48-max/neon-dash/blob/main/game.js) (Run Mechanics), [`main.js`](https://github.com/herchelleanne48-max/neon-dash/blob/main/main.js) (Game Loop), [`ui.js`](https://github.com/herchelleanne48-max/neon-dash/blob/main/ui.js) (Menus & HUD), [`core.js`](https://github.com/herchelleanne48-max/neon-dash/blob/main/core.js) (Profiles & Progress)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_play["Gameplay"]
  node_runtime["Game Loop<br/>[main.js]"]
  node_mechanics["Run Mechanics<br/>[game.js]"]
  node_leveldata["Level Generation<br/>[levels.js]"]
end

subgraph group_visual["Visuals"]
  node_canvas["Canvas Assets<br/>[core.js]"]
  node_runrender["Run Rendering<br/>[renderfinal.js]"]
  node_backgrounds["Backgrounds<br/>[background.js]"]
end

subgraph group_account["Player Progress"]
  node_menus["Menus &amp; HUD<br/>[ui.js]"]
  node_profiles["Profiles &amp; Progress<br/>[core.js]"]
  node_savedata[("Browser Storage")]
end

subgraph group_sound["Audio"]
  node_audio["Music &amp; Effects<br/>[audio.js]"]
end

node_player(("Player"))

node_player -->|"navigates"| node_menus
node_player -->|"plays"| node_mechanics
node_runtime -->|"steps"| node_mechanics
node_runtime -->|"renders"| node_runrender
node_runtime -->|"draws"| node_backgrounds
node_mechanics -->|"uses layouts"| node_leveldata
node_mechanics -->|"updates progress"| node_profiles
node_menus -->|"reads and saves"| node_profiles
node_profiles -->|"persists"| node_savedata
node_runrender -->|"uses assets"| node_canvas
node_menus -->|"previews skins"| node_canvas
node_mechanics -->|"plays effects"| node_audio

click node_runtime "https://github.com/herchelleanne48-max/neon-dash/blob/main/main.js"
click node_mechanics "https://github.com/herchelleanne48-max/neon-dash/blob/main/game.js"
click node_leveldata "https://github.com/herchelleanne48-max/neon-dash/blob/main/levels.js"
click node_menus "https://github.com/herchelleanne48-max/neon-dash/blob/main/ui.js"
click node_profiles "https://github.com/herchelleanne48-max/neon-dash/blob/main/core.js"
click node_canvas "https://github.com/herchelleanne48-max/neon-dash/blob/main/core.js"
click node_runrender "https://github.com/herchelleanne48-max/neon-dash/blob/main/renderfinal.js"
click node_backgrounds "https://github.com/herchelleanne48-max/neon-dash/blob/main/background.js"
click node_audio "https://github.com/herchelleanne48-max/neon-dash/blob/main/audio.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_runtime,node_mechanics,node_leveldata toneBlue
class node_canvas,node_runrender,node_backgrounds toneAmber
class node_menus,node_profiles,node_savedata toneMint
class node_audio toneRose
class node_player toneIndigo
```

## Components

### Gameplay

- [Game Loop](https://github.com/herchelleanne48-max/neon-dash/blob/main/main.js): `main.js`
- [Run Mechanics](https://github.com/herchelleanne48-max/neon-dash/blob/main/game.js): `game.js`
- [Level Generation](https://github.com/herchelleanne48-max/neon-dash/blob/main/levels.js): `levels.js`

### Visuals

- [Canvas Assets](https://github.com/herchelleanne48-max/neon-dash/blob/main/core.js): `core.js`
- [Run Rendering](https://github.com/herchelleanne48-max/neon-dash/blob/main/renderfinal.js): `renderfinal.js`
- [Backgrounds](https://github.com/herchelleanne48-max/neon-dash/blob/main/background.js): `background.js`

### Player Progress

- [Menus & HUD](https://github.com/herchelleanne48-max/neon-dash/blob/main/ui.js): `ui.js`
- [Profiles & Progress](https://github.com/herchelleanne48-max/neon-dash/blob/main/core.js): `core.js`
- **Browser Storage**

### Audio

- [Music & Effects](https://github.com/herchelleanne48-max/neon-dash/blob/main/audio.js): `audio.js`

### Other components

- **Player**

## Connections

- Player → Menus & HUD: navigates
- Player → Run Mechanics: plays (evidence: `game.js`)
- Game Loop → Run Mechanics: steps (evidence: `main.js`)
- Game Loop → Run Rendering: renders (evidence: `main.js`)
- Game Loop → Backgrounds: draws (evidence: `main.js`)
- Run Mechanics → Level Generation: uses layouts (evidence: `game.js`)
- Run Mechanics → Profiles & Progress: updates progress (evidence: `game.js`)
- Menus & HUD → Profiles & Progress: reads and saves (evidence: `ui.js`)
- Profiles & Progress → Browser Storage: persists (evidence: `core.js`)
- Run Rendering → Canvas Assets: uses assets (evidence: `renderfinal.js`)
- Menus & HUD → Canvas Assets: previews skins (evidence: `ui.js`)
- Run Mechanics → Music & Effects: plays effects (evidence: `game.js`)
