PRODUCTION HOSPITALITY & POS SAAS

HotelPro Enterprise POS & Hospitality SaaS

Full-stack real-time Point-of-Sale, Kitchen TV Kanban, and hotel lodging platform with sub-50ms WebSocket sync and zero-egress Cloudflare R2 CDN.

Engineered from scratch using Next.js 16, React 19, and Node.js 20. Unifies dining table POS, guest room lodging folios, 3-column kitchen Kanban TVs, and customer queue screens over bidirectional WebSockets with hardware-agnostic 80mm/58mm thermal printing.

< 50ms Realtime WebSocket Latency
$0.00 Egress via Cloudflare R2
80mm/58mm Driverless Print
Socket.IO Live (<50ms)Outlet: HQ-01
🍢

Paneer Tikka

₹220
🍗

Chicken Biryani

₹320
🍜

Veg Hakka Noodles

₹180
🍲

Butter Chicken

₹350
🥗

Caesar Salad

₹160
🥞

Masala Dosa

₹120
🍟

French Fries

₹140
🍡

Gulab Jamun

₹90
Showing 8 of 42 ItemsCloudflare R2 CDN Ready
Table T1Dine-In

Order #8821

3 Items

Chicken Biryani

KOT Fired

1 x ₹320

₹320

Garlic Naan

KOT Fired

2 x ₹40

₹80

Cold Coffee

Pending KOT

1 x ₹120

₹120
Subtotal₹520
GST (5% Indian F&B)₹26
Grand Total₹546
98.3% Speedup

< 50ms

Realtime Latency

WebSocket Order Dispatch

Instant KOT dispatch across terminals

100% Savings

$0.00

Cloud Egress Cost

Cloudflare R2 Object Storage

Custom Edge CDN: hotelassets.rankanalytics.in

Driverless

80mm / 58mm

Thermal Hardware

Receipt Printer Compatibility

GSTIN & FSSAI monospace compliance

32m Avg

65% Faster

Order Velocity

Turnaround Time

28.8% increase in daily dining capacity

EXECUTIVE SUMMARY

Project Overview & Production Scope

HotelPro POS is an enterprise-grade, cloud-native Point-of-Sale (POS) and hospitality management SaaS engineered to unify fragmented hotel lodging and restaurant dining operations into a single sub-second synchronization hub.

Built from the ground up for high-pressure restaurant chains and boutique hotels like Andhra Spicy House, HotelPro connects dine-in floor tables, guest lodging rooms, kitchen displays (KDS), and customer queue TV screens over real-time WebSockets with zero-egress Cloudflare R2 cloud storage.

SYSTEM ARCHITECTURE

Lead Full Stack & Systems Engineer

Next.js 16, Node.js 20, Express 5, R2

LIVE PRODUCTION SYSTEM

hotel.rankanalytics.in

Deployed via Coolify GitOps on Dedicated VPS

PRODUCTION CLIENT & TENANT

Andhra Spicy House

Chromepet, Chennai HQ-01 (Multi-Branch)

EDGE MEDIA INFRASTRUCTURE

hotelassets.rankanalytics.in

Cloudflare R2 S3-Compatible CDN

hotel.rankanalytics.in/admin-dashboard/finance
Andhra Spicy house • HQ-01
FINANCIAL INTELLIGENCE & AUDITINGADMIN CONFIDENTIAL

Andhra Spicy house Revenue & Sales Analytics

Real-time financial telemetry, gross billing summaries, tax collections, payment channel distribution across hotel branches.

LIVE SYNC EXPORT CSV POS TERMINAL
Outlet: All Outlets (Consolidated)Range: This Month
Total Gross Sales

₹4,82,650

142 Settled Orders
Net Sales (Pre-Tax)

₹4,59,666

Core F&B Earnings
GST Collected (5%)

₹22,984

CGST + SGST Split
Average Order (AOV)

₹3,398

+12% vs Last Mo
Socket.IO Gateway: Connected (< 50ms)
Cloudflare R2 CDN Active • $0.00 Egress
STRATEGIC CHALLENGE & ARCHITECTURE

