Back to work

Featured case study

EatsDesk

Multi-tenant restaurant operations SaaS — from idea to 4 restaurants live in production.

Founder & Full-Stack EngineerLive in productionBootstrapped

4

Restaurants live

22,420+

Orders processed (flagship client)

Rs 3 Cr+

Revenue recorded

1 day

Setup time

The problem

Paper tickets, WhatsApp screenshots, and no visibility.

Pakistani fast food restaurants run on paper tickets, WhatsApp screenshots, and disconnected tools for POS, delivery, and inventory — losing money to untracked cash, missed orders, and no visibility into what's actually selling. Existing international POS systems (Toast, Square) aren't built for the local payment methods (Easypaisa, JazzCash) or price point these restaurants need.

What I built

System overview

A connected production workspace covering POS, kitchen, delivery, storefronts, AI ordering, billing, accounting, and inventory.

Production workspace

Connected restaurant systems

4

Restaurants live

01

Multi-tenant POS

Day-session cash reconciliation across tenants.

02

Kitchen Display (KDS)

Real-time Socket.IO sync from counter to kitchen.

03

Rider delivery app

Live GPS tracking and cash-collection reconciliation.

04

Multi-branch websites

Online ordering, cart, modifiers, and cross-sell.

05

WhatsApp AI Receptionist

LLM-powered order-taking via Meta WhatsApp Business API.

06

Module billing engine

À la carte per-branch pricing, discounts, invoicing.

07

Double-entry accounting

Vouchers, ledgers, P&L, COGS auto-posting.

08

Inventory management

Recipe-linked stock deduction on every order.

09

RBAC

Custom roles with granular permissions.

10

Deals / combo engine

Choice slots for configurable combo meals.

11

Add-ons & modifiers

Upsell system with modifier analytics.

12

Programmatic SEO

250+ location pages across Portugal/Spain, CMS-driven blog.

POSKDSRiderWebAIBillingAccounting

Engineering

Technical highlights

Real production problems and the judgment behind the fixes — not a feature list.

01

Subscription lifecycle bug

Diagnosed and fixed a "ghost trial" bug where stale trial-date fields could resurrect TRIAL status on paying customers even after manual activation — root-caused to a status-derivation function that trusted historical dates over the authoritative status field, fixed by enforcing a one-way lifecycle invariant (TRIAL → ACTIVE → PAST_DUE → EXPIRED, never backward).

02

Real-time order sync at scale

Diagnosed a bandwidth crisis caused by Socket.IO clients silently falling back to HTTP long-polling; fixed by forcing WebSocket-only transport across POS, KDS, and rider apps, cutting request volume dramatically.

03

Order-type change cascade

Fixed a bug where converting a delivery order to takeaway mid-flight left it stuck in "Out for Delivery" status with an assigned rider and a stale delivery charge — built a centralized transition handler that reconciles status, rider assignment, and billing atomically.

04

Per-branch, per-module billing engine

Designed a billing system where restaurants pick individual modules (POS, KDS, website, accounting, AI receptionist, etc.) priced per branch, with a transparent discount layer (percentage / fixed / flat-total) so custom deals show real value versus savings on every invoice.

05

Payment → subscription wiring

Found and fixed a gap where marking an invoice paid didn't reliably transition a trial account to active or extend the subscription window — hardened with idempotency guards and automatic trial-state cleanup.

Architecture note

Shared codebase. Tenant-scoped isolation.

Multi-tenant architecture serving all restaurants from a shared codebase with tenant-scoped data isolation. Node.js/Express backend, MongoDB, Next.js dashboard and storefronts, Socket.IO for real-time sync, Meta WhatsApp Business API + LLM integration for the AI receptionist, Cloudinary for media, deployed on Render (backend) and Vercel (frontend), with separate marketing site infrastructure and programmatic SEO generating 250+ indexed location pages.

Stack

Tech stack

ReactNext.jsNode.jsExpressMongoDBSocket.IOMeta WhatsApp APICloudinaryRenderVercelMulti-tenant architecture

Role & scope

Founder & Full-Stack Engineer. Sole technical owner: product architecture, backend, frontend, database design, third-party integrations, DevOps, and ongoing feature development across 12+ months of continuous production iteration.

Building something similar?

Whether you're starting a SaaS product or need someone who can own a complex production system end to end, let's talk.