Web Application / POS & Factory Management

Sagacious Ice Factory

A cloud-based POS and factory management system for an ice manufacturing and distribution business.

Sagacious Ice Factory dashboard with today's sales, weekly production chart and cash versus credit split
Client
Sagacious Ice Factory, Sri Lanka
Industry
Ice manufacturing and distribution
Project type
Custom web app: POS and factory management
Year
2026
Platform
Desktop, tablet and mobile; installable on phones
Users
Admins and staff operators
Data & hosting
Supabase cloud database, hosted on Netlify
Overview

About this project.

A web application that runs the daily work of an ice factory in one place. Staff take orders and print or share invoices, the system keeps stock and customer credit up to date, and management can see sales, cash, debts and costs live from any device.

  • React
  • Vite
  • Tailwind CSS
  • Supabase
  • PostgreSQL
  • Realtime
  • Edge Functions
  • Recharts
  • jsPDF
  • Gemini AI
  • PWA
  • Netlify

What it helps with

  • Taking orders and producing invoices in a few taps
  • Tracking ice stock: production, purchases, brine and damaged cubes
  • Managing customer credit, part-payments and settlement receipts
  • Sending invoices and receipts to customers by WhatsApp or SMS
  • Keeping cash, bank deposits, cheques and expenses in one ledger
  • Running delivery trips, vehicles, staff and attendance
  • Giving management live dashboards and ready-made reports
The challenge

The factory ran its sales, stock and customer credit on paper books and separate notes. Daily totals were worked out by hand, customer balances were hard to check, and owners had to be at the factory to know how the business was doing. Credit customers, part-payments and cash shortfalls made it easy for numbers to drift out of line.

The solution

KAI Labs built one cloud system that covers the full daily cycle: production stock, order taking, invoicing, credit collection, cash and bank, delivery trips, staff and reporting. Every screen updates live, so the counter, the office and the owner all see the same numbers at the same time, from any device.

Key features

Everything the business runs on, in one place.

Executive Dashboard

  • Live daily revenue, split by cash, credit and bank
  • Weekly and monthly sales charts and stock trend graphs
  • Outstanding customer debt at a glance
  • One-tap shortcut to the Daily Manager Report (admin)

Sales & Point of Sale

  • Step-by-step order flow: pick a customer, choose cash or credit, add items
  • Registered, one-time (walk-in) and quick-registration customers
  • Multiple items per order, customer-specific prices and free cubes
  • Stock is checked before an order is saved, so you cannot oversell
  • PDF invoices with preview, print and download

Inventory

  • Separate stock for Production (MFC), Purchases / Resell (RSC), Brine (BNC) and Damaged cubes
  • Stock moves automatically with each sale, production entry and adjustment
  • Running stock balance graph over time

Customer Credit & Debt Collection

  • Running balance for every credit customer, including brought-forward debts
  • Full or part payments by cash, bank transfer or cheque
  • Cash-order shortfalls tracked as debt automatically
  • PDF settlement receipts showing the remaining balance
  • Complete debt history per customer

Customer Directory & Profiles

  • Auto-generated customer codes and phone number validation
  • Profiles with purchase history, payments, charts and date filters
  • Per-customer cube pricing
  • Branch support for customers with more than one location

WhatsApp & SMS Sharing

  • Send invoices and receipts to a customer's WhatsApp in one tap
  • SMS fallback for customers without WhatsApp
  • Public bill and receipt links that open without logging in
  • Log of every message sent

Cash & Bank

  • Cash in hand, bank deposits and cheque register in one place
  • Itemised cash income ledger and opening balances
  • Built-in checks keep cash and debt figures consistent

Expenses

  • Expense ledger with categories and a cash-book view
  • Edit and soft-delete with recovery

Transport & Vehicles

  • Delivery trips with driver, vehicle, start and end KM
  • Rules prevent mistakes: one active trip per vehicle, end KM above start KM
  • Vehicle profiles with trip history

Employees & Attendance

  • Employee records with auto-generated staff IDs
  • Attendance grid, including overnight shifts

Reports (Admin)

  • Daily Manager, Weekly, Monthly, Full (date range), Debtors, Customer Details and Custom reports
  • Filter by customer, cube type and payment method
  • Export to PDF

SAGA AI Assistant

  • Optional built-in assistant (Google Gemini) for questions about sales, stock, debts and expenses
  • Runs through a secure server function, so API keys never reach the browser
  • Can be switched on or off in Settings

Notes, Notifications & Activity

  • Notes and messages board for the team
  • Recent Actions log showing who did what, with Undo
  • Trash bin to restore deleted records

Settings & Administration

  • User management for staff accounts
  • Role-based access: Admin vs Staff permissions
  • Company branding for the logo and invoice header
  • Feature switches for AI, pricing mode and Undo
  • Themes: Light, Dark, Beach, Ocean and Liquid Glass
  • Backup and restore, branch setup and a protected admin danger zone
Smart reference codes

Every record is easy to find.

Every record gets a readable, unique code generated by the database. Sale, debt and trip numbers restart each month.

RecordFormatExample
Sale / InvoiceSIF_<no>_<MMYY>SIF_0001_0826
DebtSIFD_<no>_<MMYY>SIFD_0001_0826
Delivery TripSIFT_<no>_<MMYY>SIFT_0001_0826
CustomerSIFC_<no>SIFC_0001
EmployeeSIFE_<no>SIFE_0001
User roles & access

The right screens for every role.

Every staff screen requires a login, and each role sees only what it is allowed to use.

Admin

Owners and management, with full access including prices, settings, reports, deletions and user management.

Staff

Operators handling day-to-day sales, stock, customers and collections.

Security & reliability

Safe by design.

  • Login required for all staff screens
  • Prices, settings, reports and deletions are protected for admins
  • Row-level security at the database level
  • Business rules enforced in the database: stock checks, debt and cash consistency, trip rules
  • Activity log, Undo and a Trash bin to recover mistakes
  • Backup and restore from Settings
Platform & technology

Built for the browser, backed by the cloud.

Web access

A browser-based app that works on desktop, tablet and mobile, and can be added to a phone's home screen like an app. Needs an internet connection.

Cloud database

Supabase (managed PostgreSQL) with row-level security, live updates and secure server functions.

Cloud hosted

Front end hosted on Netlify, with a global CDN and HTTPS.

Tech stack

Front end
React 19, Vite, React Router, Tailwind CSS
Data & state
TanStack Query, React Hook Form, Zod
Back end & database
Supabase: PostgreSQL, Auth, Row-Level Security, Realtime, Edge Functions
Charts
Recharts
Documents
jsPDF + AutoTable
AI
Google Gemini, via a Supabase Edge Function
Messaging
WhatsApp click-to-chat and SMS links
Hosting
Netlify
Results

What changed for the business.

Start from the Ice Factory ERP template
  • Replaced paper books with one shared, live system
  • Faster order taking, with instant invoices sent straight to customers
  • Clear, up-to-date customer balances and debt collection history
  • Owners can check sales, cash and debts from anywhere