# mittymatty/root_cafe architecture

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

- Interactive diagram: https://gitdiagram.com/mittymatty/root_cafe
- Repository: https://github.com/mittymatty/root_cafe

## Overview

This is a Godot cafe-making game. With no README or source excerpts, the graph uses exact paths from the tree to show the apparent player workflow and major gameplay/UI subsystems; connections are dashed and unverified rather than presenting inferred calls as inspected facts.

Main entry points: [`scenes/game.tscn`](https://github.com/mittymatty/root_cafe/blob/main/scenes/game.tscn) (Game scene), [`scripts/counter.gd`](https://github.com/mittymatty/root_cafe/blob/main/scripts/counter.gd) (Counter), [`scripts/base_dispenser.gd`](https://github.com/mittymatty/root_cafe/blob/main/scripts/base_dispenser.gd) (Ingredient dispensers), [`scripts/cup.gd`](https://github.com/mittymatty/root_cafe/blob/main/scripts/cup.gd) (Drink cup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_play["Cafe gameplay"]
  node_game["Game scene<br/>[game.tscn]"]
  node_kitchen["Kitchen<br/>[kitchen.gd]"]
  node_counter["Counter<br/>[counter.gd]"]
  node_dispenser["Ingredient dispensers<br/>[base_dispenser.gd]"]
  node_ingredient["Ingredients<br/>[base_ingredient.gd]"]
  node_cup["Drink cup<br/>[cup.gd]"]
end

subgraph group_recipes["Drink recipes"]
  node_recipe["Recipe data<br/>[recipe_resource.gd]"]
  node_recipebook["Recipe book<br/>[recipe_book.gd]"]
  node_recipesdata["Recipe collection"]
end

subgraph group_interface["Menus and feedback"]
  node_mainmenu["Main menu<br/>[main_menu.gd]"]
  node_gameui["Game UI<br/>[game_ui.gd]"]
  node_pause["Pause menu<br/>[pause_menu.gd]"]
  node_endscreen["End screen<br/>[end_screen.gd]"]
end

subgraph group_state["Shared game state"]
  node_contents["Cup contents<br/>[CupContents.gd]"]
  node_status["Player status<br/>[PlayerStatus.gd]"]
  node_signals["Signal hub<br/>[SignalHub.gd]"]
end

node_player(("Player"))

node_player -.->|"starts at"| node_mainmenu
node_mainmenu -.->|"starts game"| node_game
node_game -.->|"loads"| node_kitchen
node_player -.->|"uses"| node_dispenser
node_dispenser -.->|"dispenses"| node_ingredient
node_player -.->|"prepares drink"| node_counter
node_counter -.->|"uses"| node_cup
node_cup -.->|"tracks"| node_contents
node_recipebook -.->|"shows"| node_recipesdata
node_recipesdata -.->|"defines"| node_recipe
node_player -.->|"consults"| node_recipebook
node_game -.->|"shows"| node_gameui
node_player -.->|"opens"| node_pause
node_game -.->|"ends at"| node_endscreen
node_game -.->|"tracks"| node_status
node_game -.->|"uses"| node_signals

click node_mainmenu "https://github.com/mittymatty/root_cafe/blob/main/scripts/main_menu.gd"
click node_game "https://github.com/mittymatty/root_cafe/blob/main/scenes/game.tscn"
click node_kitchen "https://github.com/mittymatty/root_cafe/blob/main/scripts/kitchen.gd"
click node_counter "https://github.com/mittymatty/root_cafe/blob/main/scripts/counter.gd"
click node_dispenser "https://github.com/mittymatty/root_cafe/blob/main/scripts/base_dispenser.gd"
click node_ingredient "https://github.com/mittymatty/root_cafe/blob/main/scripts/base_ingredient.gd"
click node_cup "https://github.com/mittymatty/root_cafe/blob/main/scripts/cup.gd"
click node_contents "https://github.com/mittymatty/root_cafe/blob/main/scripts/globals/CupContents.gd"
click node_recipe "https://github.com/mittymatty/root_cafe/blob/main/scripts/resources/recipe_resource.gd"
click node_recipebook "https://github.com/mittymatty/root_cafe/blob/main/scripts/recipe_book.gd"
click node_recipesdata "https://github.com/mittymatty/root_cafe/tree/main/resources/recipes"
click node_status "https://github.com/mittymatty/root_cafe/blob/main/scripts/globals/PlayerStatus.gd"
click node_signals "https://github.com/mittymatty/root_cafe/blob/main/scripts/globals/SignalHub.gd"
click node_gameui "https://github.com/mittymatty/root_cafe/blob/main/scripts/game_ui.gd"
click node_pause "https://github.com/mittymatty/root_cafe/blob/main/scenes/pause_menu/pause_menu.gd"
click node_endscreen "https://github.com/mittymatty/root_cafe/blob/main/scripts/end_screen.gd"

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_game,node_kitchen,node_counter,node_dispenser,node_ingredient,node_cup toneBlue
class node_recipe,node_recipebook,node_recipesdata toneAmber
class node_mainmenu,node_gameui,node_pause,node_endscreen toneMint
class node_contents,node_status,node_signals toneRose
class node_player toneIndigo
```

## Components

### Cafe gameplay

- [Game scene](https://github.com/mittymatty/root_cafe/blob/main/scenes/game.tscn): `scenes/game.tscn`
- [Kitchen](https://github.com/mittymatty/root_cafe/blob/main/scripts/kitchen.gd): `scripts/kitchen.gd`
- [Counter](https://github.com/mittymatty/root_cafe/blob/main/scripts/counter.gd): `scripts/counter.gd`
- [Ingredient dispensers](https://github.com/mittymatty/root_cafe/blob/main/scripts/base_dispenser.gd): `scripts/base_dispenser.gd`
- [Ingredients](https://github.com/mittymatty/root_cafe/blob/main/scripts/base_ingredient.gd): `scripts/base_ingredient.gd`
- [Drink cup](https://github.com/mittymatty/root_cafe/blob/main/scripts/cup.gd): `scripts/cup.gd`

### Drink recipes

- [Recipe data](https://github.com/mittymatty/root_cafe/blob/main/scripts/resources/recipe_resource.gd): `scripts/resources/recipe_resource.gd`
- [Recipe book](https://github.com/mittymatty/root_cafe/blob/main/scripts/recipe_book.gd): `scripts/recipe_book.gd`
- [Recipe collection](https://github.com/mittymatty/root_cafe/tree/main/resources/recipes): `resources/recipes`

### Menus and feedback

- [Main menu](https://github.com/mittymatty/root_cafe/blob/main/scripts/main_menu.gd): `scripts/main_menu.gd`
- [Game UI](https://github.com/mittymatty/root_cafe/blob/main/scripts/game_ui.gd): `scripts/game_ui.gd`
- [Pause menu](https://github.com/mittymatty/root_cafe/blob/main/scenes/pause_menu/pause_menu.gd): `scenes/pause_menu/pause_menu.gd`
- [End screen](https://github.com/mittymatty/root_cafe/blob/main/scripts/end_screen.gd): `scripts/end_screen.gd`

### Shared game state

- [Cup contents](https://github.com/mittymatty/root_cafe/blob/main/scripts/globals/CupContents.gd): `scripts/globals/CupContents.gd`
- [Player status](https://github.com/mittymatty/root_cafe/blob/main/scripts/globals/PlayerStatus.gd): `scripts/globals/PlayerStatus.gd`
- [Signal hub](https://github.com/mittymatty/root_cafe/blob/main/scripts/globals/SignalHub.gd): `scripts/globals/SignalHub.gd`

### Other components

- **Player**

## Connections

- Player → Main menu: starts at
- Main menu → Game scene: starts game
- Game scene → Kitchen: loads
- Player → Ingredient dispensers: uses
- Ingredient dispensers → Ingredients: dispenses
- Player → Counter: prepares drink
- Counter → Drink cup: uses
- Drink cup → Cup contents: tracks
- Recipe book → Recipe collection: shows
- Recipe collection → Recipe data: defines
- Player → Recipe book: consults
- Game scene → Game UI: shows
- Player → Pause menu: opens
- Game scene → End screen: ends at
- Game scene → Player status: tracks
- Game scene → Signal hub: uses