The Problem & The Solution

Legacy Hospitality Friction

The Problem

Traditional restaurant and hospitality businesses often rely on fragmented tools, manual processes and offline systems.

  • Paper KOT loss & delay: Waiters handwriting paper slips leads to lost orders and kitchen friction during peak dinner rushes.
  • Disconnected hotel room folios: Guests ordering room service had dining tabs audited manually at checkout, causing revenue leakage.
  • Concurrent table clashes: Multiple mobile waiter tablets opening the same free table simultaneously without sub-50ms state locking.
  • Steep AWS S3 cloud egress bills: Serving high-res menu items across dozens of restaurant terminals created unpredictable monthly cloud costs.
  • Thermal printer formatting woes: Browser print dialogs printed margin headers, footers, and misaligned columns on 80mm rolls.
Unified Cloud-Native SaaS

The Solution

A full-stack, cloud-native SaaS that unifies restaurant POS, hotel operations, real-time KDS, multi-branch management and media storage into a single platform.

  • Sub-50ms bidirectional Socket.IO branch room gateways instantly synchronizing table states and KOT tickets across all devices.
  • Two-phase KOT ordering state machine distinguishing pending cart items from fired orders with dynamic contextual Amber/Green buttons.
  • Integrated lodging management aggregating room stay nights and room service dining tabs into an atomic checkout folio.
  • Zero-egress Cloudflare R2 media pipeline with a custom edge CDN (hotelassets.rankanalytics.in), cutting cloud egress costs to $0.00.
  • Synthesized Web Audio API kitchen chimes (880 Hz + 1318.5 Hz) that bypass browser autoplay restrictions with zero network requests.
  • Driverless 80mm & 58mm monospace thermal receipt stylesheets compliant with Indian GSTIN & FSSAI standards.
PLATFORM ARCHITECTURE & CAPABILITIES

6 Core Platform Modules

An end-to-end hospitality operating system spanning front-of-house, kitchen, lodging, and cloud media.

Core POS Engine

Two-Phase Table POS & Dynamic KOT

Dine-in floor table map with natural alphanumeric sorting (T1..T12). Features two-phase cart progression with contextual Amber 'Order (KOT)' and Emerald 'Pay' buttons.

✓ Natural table sort✓ Pending vs Ordered states✓ Off-menu custom manual items
Live KDS

Kitchen TV Kanban & Web Audio Chimes

3-column TV Kanban board (NEW ➔ PREPARING ➔ READY) with live elapsed timers and dual-tone mathematical sine-wave alerts (880Hz + 1318.5Hz) bypassing autoplay blocks.

✓ TV Fullscreen Mode✓ Web Audio API Chimes✓ 20-minute SLA urgency pulse
Customer TV

Customer-Facing Queue TV

Public screen displaying 'In Kitchen / Preparing' vs 'Ready for Pickup' with flashing order numbers for dine-in, takeaway, and room service tokens.

✓ Split status view✓ Takeaway token display✓ Zero-latency status flip
PMS & Lodging

Hotel Lodging & Room Folio Billing

Unified room booking, guest management, and atomic check-out folio calculations aggregating room nights with all attached room-service dining orders.

✓ Atomic checkout transaction✓ Nights × Rate + Sum(F&B)✓ Room status release
Cloud CDN

Zero-Egress Cloudflare R2 CDN

High-speed image upload and delivery via Cloudflare R2 S3 SDK attached to a custom edge domain (hotelassets.rankanalytics.in), eliminating 100% of egress bandwidth fees.

✓ $0.00 Egress cost✓ Edge asset caching✓ High-res food & room photos
Hardware Engine

Hardware-Agnostic Thermal Printing

Direct browser thermal receipt generator formatted for 80mm and 58mm rolls, rendering itemized breakdowns, CGST/SGST 5% tax splits, GSTIN, and FSSAI details.

✓ 80mm / 58mm layouts✓ Monospace CSS isolation✓ Instant print pop-up stream
LIVE PRODUCTION INTERFACES

Production Screenshots & Deployed Workspaces

