Skip to content

Software

Toaster Chef is a TypeScript codebase split into three packages: a Phaser browser client, a Colyseus server, and a shared types package. The server is authoritative; the client renders and sends input. (For the runtime data flow and the server-side map-generation pipeline, see Architecture.)

The stack

  • Client — Phaser 3.90.0 (TypeScript): 2D rendering, tilemaps, animation, input. Browser only. Vite dev server on :5173.
  • Server — Colyseus 0.17.x (Node.js 22, TypeScript): authoritative multiplayer, WebSocket state sync, matchmaking, rooms. Runs on :2567 (WebSocket + HTTP).
  • Shared — TypeScript types and constants imported by both via @toasterchef/shared. Must be built before the server or client can import it.

Key constraints

  • Phaser 3 never runs server-side — keep it strictly in the client.
  • Pin Phaser at ^3.90.0 — Phaser 4 RC is on npm; do not pull it.
  • Node.js 22 is required for Colyseus core.
  • simplex-noise v4 uses createNoise2D(), not new SimplexNoise().

Repository layout

toasterchef/
├── client/   # Phaser 3 browser client (scenes, network manager)
├── server/   # Colyseus server (rooms, schema, mapgen, scenarios)
└── shared/   # Types and constants shared between client and server

The simulation surface lives under server/server/scenarios/*.json holds the ScenarioConfig files, and server/scenarios/calibration-notes.md is where research sub-agents record their findings.

The repo is private during active development, with an open-source (MIT) release planned at the first simulation v1.0. The external repository link is wired into the site navigation.

Build order

The shared package must build first, then the server, then the client:

npm run dev     # client + server in parallel (from workspace root)
npm run build   # shared → server → client, in order

See Contributing for full local-setup and branch-strategy details.