Key takeaways
- Resolve the tenant once per request from the Host header, then scope every query by outlet id – never trust an outlet id sent by the client.
- A wildcard DNS record plus one Nginx server block can serve unlimited outlet subdomains without new deployments.
- Use one Socket.IO room per outlet (and per table for guests) so a kitchen only receives its own tickets.
- Model play-area time as billable lines on the same order as food, so the guest gets one bill.
- Build permissions from role defaults, per-user grants and explicit denials – denials always win.
In this article
Parozo began with a simple observation: many Indian restaurants now run a play area, turf or game zone next to the dining floor, and they were using two systems – a POS for food and a register for the courts. Guests got two bills, staff typed the same order twice and the owner never saw one honest number for the evening. Small dhabas had a different problem: billing software priced for city chains, with per-terminal fees and no way to give guests a menu link.
We built Parozo as one multi-tenant platform for all of them. This article walks through the architecture – the parts that were genuinely hard and the decisions we would make again. If you want the business view first, read our guide to restaurant billing software with QR ordering.
The shape of the system
| Part | Built with | Used by |
|---|---|---|
| Guest ordering pages | React + Vite | Guests scanning a table QR |
| Staff console | React (browser) | Owner, manager, cashier |
| Staff apps | React Native (Expo) | Waiters, kitchen, managers on phones |
| API | Node.js, Express, MongoDB | Everything above |
| Live updates | Socket.IO | Floor, kitchen and guest screens |
| Push | Firebase Cloud Messaging | Staff phones |
| Hosting | VPS, Nginx, PM2 | All outlets |
All outlets share this one deployment. That is what keeps the price workable for a single family restaurant: there is nothing to install per outlet and no hardware to buy – the waiter's own phone, a tablet or the counter browser is enough.
One subdomain per outlet
Every outlet gets a branded address such as outletname. followed by the Parozo domain, with its own theme colour, photos, social links and live menu. Creating a new outlet must not require a deployment, so the setup is:
- A wildcard DNS record points every subdomain to the same server.
- One Nginx server block with a wildcard server name and a wildcard SSL certificate forwards all of them to the same Node.js app.
- The app reads the Host header on each request, looks up the outlet by its subdomain (cached in memory for a few minutes) and attaches it to the request.
From that point on, every database query is filtered by the outlet id from the request – never by an outlet id sent in the body or the URL. This is the most important rule in any multi-tenant system: if one route forgets the filter, one restaurant can read another's orders. We enforce it in a small data-access layer so a developer cannot "just query the orders collection" directly from a route.
Indexes follow the same idea. Almost every collection has a compound index starting with the outlet id – for example outlet, status and created date for orders – so each outlet's queries stay fast no matter how many outlets join.
Table QR ordering without an app
Each table has a sticker with a QR code for that outlet and table. Scanning it opens the outlet's ordering page with the table already selected. The guest browses dishes with sizes, add-ons and veg / non-veg marks, sees the chef's recommendations and sends the order.
Two details made this work in real restaurants:
- Pay-first tables. Some outlets want payment before cooking for certain tables or for takeaway. Those orders are held until the cashier marks them paid, then released to the kitchen.
- Takeaway tokens. The same page handles parcels with a token number instead of a table, so the kitchen and the counter talk about "token 42", not a guest's name.
Live kitchen tickets with Socket.IO
When an order is saved, the API emits it to the outlet's room. We use one Socket.IO room per outlet for staff screens and a separate room per table for the guest's own order status. A kitchen in one outlet therefore only ever receives its own tickets.
Tickets (KOTs) move through waiting, cooking, ready and served on a kitchen display designed for a wall screen: big text, colour per state and the time since the order arrived. Staff can move a ticket to another table, cancel a single dish or waive a packing charge – each action is saved through the API first and only then broadcast, so a screen never shows a change that was not stored.
Restaurant Wi-Fi drops. When a screen reconnects, it does not trust the events it may have missed; it asks the API for all open tickets and redraws. The socket is for speed, the database is the source of truth.
Food and court time on one bill
A court, turf or play zone runs on a live clock with pause, extend and overtime, priced per slot or per hour. Instead of a separate booking system, a running session is simply a line on the same order as the food. When the guest asks for the bill, food, parcels and play time are already together. Bookings can also be made from home through the outlet page, and the owner chooses whether bookings need approval and who may approve them.
GST bills that match the outlet's registration
Each outlet's GST settings decide whether a bill is a tax invoice, a bill of supply or an estimate. CGST and SGST switch to IGST automatically when a B2B customer gives an out-of-state GSTIN, SAC codes are printed, discounts are capped by the outlet's policy and split payments and round-off are supported. Bills print at true 58 mm, 80 mm, A5 and A4 widths with a UPI QR, and the same bill can be shared on WhatsApp as a link. Bills are generated on demand rather than stored as files, which keeps customer data off third-party storage.
At month end, the owner downloads a multi-sheet Excel workbook with rate-wise, B2B, B2C, invoice, line-item, SAC, payment and cancellation views – the figures the accountant actually needs, without retyping bills. We use the same line-by-line rounding approach described in our GST invoicing article.
Permissions staff cannot get around
Restaurants need very fine control: a cook must not see takings, a waiter must not give more discount than allowed, and a manager may need one extra ability for one week. Simple roles were not enough, so access is calculated from three layers:
- Role defaults – what a waiter, cook, cashier or manager can normally do.
- Per-user grants – extra abilities for one person.
- Explicit denials – abilities taken away from one person, which always win over grants and defaults.
On top of that, plan-level feature flags switch whole modules on or off per outlet. Every check runs on the server; the apps only hide buttons for a cleaner screen.
What we learned
- Tenant isolation must be boring. Put it in one layer that every query passes through, and test it with two outlets on every release.
- Real-time is an optimisation. Design every screen to recover from a full reload; then sockets just make it faster.
- Print widths are product features. A bill that looks perfect on A4 can be unreadable on a 58 mm thermal roll – test on the real printers.
- Small outlets need zero hardware. Running on phones and browsers is what made Parozo affordable for dhabas, not only chains.
We used the same live-update pattern – save first, then broadcast, and reload on reconnect – for live cricket scoring in BAGALEPA. If you run a restaurant, café or play zone and want one system for the whole floor, contact RelieveX Labs.
Case studies mentioned in this article
Frequently asked questions
What does multi-tenant mean for restaurant software?
One installation of the software serves many restaurants. Each outlet has its own menu, staff, orders and reports, completely separated from the others, but all outlets share the same code and servers. Updates reach every outlet at once and the cost per restaurant stays low.
Do guests need to install an app to order from the table?
No. The QR sticker on the table opens a web page for that outlet and table. The guest picks dishes and sends the order straight to the kitchen from the browser.
How does the kitchen get orders instantly?
Orders are saved on the server and then pushed to the kitchen display over a Socket.IO connection. If the screen briefly loses Wi-Fi, it reloads the open tickets from the API when it reconnects, so nothing is missed.
Can one bill include food and play-area time?
Yes. In Parozo a court or turf session runs on a live clock and is added to the same order as the food, so the guest pays one GST bill.
References & further reading

About the author
Priyank Patel
Founder of RelieveX Labs / RelieveX - IT Solutions · 3+ years experience
Priyank Patel is a Full Stack MERN Developer and Founder of RelieveX Labs, specializing in high-performance web applications, scalable mobile apps, and SEO-driven digital solutions. With expertise in React, Next.js, Node.js, MongoDB, and React Native, he helps businesses build powerful, conversion-focused digital products.
View profile & projects