Visual captures from the live production deployment operating on hotel.rankanalytics.in for Andhra Spicy House.

https://hotel.rankanalytics.in/admin-dashboard/finance
Financial Intelligence
Financial Intelligence & Revenue Analytics

Financial Intelligence & Revenue Analytics

Real-time financial telemetry dashboard for Andhra Spicy House showing Total Gross Sales, Net Sales (Pre-Tax), 5% GST tax collections, and Average Order Value (AOV) across branch outlets.

ARCHITECTURAL HIGHLIGHTS
  • •Outlet selector: All Outlets (Consolidated) vs single branch
  • •Dynamic date range filtering: Today, Yesterday, Last 7 Days, This Month, All Time
  • •Live Sync & Export CSV transaction auditing controls
OPERATIONAL WORKFLOW

Two-Phase KOT & Folio Flow

From floor table cart stage to kitchen alert, customer TV flashing, and thermal invoice print.

01

Table Open & Cart Stage

Waiter taps Table T4 on floor map. Items added enter 'pending' cart state with Amber 'Order (KOT)' button.

✓ Natural table sorting applied
02

Two-Phase KOT Dispatch

Waiter taps 'Order (KOT)'. Status flips to 'ordered', table turns Occupied, and Socket.IO fires KOT event.

✓ < 50ms WebSocket transit
03

Kitchen TV Alert & Kanban

Kitchen TV rings 880Hz+1318Hz Web Audio chime, card appears in NEW column with elapsed timer.

✓ Autoplay bypass guaranteed
04

Customer TV Ready Flashing

Chef taps card to move to PREPARING, then READY. Customer Queue TV flashes token for pickup.

✓ Dine-in, Takeaway & Room tokens
05

Bill Settlement & Folio Close

Button flips to Emerald 'Pay'. Cashier accepts Cash/UPI or charges to Hotel Room Booking Folio.

✓ Atomic check-out calculation
06

80mm Thermal Receipt Print

Micro-popup renders pure monospace print stream with 5% GST & FSSAI details directly to hardware roll.

✓ Driverless print stream
ENTERPRISE ARCHITECTURE

Technology Stack

Production-grade technologies chosen for high concurrency and sub-50ms latency.

FrontendApp Router

Next.js 16

React Server Components, edge routing, and high-performance client portals.

FrontendModern UI

React 19

Optimistic table state transitions and concurrent UI rendering.

LanguageStrict Typing

TypeScript

End-to-end data contracts across POS, KDS, PMS, and socket payloads.

BackendREST Micro-Monolith

Node.js 20 & Express 5

MVC architecture, 5-tier RBAC middleware, and order calculation state machine.

Real-timeWebSockets

Socket.IO

Branch-scoped WebSocket rooms delivering sub-50ms table and KOT sync.

DatabaseM30 Replica Set

MongoDB Atlas

Compound multi-tenant indexing ({ organization, branch, tableNumber }).

Cloud StorageZero-Egress

Cloudflare R2

S3-compatible bucket delivering food imagery via hotelassets.rankanalytics.in.

Audio EngineBrowser Native

Web Audio API

Synthesized 880Hz + 1318.5Hz sine waveforms bypassing autoplay blocks.

DevOps & PaaSGitOps CI/CD

Docker & Coolify

Multi-stage Alpine containerization deployed to dedicated high-performance VPS.

StylingUtility-First

Tailwind CSS v4

High-contrast slate dark theme optimized for 55-inch smart TVs and touch POS.

INFRASTRUCTURE & TOPOLOGY

System Architecture

A high-concurrency, real-time architecture engineered for sub-50ms latency and zero cloud egress tax.

CLIENT LAYER (Next.js 16 + React 19 + TypeScript + Tailwind v4)

Cashier / Waiter POS

Floor Map & 2-Phase KOT

Kitchen TV Kanban

3-Column Board + Chimes

Customer Queue TV

Preparing / Ready Display

Hotel Room PMS

Lodging & Room Folio
REST API (Axios + JWT Auth + Tenant Scoping)
WebSocket (Socket.IO Branch Rooms < 50ms)
APPLICATION TIER (Node.js 20 + Express 5 MVC Core)Docker Multi-Stage Alpine

