WorkSmart Hisab – Canteen POS & Meal ERP Platform4 min

Flutter & Cloud ERP · Active Development · Proprietary

Smart Hisab – Canteen POS & Meal ERP Platform

Lead Mobile & Backend Engineer (Client Project)2026 — Present

FlutterSupabaseDartPostgreSQLAndroid

Architected a high-speed, offline-first canteen POS and meal ERP platform achieving instant meal checkout and zero-discrepancy shift reconciliation across 500+ daily counter transactions via Flutter, local SQLite offline caching, Supabase PostgreSQL, and atomic RPC double-entry ledgers.

Smart Hisab – Canteen POS & Meal ERP Platform interface
Role
Lead Mobile & Backend Engineer (Client Project)
Timeline
2026 — Present
Class
Proprietary

Overview

Architected and developing an offline-first institutional canteen POS and meal ERP platform for a dedicated client using Flutter and Supabase PostgreSQL [X]. Replaced paper meal tokens and chaotic shift registers with automated customer AR accounts and digital shift cashbooks [Y], enabling sub-second counter transactions, zero-variance cashier handovers, and atomic ledger reconciliation during peak lunch hours [Z].

Decisions

Institutional canteens, corporate cafeterias, and educational dining facilities operate under extreme peak burst loads: hundreds of diners arrive within a 45-minute lunch window. Reliance on paper tokens, manual tally books, or cloud-dependent web systems results in catastrophic counter queues during Wi-Fi drops, misplaced meal receipts, cash drawer discrepancies, and uncollected customer debt.

Challenge

Guarantee sub-second counter throughput during lunch rush without internet dependency

Decision

Built an offline-first local mutation store in SQLite with optimistic UI updates and background batch sync

Outcome

Cashiers complete orders continuously without waiting for remote server round-trips

Challenge

Maintain financial double-entry integrity between customer payments, cashier cashbooks, and vendor food purchases

Decision

Implemented atomic PostgreSQL stored procedures (RPCs) in Supabase with explicit debit/credit balancing

Outcome

Eliminates partial ledger updates and guarantees zero discrepancy between drawer balances and meal orders

Challenge

Support multiple user clearance levels (Superadmin, Cashier, Kitchen Manager, Auditor)

Decision

Applied Supabase Row-Level Security (RLS) policies tied directly to user roles and assigned shift IDs

Outcome

Restricts cashier visibility to their active shift while allowing management real-time cross-location audit

Before → after

Commercial Canteens, University Dining Halls, Factory Cafeterias & Institutional Caterers

Before

Peak-Hour Counter Congestion

Web apps freeze or lag when 300+ students or workers queue for meals simultaneously on spotty cafeteria Wi-Fi.

After

Offline-First Instant Dispatch

Flutter SQLite engine issues meal tokens in <1.2 seconds with instant Bluetooth thermal receipt printing.

Before

Cash Discrepancies & Drawer Leaks

Multiple cashiers change shifts without structured drawer counts, leading to untracked register shortages.

After

Atomic Shift Cashbook

Enforces mandatory opening float declaration, mid-day cash drops, and closing drawer audit before handover.

Before

Uncollected Meal Credit

Manual credit ledgers lead to disputes over diner meal tabs and unpaid month-end balances.

After

Real-Time Meal AR & Wallets

Digital diner balances, monthly pre-paid credit limits, and automated payroll deduction exports.

Stack

FrontendFlutter (v3+)DartOffline-First State ManagementMaterial Design 3 UI EngineHaptic & Sound Feedback

MobileAndroid Native Build (APK)Local SQLite Cache & QueueESC/POS Bluetooth Thermal PrintingBarcode / QR Token Scanner

BackendSupabase (PostgreSQL 15+)Row-Level Security (RLS)Atomic RPC Transaction FunctionsRealtime Sync Channels

DatabasePostgreSQL Relational SchemaCustomer Meal Accounts Receivable (AR)Business Day Shifts & Cash Drawer VaultVendor Inventory Accounts Payable (AP)Staff Meal Payroll Deductions

DevOpsSupabase CLI & Local Docker EngineAutomated Migration ReplayAndroid Production Keystore PipelineGit & GitHub

Security

  • Row-Level Security (RLS) enforcing strict tenant and role isolation on all PostgreSQL tables
  • Atomic SQL transactions ensuring that meal order recording and wallet balance deductions never desynchronize
  • Encrypted local SQLite storage safeguarding offline transaction buffers on Android hardware
  • Cryptographically signed session tokens with automatic background token refresh

Roadmap

  • RFID / NFC smart card tap-to-pay reader integration for contactless 0.5s counter clearance
  • Automated kitchen display system (KDS) for real-time prep station order dispatch
  • Weekly nutritional tracking and dynamic meal subsidy calculation for corporate cafeterias

At a Glance

Aspect Implementation Details
Platform Native Android APK built with Flutter & Dart
Backend & Cloud Supabase Cloud (PostgreSQL 15+, Auth, Realtime, Storage)
Offline Architecture Local SQLite write-ahead transaction buffer with automatic conflict resolution
Hardware Integrations Bluetooth ESC/POS 58mm/80mm thermal receipt printers, 2D barcode scanner
Core Modules Cashier Shifts, Counter POS, Customer Meal AR, Vendor AP, Staff Payroll Logs

The Operational Challenge

Institutional food services operate differently from standard retail shops. Rather than browsing items, diners want rapid, frictionless service:

  1. Burst Volume: 80% of daily transactions occur within two concentrated 45-minute periods (breakfast and lunch).
  2. Hybrid Settlement: Diners pay with cash, digital wallets, or institutional credit accounts (deducted from monthly salaries).
  3. Cashier Accountability: Canteens operate across multiple shifts with rotating operators; without strict cash drawer float tracking, reconciliation at end-of-day is impossible.
  4. Kitchen Coordination: Counters need fast item tallying to alert cooks when high-demand dishes (rice, curries, snacks) are running low.
flowchart TD
    subgraph Client ["Flutter Mobile Client (Android)"]
        UI["Counter POS & Touch Grid"] --> Queue["Local SQLite Queue"]
        Queue --> Printer["Bluetooth Thermal Printer"]
    end
    
    subgraph Sync ["Background Sync Engine"]
        Queue -->|Sync mutations when online| RPC["Supabase Atomic RPCs"]
    end
    
    subgraph Cloud ["Supabase PostgreSQL 15+"]
        RPC --> Shifts["Shift Cashbooks"]
        RPC --> Ledgers["Customer AR & Wallets"]
        RPC --> Stock["Vendor AP & Raw Stock"]
    end

Key Functional Modules

1. Shift & Cash Drawer Control

Before processing any transactions, cashiers must open an active business shift by declaring the starting physical cash float. Every incoming cash payment, customer cash-in, and expense payout is tracked against that active shift. At handover, the app calculates expected versus physical cash, logging variances for management review.

2. Customer Meal AR & Institutional Accounts

Regular diners, faculty, or corporate employees maintain digital meal accounts with configurable credit ceilings. The system allows post-paid dining with automatic ledger updates, generating end-of-month statements for direct payroll deduction or cash settlement.

3. Rapid Counter POS & Hardware Integration

The UI is optimized for large touch targets and minimum taps. Counter staff can add items, select payment method (Cash, Digital Wallet, or Account Credit), and print an itemized kitchen slip in less than two seconds.

Case closed

More work.