Demo project
A restaurant ordering system you can try yourself
Bob 'n' Buns is our own demo of an online ordering system for restaurants. Browse the menu, fill a cart and check out, then see how staff would handle the order.

- Type
- Demo project by CandleApps
- Built for
- Restaurants taking pickup and delivery orders
- Built with
- Next.js, TypeScript and Supabase
- Status
- Public demo, not ready for real orders
Why we built it
Orders get messy when they're spread around
Taking orders by phone or chat can get messy when the kitchen's busy. Someone notes the wrong size, the total gets worked out by hand, and the person waiting has to call back to ask where their food is.
We built Bob 'n' Buns to show how one system could handle that whole path, from the menu on a phone to the kitchen screen and the rider. It's a demo, so nothing you do there places a real order.
- The menu, cart and checkout all live in one place.
- The system sets every price, so nobody can change one from their phone.
- Each order gets its own private tracking page.
- Counter, kitchen and delivery staff each get the screens their role needs.
What it does
Built for the person ordering and the person cooking
Here's what we built for both sides of an order. Staff screens run in a local copy, because the public demo keeps those panels off.
Order without an account
Nobody has to sign up. People browse 51 dishes in 9 categories, then search, sort, save favourites and pick sizes.
Pickup or delivery
Choose pickup, or delivery within a set zone with GPS location. Coupons work at checkout, delivery's free at Rs 299, and cash is the only payment method.
Tracking and reorders
Each order has a private tracking page, so nobody has to call to ask about it. People can also reorder from their history.
Feels like an app
It has light and dark modes and installs on a phone like an app. If the connection drops, orders wait on the device and sync later.
Screens for each role
Admins get all 8 panels. Counter staff get orders, kitchen and delivery. Chefs get orders and kitchen, and riders get delivery.
Clear order stages
Staff move each order from pending to confirmed, preparing, ready and completed, with an optional out for delivery step. It's cancellable until it's closed.
See it working
From the menu to the kitchen and out the door

The cart
Everything you've added sits in one list, where you can change quantities or remove a dish. The delivery charge comes at the next step, once you've said how you want your food.

Pickup checkout
Choose your order type, add a name and number, and try a coupon. Cash is the only payment method. On the public demo, checkout finishes on a demo screen, so no order goes anywhere.

The order tracker
After ordering, each person gets a private page showing how far along their food is, from received to completed. This one uses sample data, since the public demo doesn't store any orders.

The staff orders board
Every order lands here, with tabs for each stage and search by order number, name or phone. It's shown from a local run with sample data, because staff panels are switched off on the public demo.

The kitchen display
Chefs see active tickets with the oldest first, and the screen refreshes every few seconds. It's shown from a local run with sample data, because staff panels are switched off on the public demo.

The delivery view
Riders see active deliveries, orders ready to leave and cash collected today. It's shown from a local run with sample data, because staff panels are switched off on the public demo. This flow has a known bug, listed below.
For developers
How it's put together
A Next.js app on Supabase Postgres, where the server owns prices and order state. The decisions below are problems our own audit found and fixed.
architecture
Browser
- Next.js 15 and React 19
- PWA offline queue, no prices sent
- Token-gated order tracker
- Realtime menu, boards poll every 2.5 to 3s
Access
- scrypt hashes, signed httpOnly cookie, 7 days
- Role rules in middleware
- Login limits per IP and per email
- Order and lookup limits per IP
Orders
- API takes ids and quantities, server reprices
- Caps: quantity 50, 30 lines
- Optimistic lock on status changes
- Delivery zones, optional 10 km haversine check
Data and services
- Postgres: 16 tables, RLS on, service role on server
- Upstash rate limits, in-memory fallback
- Local in-memory store without Supabase
- Promise.allSettled fan-out: WhatsApp, web push, loyalty
stack
- Next.js 15
- React 19
- TypeScript 5
- Supabase (Postgres)
- Tailwind CSS 3
- sharp
- web-push
- Vitest 3
- Upstash Redis
- Vercel
decisions
Order numbers from the database
Order numbers came from an in-memory counter and collisions were ignored, so checkout could've shown success for an order that failed. Our audit caught it. Numbers now come from the database, retry on a unique violation, and a failed items write rolls back.
Password hashes out of public reach
Row level security policies let the public key read password hashes. We found that in our own audit and dropped those policies. All 16 tables have row level security on, and the server uses the service role.
Service worker cache boundaries
The service worker was caching tracking tokens and admin HTML, which have no business sitting in a device cache. Our audit flagged it. The worker now bypasses /api and /admin completely.
No fallback signing secret
A committed fallback secret could've allowed forged admin sessions. We caught this in our own audit. Production now fails closed when no secret is set, and sessions are signed with HMAC-SHA256.
Escaped fields in print popups
Print popups were open to stored XSS, since saved fields could reach the popup's HTML as markup. Our audit found this. Fields are now escaped before they reach the popup, so saved text stays text.
CSV exports that stay data
A spreadsheet can read a cell as a formula, which left our CSV exports open to formula injection. We found it in our own audit, and exports now neutralise those values.
Questions
What people ask about this demo
Is this a real ordering site?
No. It's a demo we built to show this system. The public demo stores no orders, sends nothing and uses placeholder contact details, so you can try it freely.
Can I pay online in the demo?
No. Cash is the only payment method in the flow. We've written a Razorpay module, but it isn't connected yet, so online payment doesn't work.
Can someone change a price from their browser?
The server ignores it. It accepts only dish ids and quantities, then reprices from the database. We tested it by sending a price of 1, and the total still came to the real 100 plus 30 for delivery.
Why can't I open the staff panels?
They're switched off on the public demo, and the system needs more hardening before real use. The staff screens on this page come from a local run with sample data.
How much of it is tested?
We run 43 tests across 8 test files, plus 1 live database test that does nothing without a key. They cover pricing, sign-in, order status, the offline queue and admin, but not HTTP routes, Razorpay, GST, loyalty or hours.
Keep exploring
More from CandleApps.
Have an idea, or a problem software could solve?
Tell us what you want to build or what's slowing your team down. We'll reply with honest advice and, if it's a fit, a written plan with prices. Asking costs nothing.