5-Tier RBAC Scoping

Org & Branch Isolation

2-Phase KOT Engine

Pending ➔ Fired ➔ Paid

Room Folio Aggregator

Nights × Rate + Sum(F&B)

Web Audio Dispatcher

880Hz + 1318.5Hz Tone

Cloudflare R2 Pipe

AWS SDK v3 S3Client

Thermal Slip Raster

80mm Monospace CSS

STORAGE & EDGE CDN TIER
MongoDB Atlas
M30 Replica Set • Compound Indexing
Redis Cache
Ephemeral Table State Locks
Cloudflare R2 CDN
hotelassets.rankanalytics.in ($0 Egress)
Coolify Self-Hosted GitOps PaaSDedicated High-Performance VPS • Traefik Automated Wildcard SSL
Zero-Downtime Swap
SYSTEM GUARANTEES

Engineering Highlights

Sub-50ms WebSocket branch room event broadcasting
Two-phase KOT order progression (Pending ➔ Fired ➔ Completed)
Zero-egress Cloudflare R2 asset pipeline (hotelassets.rankanalytics.in)
Web Audio API mathematical sine wave synthesis (880Hz & 1318.5Hz)
Atomic hotel room folio settlement ((Nights × Rate) + Sum(F&B))
Natural alphanumeric table sorting (T1, T2... T9, T10, T11)
Driverless 80mm & 58mm monospace thermal receipt stylesheets
5-tier multi-tenant RBAC with compound database tenant scoping

Deployed in production managing high-volume dining shifts for Andhra Spicy House with zero slip loss.

TECHNICAL PROBLEM SOLVING & HARDENING

Key Engineering Challenges & Solutions

Examining the concurrency race conditions, audio autoplay restrictions, atomic folios, and hardware thermal printing solved during development.

CHALLENGE 01 • Distributed Concurrency

Concurrent Table State Collisions Across Waiter Tablets

The Technical Hurdle:

In a bustling dining hall with multiple mobile waiter tablets, concurrent taps on Table 12 created duplicate carts and race-condition collisions.

The Engineered Solution:

Implemented optimistic locking on the table model combined with immediate Socket.IO broadcasting. When Table 12 receives an item, the table is marked 'OCCUPIED' and a table_updated event locks the card with a red visual overlay on all other waiter screens in <50ms.

CHALLENGE 02 • Web Audio API

Kitchen TV Autoplay Restrictions & Silent Sound Drops

The Technical Hurdle:

Modern web browsers strictly forbid audio playback without direct user interaction, resulting in missed tickets when chefs are across the room.

The Engineered Solution:

Engineered a custom Web Audio API synthesizer. On the initial 'Enter Full-Screen KDS' click, the AudioContext is unlocked. When incoming KOT socket events arrive, the synthesizer generates raw mathematical sine waveforms at 880 Hz and 1318.5 Hz with 0ms decode latency and zero network requests.

CHALLENGE 03 • Atomic Transactions

Atomic Lodging Check-Out Folio Calculation

The Technical Hurdle:

Hotel guests ordering room service meals right before checking out caused race conditions where last-minute dining orders were omitted from the final stay bill.

The Engineered Solution:

Wrapped checkout folio aggregation inside an atomic Mongoose transaction. The controller queries all non-cancelled carts linked to bookingId, sums line items with room duration days, updates booking.status = 'COMPLETED', closes attached carts, and frees the room in a single atomic database cycle.

CHALLENGE 04 • Hardware Print Engine

Driverless Thermal Receipt Alignment (80mm & 58mm)

The Technical Hurdle:

Standard web browser printing prints margin headers (date, page URL, title) and stretches receipts across 8.5x11 inch paper rather than 80mm rolls.

The Engineered Solution:

Formatted strict CSS @media print rules enforcing @page { size: 80mm auto; margin: 0; }, pure black monospace font rendering, dynamic uppercase table alignment, and automated window.close() triggers on print dismissal.

