Sky Grills: A Real-Time Restaurant Operating System on the Edge

Restaurants run on speed and coordination. The kitchen needs orders the moment they're placed. The counter needs to know when food is ready. The customer needs to see where their order is. Most restaurant systems handle one of these well — few handle all of them in real time, without a rack of on-premise servers.
Sky Grills came to us with exactly that ambition: a single platform that runs the whole restaurant — online storefront, staff point-of-sale, kitchen display, and live order tracking — all in real time. We built it on Cloudflare's edge.
"From the moment a customer taps order, to the plate hitting the counter, every step is tracked live. That's the Sky Grills experience we engineered."
The Stack
The backend is a Cloudflare Worker built with Hono and Drizzle on D1. Durable Objects power the WebSocket realtime hub that pushes kitchen display and order-status updates to every screen. KV handles idempotency keys and rate-limiting, Queues back print dispatch and webhook retries, and a Cron job expires stale orders and reconciles payments.
The frontend is a Next.js 16 app — an online storefront for customers, plus staff pages for point-of-sale, kitchen display, and inventory. Every menu item is database-driven: names, prices, categories, availability and images all come from D1, never hardcoded in the bundle. Static assets are served from an R2-backed Cloudflare CDN with immutable caching.
Realtime, Not Refresh
The heart of the system is the WebSocket realtime hub built on a Durable Object. When a customer places an order, it lands on the kitchen display in the same instant — no polling, no page refresh. The kitchen pushes it through an Enter-driven FIFO flow: start, ready, collect. The counter marks it handed over. The customer's order-status page updates live, like tracking a delivery.
"WebSocket realtime over Durable Objects means the kitchen and the customer are looking at the same order, at the same moment."
Payments Without Panic
Money is where systems like this either shine or fall apart. We built checkout on Paystack (with Stripe as an option) and layered idempotency keys in KV so a retried payment never double-charges. Online orders left in PENDING_PAYMENT beyond a window are automatically marked EXPIRED by a Cron job, and a reconciliation pass keeps the books honest.
What We Learned
Realtime changes everything. A system that pushes state instead of polling for it feels dramatically faster — but it also makes state the hardest part. Every transition — placed, started, ready, collected — is enforced by a state machine in the worker, so no screen can drift out of sync.
We also learned that a restaurant's daily reality is full of offline moments: a dropped network in the kitchen, a flaky printer. Queues and retries turned those from incidents into background noise. The platform doesn't just stay online; it forgives the messy real world it runs in.