Skip to content

borkthecat/kitchen-orders-poc

Repository files navigation

Kitchen Orders POC - Realtime Order System

A proof of concept demonstrating realtime order delivery across multiple devices using Socket.io.

Features

  • Admin Page: Create test orders for any venue
  • Kitchen Display: Real-time order display with visual/audio alerts
  • Multi-venue Support: Orders scoped by venue_id
  • Reconnect Handling: Fetches existing orders on reconnect
  • No Database: Uses in-memory storage (perfect for demos)

Quick Start

Local Development

  1. Install dependencies:
npm install
  1. Start the server:
npm start
  1. Open in browser:

Testing the POC

  1. Open the admin page on your computer
  2. Open the kitchen page on another device (phone/iPad) with the same venue_id
  3. Create an order from the admin page
  4. Watch it appear instantly on the kitchen display!

Deployment to Render (For Client Testing)

📋 For detailed, step-by-step deployment instructions, see DEPLOY.md

Quick steps:

  1. Push code to GitHub
  2. Deploy to Render.com (free tier, no credit card needed)
  3. Share the public URL with your client

The client can then:

  • Open Admin page on their computer: https://your-app.onrender.com/admin.html
  • Open Kitchen page on their phone/iPad: https://your-app.onrender.com/kitchen.html?venue_id=001
  • Create orders and see them appear in real-time - no coding knowledge needed!

File Structure

.
├── server.js          # Express + Socket.io server
├── package.json       # Dependencies
├── public/
│   ├── admin.html     # Admin interface
│   └── kitchen.html   # Kitchen display
└── README.md          # This file

API Endpoints

  • GET /api/orders/:venue_id - Get all orders for a venue
  • DELETE /api/orders/:venue_id - Clear orders for a venue (testing)
  • GET /health - Health check endpoint

Socket.io Events

Client → Server

  • join_venue - Join a venue room (pass venue_id)
  • new_order - Create a new order (pass {venue_id, order})

Server → Client

  • existing_orders - Receives all existing orders when joining
  • order_received - Receives new order in realtime

Notes

  • This is a proof of concept only - no authentication, payments, or database
  • Orders are stored in memory (will be lost on server restart)
  • Perfect for demos and client testing
  • Works great on mobile devices and tablets

Testing Tips

  1. Use different venue_ids to test multiple kitchens
  2. Test reconnection by closing/reopening the kitchen page
  3. Test on different devices (phone, tablet, desktop)
  4. Try creating multiple orders quickly to see realtime updates

Future Enhancements (Not in POC)

  • Database persistence
  • User authentication
  • Payment processing
  • Order status updates
  • Order history
  • Analytics dashboard

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors