# 6montdh48/cookie-overdrive architecture

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

- Interactive diagram: https://gitdiagram.com/6montdh48/cookie-overdrive
- Repository: https://github.com/6montdh48/cookie-overdrive

## Overview

Cookie Overdrive is an incremental cookie-clicker game, with a separate Roblox project also present in the repository. In the web game, players interact through the UI, advance the economy and game systems, and can launch standalone minigames; the canvas stage and art modules provide visual presentation. The source index identifies the principal game modules, but does not show their relationships. The available excerpts verify UI calls into core and minigame mounting; other links are omitted rather than inferred. Roblox files are represented as a separate, unsampled subsystem.

Main entry points: [`source/src/js/ui.js`](https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/ui.js) (Game UI), [`source/src/js/core.js`](https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/core.js) (Game engine), [`source/src/js/mg-flappy.js`](https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/mg-flappy.js) (Flappy), [`source/src/js/mg-ninja.js`](https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/mg-ninja.js) (Cookie Ninja)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web game"]
  node_ui["Game UI<br/>[ui.js]"]
end

subgraph group_engine["Game systems"]
  node_core["Game engine<br/>[core.js]"]
  node_data["Game data<br/>[data.js]"]
end

subgraph group_presentation["Visuals"]
  node_stage["Canvas stage<br/>[stage.js]"]
  node_art["Core art<br/>[art.js]"]
  node_worldart["World art<br/>[art-world.js]"]
  node_petart["Pet art<br/>[art-pets.js]"]
end

subgraph group_minigames["Minigames"]
  node_flappy["Flappy<br/>[mg-flappy.js]"]
  node_ninja["Cookie Ninja<br/>[mg-ninja.js]"]
  node_rhythm["Crunch Rhythm<br/>[mg-rhythm.js]"]
  node_slots["Casino Crumble<br/>[mg-slots.js]"]
end

subgraph group_roblox["Roblox game"]
  node_robloxclient["Roblox client"]
  node_robloxserver["Roblox server"]
  node_robloxshared["Roblox shared"]
end

node_player(("Player"))

node_player -.->|"interacts"| node_ui
node_ui -->|"calls"| node_core
node_ui -.->|"mounts"| node_flappy
node_ui -.->|"mounts"| node_ninja
node_ui -.->|"mounts"| node_rhythm
node_ui -.->|"mounts"| node_slots

click node_ui "https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/ui.js"
click node_core "https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/core.js"
click node_data "https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/data.js"
click node_stage "https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/stage.js"
click node_art "https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/art.js"
click node_worldart "https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/art-world.js"
click node_petart "https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/art-pets.js"
click node_flappy "https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/mg-flappy.js"
click node_ninja "https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/mg-ninja.js"
click node_rhythm "https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/mg-rhythm.js"
click node_slots "https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/mg-slots.js"
click node_robloxclient "https://github.com/6montdh48/cookie-overdrive/tree/main/roblox/src/client"
click node_robloxserver "https://github.com/6montdh48/cookie-overdrive/tree/main/roblox/src/server"
click node_robloxshared "https://github.com/6montdh48/cookie-overdrive/tree/main/roblox/src/shared"

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_ui toneBlue
class node_core,node_data toneAmber
class node_stage,node_art,node_worldart,node_petart toneMint
class node_flappy,node_ninja,node_rhythm,node_slots toneRose
class node_robloxclient,node_robloxserver,node_robloxshared,node_player toneIndigo
```

## Components

### Web game

- [Game UI](https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/ui.js): `source/src/js/ui.js`

### Game systems

- [Game engine](https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/core.js): `source/src/js/core.js`
- [Game data](https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/data.js): `source/src/js/data.js`

### Visuals

- [Canvas stage](https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/stage.js): `source/src/js/stage.js`
- [Core art](https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/art.js): `source/src/js/art.js`
- [World art](https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/art-world.js): `source/src/js/art-world.js`
- [Pet art](https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/art-pets.js): `source/src/js/art-pets.js`

### Minigames

- [Flappy](https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/mg-flappy.js): `source/src/js/mg-flappy.js`
- [Cookie Ninja](https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/mg-ninja.js): `source/src/js/mg-ninja.js`
- [Crunch Rhythm](https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/mg-rhythm.js): `source/src/js/mg-rhythm.js`
- [Casino Crumble](https://github.com/6montdh48/cookie-overdrive/blob/main/source/src/js/mg-slots.js): `source/src/js/mg-slots.js`

### Roblox game

- [Roblox client](https://github.com/6montdh48/cookie-overdrive/tree/main/roblox/src/client): `roblox/src/client`
- [Roblox server](https://github.com/6montdh48/cookie-overdrive/tree/main/roblox/src/server): `roblox/src/server`
- [Roblox shared](https://github.com/6montdh48/cookie-overdrive/tree/main/roblox/src/shared): `roblox/src/shared`

### Other components

- **Player**

## Connections

- Player → Game UI: interacts
- Game UI → Game engine: calls (evidence: `source/src/js/ui.js`)
- Game UI → Flappy: mounts
- Game UI → Cookie Ninja: mounts
- Game UI → Crunch Rhythm: mounts
- Game UI → Casino Crumble: mounts
