How dangnhuphong/gameproject works
OverNấuĂn is a cooperative multiplayer cooking game with online rooms and local play. Players enter through the React app, choose or join a room, and play in a Phaser kitchen: collect ingredients, prepare them at stations, assemble and serve orders for score. Online play uses backend room and match handling with server-authoritative game rules; maps supply the shared kitchen layout. The README also describes recipe access and story-map progression. Some links below are documented rather than source-verified because several relevant modules were not excerpted.
Main entry points: api.js HTTP API client · App.jsx App routing · KitchenScene.js Kitchen scene · matchController.js Match API
Components 23
Client experience
- App routing
frontend/src/App.jsx - Room lobby
frontend/src/pages/Lobby.jsx - World map
frontend/src/pages/WorldMap.jsx - Game page
frontend/src/pages/Game.jsx - HTTP API client
frontend/src/services/api.js
Gameplay runtime
- Kitchen scene
frontend/src/game/KitchenScene.js - Game audio
frontend/src/game/GameAudio.js - Game controls
frontend/src/game/gameControls.js - Local transport
frontend/src/game/LocalTransport.js - Local game rules
frontend/src/game/core/GameController.js - Local room state
frontend/src/game/core/GameRoom.js
Room backend
- Socket server
backend/src/server.js - Game runtime
backend/src/classes/gameRuntime.js - Authoritative game rules
backend/src/classes/GameController.js - Room state
backend/src/classes/GameRoom.js - Stations and items
backend/src/classes - Match API
backend/src/controllers/matchController.js - Recipe API
backend/src/controllers/recipeController.js
Content and persistence
- Map layouts
backend/src/maps - Story progression
backend/src/classes/storyConfig.js - Character selection
backend/src/classes/characterStore.js
Other components
- Player
- Supabase
Connections 24
- Player → App routing: enters game
- App routing → Room lobby: routes to
frontend/src/App.jsx - App routing → World map: routes to
frontend/src/App.jsx - App routing → Game page: routes to
frontend/src/App.jsx - Room lobby → HTTP API client: requests rooms
frontend/src/pages/Lobby.jsx - World map → HTTP API client: loads match data
frontend/src/pages/WorldMap.jsx - Game page → HTTP API client: loads match and recipes
frontend/src/pages/Game.jsx - Game page → Kitchen scene: starts scene
frontend/src/pages/Game.jsx - Kitchen scene → Game audio: plays effects
frontend/src/game/KitchenScene.js - Kitchen scene → Local transport: uses offline transport
frontend/src/game/KitchenScene.js - Local transport → Local game rules: dispatches actions
frontend/src/game/LocalTransport.js - Local game rules → Local room state: updates room
frontend/src/game/core/GameController.js - Kitchen scene → Socket server: sends game events
- Socket server → Game runtime: uses runtime
backend/src/server.js - Game runtime → Authoritative game rules: creates controller
backend/src/classes/gameRuntime.js - Authoritative game rules → Room state: updates room
backend/src/classes/GameController.js - Room state → Stations and items: builds game objects
backend/src/classes/GameRoom.js - Socket server → Map layouts: serves map layout
- HTTP API client → Match API: calls match endpoints
- HTTP API client → Recipe API: calls recipe endpoints
- Match API → Supabase: reads and writes
backend/src/controllers/matchController.js - Recipe API → Supabase: reads recipes
backend/src/controllers/recipeController.js - Match API → Story progression: checks map access
backend/src/controllers/matchController.js - Match API → Character selection: reads selections
backend/src/controllers/matchController.js