ENTERPRISE GOVERNANCE

Security & Data Isolation

Defense-in-depth isolation preventing cross-organization leakage and unauthorized operational actions.

Tenant Scoping Headers

Every HTTP and Socket connection enforces strict x-organization-id and x-branch-id payload verification.

5-Tier RBAC Permission Matrix

Strict separation between Super Admin, Org Admin, Branch Manager, Cashier/Waiter, and Kitchen Chef roles.

Compound Database Indexing

Queries indexed by { organization: 1, branch: 1, tableNumber: 1 } guaranteeing absolute tenant data isolation.

Cryptographic JWT Authentication

Stateless JSON Web Tokens with cryptographically signed role claims and automatic expiry rotations.

Ephemeral Table Concurrency Locks

In-memory distributed table status tracking preventing simultaneous multi-terminal order collisions.

Immutable Transaction Audit Vault

Detailed chronological activity logging tracking item voids, discount applications, and payment settlements.

MEASURABLE OUTCOMES & BENCHMARKS

Results & Operational Impact

Measurable performance gains verified across live shifts at Andhra Spicy House.

Order-to-Kitchen Transit

< 50ms

Legacy: 3-5 mins98.3% Faster
Table Turnaround Time

32 mins

Legacy: 45 mins avg+28.8% Capacity
Lost / Delayed Orders

0.0%

Legacy: ~4.2% rush100% Elimination
Cloud Storage Egress

$0.00

Legacy: $120-$280/mo100% Cost Savings

Sub-50ms KOT Transit (98.3% Faster)

Replaced manual handwriting and slip running (3-5 minutes) with instantaneous sub-50ms WebSocket order dispatch directly to Kitchen TVs.

< 50ms end-to-end WebSocket transit

$0.00 Cloud Egress Cost with Cloudflare R2

Saved $120-$280/month in cloud bandwidth fees by serving thousands of high-res dish photos through Cloudflare R2 and hotelassets.rankanalytics.in.

100% cloud egress fee elimination

Table Turnaround Accelerated to 32 Minutes

Streamlined two-phase ordering and instant payment settlement reduced average table occupancy from 45 min to 32 min, unlocking 28.8% more daily dining volume.

28.8% increase in daily dining capacity

Guest Checkout Slashed to under 45 Seconds

Atomic lodging folio calculation engine seamlessly aggregates room nights with room service dining tabs, eliminating checkout audits and revenue leakage.

87.5% faster guest lodging checkout

SPECIALIZED WORKSPACES

Built for Real-World Hospitality

Every module is tailored to the exact daily cadence of waiters, chefs, front-desk staff, and franchise executives.

POS Terminal

Dine-In & Takeaway Two-Phase POS

Waiter terminal distinguishing pending cart items from fired kitchen orders with natural alphanumeric table sorting.

● < 50ms Socket Dispatch
Kitchen Display

Kitchen TV 3-Column Kanban Board

Wall-mounted smart TV interface with elapsed order tickers, ticket state progression, and zero-asset synthesized audio chimes.

● 880Hz + 1318Hz Web Audio
PMS Lodging

Hotel Room Lodging & Service Folio

Room check-in/out operating system consolidating room service dining tabs into an atomic unified check-out folio.

● Atomic Billing Calculation
Floor Layout

Live Table Map & Conflict Prevention

Multi-area dining layout with real-time AVAILABLE/OCCUPIED occupancy badges and branch-scoped optimistic locking.

● Natural T1..T50 Sorting
Fiscal Engine

GST Billing & Driverless Thermal Prints

Automated 5% GST computation engine with pixel-perfect 80mm/58mm monospace thermal invoice streaming.

● GSTIN & FSSAI Compliant
Cloud Media

Zero-Egress Cloudflare R2 Media CDN

S3-compatible asset pipeline hosting dish photography and brand logos on custom edge domain at zero bandwidth cost.

● $0.00 Cloud Egress Cost
LET'S COLLABORATE

Need a Similar Solution?

I help businesses build custom web applications, SaaS platforms and automation tools. From real-time state machines to multi-tenant cloud architectures.