Skip to content

๐Ÿณ Kitchen Display โ€‹

The Kitchen Display System (KDS) is a real-time order board powered by Socket.IO. It shows incoming orders to kitchen staff and allows status updates without refreshing the page.

Admin Kitchen Display

โš™๏ธ How It Works โ€‹

  1. ๐Ÿ›’ A customer places an order via the storefront
  2. ๐Ÿ“ก The server emits a Socket.IO event to the kitchen room
  3. ๐Ÿ“บ The admin kitchen display board receives the event and adds the order
  4. ๐Ÿ‘จโ€๐Ÿณ Kitchen staff update the order status (e.g., Preparing โ†’ Ready)
  5. ๐Ÿ”„ Status updates are broadcast in real-time to all connected clients

๐Ÿ“ก Socket.IO Events โ€‹

โฌ‡๏ธ Server โ†’ Client โ€‹

EventPayloadDescription
order:createdOrder object๐Ÿ†• New order placed
order:updatedOrder object๐Ÿ”„ Order status changed

โฌ†๏ธ Client โ†’ Server โ€‹

EventPayloadDescription
join:kitchen{ locationId }๐Ÿ”— Join the kitchen room for a location

๐Ÿ  Kitchen Room โ€‹

Each location has its own kitchen room. When a staff member opens the kitchen display, the client joins:

javascript
socket.emit('join:kitchen', { locationId: 'location-id' });

Events are only broadcast to clients in the relevant location's room.

๐Ÿ”„ Status Updates from Kitchen โ€‹

Staff click status buttons on the kitchen display to advance the order through its lifecycle:

PENDING โ†’ CONFIRMED โ†’ PREPARING โ†’ READY

Each status change calls PATCH /api/orders/:id/status and triggers real-time events.

๐Ÿ”Œ Integration โ€‹

The kitchen display is part of the admin dashboard. It uses React with Socket.IO client to maintain a live connection to the server.

See Real-Time Events for the full event architecture.