# paulinotech1/space-cafe-manager architecture

> Architecture diagram of the GitHub repository paulinotech1/space-cafe-manager, 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/paulinotech1/space-cafe-manager
- Repository: https://github.com/paulinotech1/space-cafe-manager

## Overview

Space Cafe Manager is a browser-based idle game implemented as a single HTML file. The main player loop is to start a workstation product, wait until it is ready, serve a matching ship, earn credits, and spend them on upgrades or prestige. The README also documents automation, research, events, achievements, daily and offline rewards, and presentation features. Only the README was available as evidence, so internal calls and ordering beyond the documented gameplay steps are not inferred.

Main entry points: [`index.html`](https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html) (Game State)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_play["Cafe Gameplay"]
  node_workstations["Workstations<br/>[index.html]"]
  node_product["Product Making<br/>[index.html]"]
  node_ships["Customer Ships<br/>[index.html]"]
  node_serving["Order Serving<br/>[index.html]"]
  node_automation["Automation<br/>[index.html]"]
  node_events["Space Events<br/>[index.html]"]
end

subgraph group_progress["Progression"]
  node_credits["Credits<br/>[index.html]"]
  node_upgrades["Upgrades<br/>[index.html]"]
  node_research["Menu Research<br/>[index.html]"]
  node_prestige["Prestige<br/>[index.html]"]
  node_darkmatter["Dark Matter<br/>[index.html]"]
  node_achievements["Achievements<br/>[index.html]"]
  node_daily["Daily Bonus<br/>[index.html]"]
  node_offline["Offline Income<br/>[index.html]"]
end

subgraph group_runtime["Game Runtime"]
  node_gameloop["Game Loop<br/>[index.html]"]
  node_gamestate["Game State<br/>[index.html]"]
  node_saves[("Local Save<br/>[index.html]")]
end

subgraph group_presentation["Presentation"]
  node_interface["Game Interface<br/>[index.html]"]
  node_starfield["Animated Starfield<br/>[index.html]"]
  node_audio["Sound Effects<br/>[index.html]"]
end

node_player(("Player"))
node_tone["Tone.js"]

node_player -->|"plays through"| node_interface
node_player -->|"clicks"| node_workstations
node_workstations -->|"starts making"| node_product
node_player -->|"drags product"| node_serving
node_ships -->|"receive orders"| node_serving
node_serving -->|"earns"| node_credits
node_player -->|"buys with credits"| node_upgrades
node_player -->|"resets for"| node_prestige
node_prestige -->|"awards"| node_darkmatter
node_gameloop -->|"manages"| node_gamestate
node_gamestate -->|"saved and loaded"| node_saves
node_gamestate -->|"supports"| node_automation
node_gamestate -->|"supports"| node_events
node_gamestate -->|"tracks"| node_research
node_gamestate -->|"tracks"| node_achievements
node_gamestate -->|"tracks"| node_daily
node_gamestate -->|"calculates"| node_offline
node_interface -->|"displays"| node_starfield
node_audio -.->|"uses"| node_tone

click node_interface "https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html"
click node_workstations "https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html"
click node_product "https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html"
click node_ships "https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html"
click node_serving "https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html"
click node_credits "https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html"
click node_upgrades "https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html"
click node_research "https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html"
click node_prestige "https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html"
click node_darkmatter "https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html"
click node_automation "https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html"
click node_events "https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html"
click node_achievements "https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html"
click node_daily "https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html"
click node_offline "https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html"
click node_gameloop "https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html"
click node_gamestate "https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html"
click node_saves "https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html"
click node_starfield "https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html"
click node_audio "https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html"

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_workstations,node_product,node_ships,node_serving,node_automation,node_events toneBlue
class node_credits,node_upgrades,node_research,node_prestige,node_darkmatter,node_achievements,node_daily,node_offline toneAmber
class node_gameloop,node_gamestate,node_saves toneMint
class node_interface,node_starfield,node_audio toneRose
class node_player,node_tone toneIndigo
```

## Components

### Cafe Gameplay

- [Workstations](https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html): `index.html`
- [Product Making](https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html): `index.html`
- [Customer Ships](https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html): `index.html`
- [Order Serving](https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html): `index.html`
- [Automation](https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html): `index.html`
- [Space Events](https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html): `index.html`

### Progression

- [Credits](https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html): `index.html`
- [Upgrades](https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html): `index.html`
- [Menu Research](https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html): `index.html`
- [Prestige](https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html): `index.html`
- [Dark Matter](https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html): `index.html`
- [Achievements](https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html): `index.html`
- [Daily Bonus](https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html): `index.html`
- [Offline Income](https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html): `index.html`

### Game Runtime

- [Game Loop](https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html): `index.html`
- [Game State](https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html): `index.html`
- [Local Save](https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html): `index.html`

### Presentation

- [Game Interface](https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html): `index.html`
- [Animated Starfield](https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html): `index.html`
- [Sound Effects](https://github.com/paulinotech1/space-cafe-manager/blob/main/index.html): `index.html`

### Other components

- **Player**
- **Tone.js**

## Connections

- Player → Game Interface: plays through (evidence: `README.md`)
- Player → Workstations: clicks (evidence: `README.md`)
- Workstations → Product Making: starts making (evidence: `README.md`)
- Player → Order Serving: drags product (evidence: `README.md`)
- Customer Ships → Order Serving: receive orders (evidence: `README.md`)
- Order Serving → Credits: earns (evidence: `README.md`)
- Player → Upgrades: buys with credits (evidence: `README.md`)
- Player → Prestige: resets for (evidence: `README.md`)
- Prestige → Dark Matter: awards (evidence: `README.md`)
- Game Loop → Game State: manages (evidence: `README.md`)
- Game State → Local Save: saved and loaded (evidence: `README.md`)
- Game State → Automation: supports (evidence: `README.md`)
- Game State → Space Events: supports (evidence: `README.md`)
- Game State → Menu Research: tracks (evidence: `README.md`)
- Game State → Achievements: tracks (evidence: `README.md`)
- Game State → Daily Bonus: tracks (evidence: `README.md`)
- Game State → Offline Income: calculates (evidence: `README.md`)
- Game Interface → Animated Starfield: displays (evidence: `README.md`)
- Sound Effects → Tone.js: uses (evidence: `README.md`)
