Skip to content
Case studyRestaurant SaaSDelivered

Haazir Eats — Restaurant POS & QR Ordering

Runs a restaurant’s delivery orders and counter bills from one system with one source of truth for sales.

A restaurant platform that unifies online delivery and in-store POS/KOT into one invoicing system, with QR guest ordering, a realtime kitchen display and 80mm thermal printing — built on NestJS with Socket.IO.

Haazir Eats — Restaurant POS & QR Ordering interface
Industry
Food & Restaurant
Role
Full-Stack Engineer
Team
Solo — one author in the repository history
Type
SaaS Platform
Year
2025

01

Overview

Haazir Eats extends an existing online delivery platform with a full POS/KOT and QR-ordering program, all under one unified invoicing model. A single set of invoice tables records both online delivery orders and in-store POS bills, with an invoice generated automatically (and idempotently) when an online order is delivered.

The POS module manages restaurant tables, table sessions, KOT orders, billing and QR codes. Guests can scan a table QR to order dine-in, or order takeaway without a table. The kitchen sees live updates through a Socket.IO namespace, and bills support discounts, tax, service charge, round-off and split/mixed payments, printed on an 80mm ESC/POS thermal layer.

The backend is NestJS (modular: invoices, pos, public, reports), paired with a Flutter partner app, a Next.js admin panel and a public marketing + ordering website.

02

Business challenge

A delivery platform needed in-store POS/KOT and QR ordering, but online orders and counter bills lived in different worlds — making unified reporting and kitchen coordination impossible.

Before this system

The platform handled online delivery but had no in-store POS, KOT or QR ordering.
Online orders and counter bills were recorded separately, so there was no combined view of sales.
Kitchens had no live coordination between the counter, the tables and incoming orders.

03

Solution

Added POS/KOT and QR ordering as additive NestJS modules on top of the existing platform, with one unified invoice model recording both online and in-store sales, and Socket.IO driving realtime kitchen and table updates.

What it does

Unified invoicing for online delivery + in-store POS in one model
POS/KOT: tables, sessions, KOT orders, billing and QR codes
QR guest ordering — dine-in (with table) or takeaway
Realtime kitchen display via Socket.IO
Billing with discounts, tax, service charge, round-off, split & mixed payments
80mm ESC/POS thermal printing with KOT print payloads
Sales reports across online + POS with PDF/Excel export
Flutter partner app + Next.js admin + public website

04

My contribution

Role
Full-Stack Engineer
Team
Solo — one author in the repository history
Scope of my work
POS, KOT, QR ordering and unified invoicing, added to an existing delivery platform
Designed the unified invoice model that records online orders and counter bills in the same tables.
Built the POS module: tables, table sessions, KOT orders, billing and QR codes.
Built the public guest-ordering module for dine-in and takeaway.
Built the Socket.IO gateway for live kitchen and table updates.
Built the POS, kitchen display and thermal-printing layer in the Flutter partner application.
Built PDF and Excel reporting across both sales channels.

05

Product screenshots

Screens from the application itself. Select any image to view it full size.

06

Architecture

System architecture
One NestJS backend behind delivery, dine-in and the counterCustomer, partner, rider and admin applications talk to a modular NestJS API over REST and Socket.IO. The API hands background work to a BullMQ worker backed by Redis, sends push notifications through Firebase Cloud Messaging, and records online orders and POS bills through one invoice module into MySQL.ApplicationsNestJS APIModules & workersData & servicesenqueueCustomer appFlutterPartner appFlutter · POS · KOTESC/POS printingRider appFlutterAdmin · websiteNext.jsGuest QR orderingREST + Socket.IO/orders · /delivery · /posJWT · throttlingBullMQ workerorder-flow · settlementNotificationsFCM serviceInvoice moduleOnline + POS, one ledgerIdempotent delivery hookRedisQueuesFirebase FCMPush notificationsMySQLTypeORMUnified invoice tables

Swipe sideways, or expand to zoom.

One NestJS backend behind delivery, dine-in and the counter

POS, KOT and QR ordering were added as modules beside the existing delivery platform rather than as a second system. The decisive piece is the invoice module: an online order and a counter bill both become rows in the same invoice tables, distinguished by a source type, with an idempotent hook creating the invoice when a delivery completes. Kitchen and table updates travel over a dedicated Socket.IO namespace, and slow order-flow and settlement work runs on a queue worker.

  • Interface
  • Service
  • Data store
  • External system

How it fits together

  1. 01NestJS backend with modular design: `invoices` (unified online + POS), `pos` (tables/sessions/KOT/billing/QR), `public` (guest QR ordering) and `reports` (PDF/Excel)
  2. 02Single invoice model (`invoices` / `invoice_items` / `invoice_payments`) with a `source_type` distinguishing online orders from KOT bills; an idempotent hook generates an invoice when an online order is delivered
  3. 03`pos` Socket.IO gateway broadcasts realtime KOT/table/session updates to vendor rooms
  4. 04Flutter partner app provides the POS/KOT UI, kitchen display and an 80mm ESC/POS printing layer; Next.js admin + a public website handle management and guest ordering

