# xinysi/culinary-idle architecture

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

- Interactive diagram: https://gitdiagram.com/xinysi/culinary-idle
- Repository: https://github.com/xinysi/culinary-idle

## Overview

Culinary Idle: Spirit Atlas is a browser-based, food-themed idle game. The player enters through the game interface, loads or starts a save, then develops skills and gathers or crafts items; combat and long-term systems build on that state and surface results in the interface. The map preserves the README’s major gameplay branches. Some feature paths are documented but their implementation was not sampled, so those connections cite the README rather than implying inspected call chains.

Main entry points: [`src/game/bootstrap.js`](https://github.com/xinysi/culinary-idle/blob/main/src/game/bootstrap.js) (Game bootstrap), [`src/game/skills/ForagingSkill.js`](https://github.com/xinysi/culinary-idle/blob/main/src/game/skills/ForagingSkill.js) (Foraging), [`src/App.vue`](https://github.com/xinysi/culinary-idle/blob/main/src/App.vue) (Game interface), [`src/game/skills/registry.js`](https://github.com/xinysi/culinary-idle/blob/main/src/game/skills/registry.js) (Skill registry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Game entry and UI"]
  node_main["Vue entry<br/>[main.js]"]
  node_app["Game interface<br/>[App.vue]"]
  node_ui["UI state<br/>[ui.js]"]
  node_production_view["Skill interface<br/>[ProductionView.vue]"]
end

subgraph group_runtime["Game runtime"]
  node_bootstrap["Game bootstrap<br/>[bootstrap.js]"]
  node_engine["Idle engine<br/>[GameEngine.js]"]
  node_save["Save manager<br/>[SaveManager.js]"]
  node_player_state["Player state<br/>[player.js]"]
  node_event_bus["Event bus<br/>[EventBus.js]"]
end

subgraph group_progression["Skills and progression"]
  node_registry["Skill registry<br/>[registry.js]"]
  node_skill["Skill actions<br/>[Skill.js]"]
  node_foraging["Foraging<br/>[ForagingSkill.js]"]
  node_mastery["Skill mastery<br/>[mastery.js]"]
end

subgraph group_systems["Game systems"]
  node_combat["Combat engine<br/>[Combat.js]"]
  node_season["Season system<br/>[seasons.js]"]
  node_long_term["Long-term features<br/>[shanhaiTree.js]"]
  node_restaurant["Restaurant systems<br/>[player.js]"]
  node_minigames["Minigames<br/>[FishingView.vue]"]
end

subgraph group_content["Game content"]
  node_items["Items catalog<br/>[items.js]"]
end

node_player(("Player"))

node_player -->|"opens game"| node_main
node_main -->|"mounts"| node_app
node_app -->|"reads UI state"| node_ui
node_app -.->|"starts runtime"| node_bootstrap
node_app -.->|"shows skill page"| node_production_view
node_production_view -->|"reads player data"| node_player_state
node_player_state -->|"uses UI store"| node_ui
node_bootstrap -->|"initializes state"| node_player_state
node_bootstrap -->|"starts loop"| node_engine
node_bootstrap -->|"loads save"| node_save
node_bootstrap -->|"creates skills"| node_registry
node_registry -->|"instantiates"| node_skill
node_registry -->|"instantiates"| node_foraging
node_foraging -->|"grants items and XP"| node_player_state
node_foraging -->|"applies mastery"| node_mastery
node_foraging -->|"emits action"| node_event_bus
node_foraging -->|"uses item data"| node_items
node_combat -->|"gets skill instances"| node_registry
node_combat -->|"reads combat items"| node_items
node_player -->|"saves progress"| node_save
node_player -->|"plays combat"| node_combat
node_player -->|"plays seasonal content"| node_season
node_player -->|"advances progression"| node_long_term
node_player -->|"runs restaurant"| node_restaurant
node_player -->|"plays minigames"| node_minigames

click node_main "https://github.com/xinysi/culinary-idle/blob/main/src/main.js"
click node_app "https://github.com/xinysi/culinary-idle/blob/main/src/App.vue"
click node_ui "https://github.com/xinysi/culinary-idle/blob/main/src/stores/ui.js"
click node_production_view "https://github.com/xinysi/culinary-idle/blob/main/src/views/ProductionView.vue"
click node_bootstrap "https://github.com/xinysi/culinary-idle/blob/main/src/game/bootstrap.js"
click node_engine "https://github.com/xinysi/culinary-idle/blob/main/src/game/core/GameEngine.js"
click node_save "https://github.com/xinysi/culinary-idle/blob/main/src/game/core/SaveManager.js"
click node_player_state "https://github.com/xinysi/culinary-idle/blob/main/src/stores/player.js"
click node_event_bus "https://github.com/xinysi/culinary-idle/blob/main/src/game/core/EventBus.js"
click node_registry "https://github.com/xinysi/culinary-idle/blob/main/src/game/skills/registry.js"
click node_skill "https://github.com/xinysi/culinary-idle/blob/main/src/game/skills/Skill.js"
click node_foraging "https://github.com/xinysi/culinary-idle/blob/main/src/game/skills/ForagingSkill.js"
click node_mastery "https://github.com/xinysi/culinary-idle/blob/main/src/game/core/mastery.js"
click node_items "https://github.com/xinysi/culinary-idle/blob/main/src/game/data/items.js"
click node_combat "https://github.com/xinysi/culinary-idle/blob/main/src/game/combat/Combat.js"
click node_season "https://github.com/xinysi/culinary-idle/blob/main/src/game/data/seasons.js"
click node_long_term "https://github.com/xinysi/culinary-idle/blob/main/src/game/data/shanhaiTree.js"
click node_restaurant "https://github.com/xinysi/culinary-idle/blob/main/src/stores/player.js"
click node_minigames "https://github.com/xinysi/culinary-idle/blob/main/src/views/minigames/FishingView.vue"

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_app,node_ui,node_production_view toneBlue
class node_bootstrap,node_engine,node_save,node_player_state,node_event_bus toneAmber
class node_registry,node_skill,node_foraging,node_mastery toneMint
class node_combat,node_season,node_long_term,node_restaurant,node_minigames toneRose
class node_items,node_player toneIndigo
```

## Components

### Game entry and UI

- [Vue entry](https://github.com/xinysi/culinary-idle/blob/main/src/main.js): `src/main.js`
- [Game interface](https://github.com/xinysi/culinary-idle/blob/main/src/App.vue): `src/App.vue`
- [UI state](https://github.com/xinysi/culinary-idle/blob/main/src/stores/ui.js): `src/stores/ui.js`
- [Skill interface](https://github.com/xinysi/culinary-idle/blob/main/src/views/ProductionView.vue): `src/views/ProductionView.vue`

### Game runtime

- [Game bootstrap](https://github.com/xinysi/culinary-idle/blob/main/src/game/bootstrap.js): `src/game/bootstrap.js`
- [Idle engine](https://github.com/xinysi/culinary-idle/blob/main/src/game/core/GameEngine.js): `src/game/core/GameEngine.js`
- [Save manager](https://github.com/xinysi/culinary-idle/blob/main/src/game/core/SaveManager.js): `src/game/core/SaveManager.js`
- [Player state](https://github.com/xinysi/culinary-idle/blob/main/src/stores/player.js): `src/stores/player.js`
- [Event bus](https://github.com/xinysi/culinary-idle/blob/main/src/game/core/EventBus.js): `src/game/core/EventBus.js`

### Skills and progression

- [Skill registry](https://github.com/xinysi/culinary-idle/blob/main/src/game/skills/registry.js): `src/game/skills/registry.js`
- [Skill actions](https://github.com/xinysi/culinary-idle/blob/main/src/game/skills/Skill.js): `src/game/skills/Skill.js`
- [Foraging](https://github.com/xinysi/culinary-idle/blob/main/src/game/skills/ForagingSkill.js): `src/game/skills/ForagingSkill.js`
- [Skill mastery](https://github.com/xinysi/culinary-idle/blob/main/src/game/core/mastery.js): `src/game/core/mastery.js`

### Game systems

- [Combat engine](https://github.com/xinysi/culinary-idle/blob/main/src/game/combat/Combat.js): `src/game/combat/Combat.js`
- [Season system](https://github.com/xinysi/culinary-idle/blob/main/src/game/data/seasons.js): `src/game/data/seasons.js`
- [Long-term features](https://github.com/xinysi/culinary-idle/blob/main/src/game/data/shanhaiTree.js): `src/game/data/shanhaiTree.js`
- [Restaurant systems](https://github.com/xinysi/culinary-idle/blob/main/src/stores/player.js): `src/stores/player.js`
- [Minigames](https://github.com/xinysi/culinary-idle/blob/main/src/views/minigames/FishingView.vue): `src/views/minigames/FishingView.vue`

### Game content

- [Items catalog](https://github.com/xinysi/culinary-idle/blob/main/src/game/data/items.js): `src/game/data/items.js`

### Other components

- **Player**

## Connections

- Player → Vue entry: opens game (evidence: `README.md`)
- Vue entry → Game interface: mounts (evidence: `src/main.js`)
- Game interface → UI state: reads UI state (evidence: `src/App.vue`)
- Game interface → Game bootstrap: starts runtime
- Game interface → Skill interface: shows skill page
- Skill interface → Player state: reads player data (evidence: `src/views/ProductionView.vue`)
- Player state → UI state: uses UI store (evidence: `src/stores/player.js`)
- Game bootstrap → Player state: initializes state (evidence: `src/game/bootstrap.js`)
- Game bootstrap → Idle engine: starts loop (evidence: `src/game/bootstrap.js`)
- Game bootstrap → Save manager: loads save (evidence: `src/game/bootstrap.js`)
- Game bootstrap → Skill registry: creates skills (evidence: `src/game/bootstrap.js`)
- Skill registry → Skill actions: instantiates (evidence: `src/game/skills/registry.js`)
- Skill registry → Foraging: instantiates (evidence: `src/game/skills/registry.js`)
- Foraging → Player state: grants items and XP (evidence: `src/game/skills/ForagingSkill.js`)
- Foraging → Skill mastery: applies mastery (evidence: `src/game/skills/ForagingSkill.js`)
- Foraging → Event bus: emits action (evidence: `src/game/skills/ForagingSkill.js`)
- Foraging → Items catalog: uses item data (evidence: `src/game/skills/ForagingSkill.js`)
- Combat engine → Skill registry: gets skill instances (evidence: `src/game/combat/Combat.js`)
- Combat engine → Items catalog: reads combat items (evidence: `src/game/combat/Combat.js`)
- Player → Save manager: saves progress (evidence: `README.md`)
- Player → Combat engine: plays combat (evidence: `README.md`)
- Player → Season system: plays seasonal content (evidence: `README.md`)
- Player → Long-term features: advances progression (evidence: `README.md`)
- Player → Restaurant systems: runs restaurant (evidence: `README.md`)
- Player → Minigames: plays minigames (evidence: `README.md`)