Data and API design

  1. 01One invoice model — invoices, invoice items and invoice payments — with a source type separating online orders from KOT bills.
  2. 02An idempotent hook creates the invoice when an online order is delivered, so a retried event cannot bill twice.
  3. 03The backend is modular NestJS: invoices, POS, public ordering and reports sit beside the existing order, payment and delivery modules.
  4. 04Three Socket.IO namespaces: orders, delivery and POS, with per-vendor rooms.

07

Engineering challenges

01

Two sales channels, one set of books

The difficulty
Delivery orders and counter bills are created by different flows at different times, yet the restaurant needs one figure for the day’s sales.
Why it mattered
With two ledgers, every report has to reconcile them, and tax and payment totals depend on getting that right.
What was built
One invoice schema with a source type. Counter bills write to it directly; an idempotent hook writes to it when an online order is delivered.
Why this approach
Unifying at the data model, rather than in reports, makes cross-channel reporting a query instead of a reconciliation.
Result
Every sale, online or at the counter, lands in the same ledger.

02

The kitchen has to see an order the moment it is placed

The difficulty
A KOT raised at a table, a guest ordering from a QR code and a change to a table session all have to reach the kitchen display immediately.
Why it mattered
A late ticket is a late meal.
What was built
A dedicated Socket.IO namespace for POS events, with a room per vendor so one restaurant never receives another’s tickets.
Why this approach
A separate namespace keeps POS traffic apart from the delivery and order channels the platform already ran.
Result
Kitchen and table-session updates arrive live on the partner application.

03

Extending a platform that is already taking orders

The difficulty
POS and QR ordering had to be added to a delivery platform that was in use.
Why it mattered
A change that destabilised delivery would have cost the restaurants their existing revenue.
What was built
The new capability was added as separate NestJS modules — invoices, POS, public ordering and reports — beside the existing ones.
Why this approach
Additive modules leave working code paths untouched.
Result
Dine-in and counter sales were added without reworking delivery.

08

Technology stack

Frontend
TypeScriptFlutterNext.js
Backend
NestJSNode.jsSocket.IO
Data
MySQL
Infrastructure
ESC/POS Printing

Why these choices

NestJS
A modular backend where POS could be added as modules of its own.
MySQL + TypeORM
Relational storage for the unified invoice model.
Socket.IO
Namespaced, room-scoped realtime for kitchens and tables.
BullMQ + Redis
Order-flow and settlement work runs on a queue worker, off the request path.
Flutter
Partner application with POS, kitchen display and thermal printing.
Next.js
Admin panel and the public ordering website.
ESC/POS
80mm thermal printing for KOTs and bills.

09

Security & scale

Security

JWT authentication and request throttling at the API.
Realtime rooms are scoped per vendor.
Guest ordering is isolated in a public module with its own endpoints.

Scalability

Slow order-flow and settlement work is queued to a separate worker process.
Realtime traffic is split across three namespaces.
The API, worker and admin panel run as separate containers.

10

Business impact

Every figure is labelled with where it comes from: a measurement, an estimate, a design target, or a fact of the system as built.

2 → 1

Sales channels to ledgers

Online delivery and in-store POS recorded in one invoice model.

System fact

3

Realtime namespaces

Orders, delivery and POS.

System fact

80mm

Thermal printing

KOTs and bills printed over ESC/POS from the partner application.

System fact

What changed

Sales reporting
BeforeOnline and counter sales recorded apart.
AfterOne ledger and one set of reports across both.
Kitchen coordination
BeforeNo live link between counter, tables and kitchen.
AfterTickets and table sessions pushed live to the kitchen display.
In-store ordering
BeforeDelivery only.
AfterTable service, takeaway and guest ordering by QR code.

Restaurants run delivery and dine-in from one system with a single source of truth for sales, a live kitchen view, and real thermal-printed KOTs/bills — with reporting that finally spans both channels.

11

Project status

Delivered2025
Delivered.
The API, a queue worker, the admin panel and Redis run as a Docker Compose stack.
Client applications: a customer app, a partner app with a desktop build, and a rider app.

What I took from it

  • Adding capabilities as additive modules protects a working platform while it grows.
  • A unified data model up front is what makes cross-channel reporting trivial later.

In-store ordering added to a live delivery platform without disturbing it, with one decision doing most of the work: every sale, whatever its channel, becomes the same kind of invoice.

Next step

Need a similar solution for your business?

Tell me what you are trying to build or fix. I will come back with how I would approach it, what it realistically takes and where the risks are.

Related work

All projects