Client project

Riziki POS

The point-of-sale, stock and production system an industrial-chemicals business runs on — selling, invoicing, credit, repacking and batch production from versioned formulas — plus the company website alongside it.

year
2026
role
Product design & full-stack engineering
type
Client project
stack
7 technologies
Riziki POS counter — products mixed to order priced by their chemicals, with a running sale and the total to payRiziki POS dashboard — takings and debtors for the day, and stock movement valued at cost: opening, bought, made, sold, used in mixing and closingRiziki POS sales history — 1,248 sales with retail and wholesale standing, part-paid balances, and filters for unpaid and on-accountRiziki POS sign-in — each person has their own PIN so every sale is recorded against them

The problem

Riziki buys detergent chemicals in bulk drums and bags, repacks them into smaller sizes, and blends finished products from its own recipes — then sells to walk-in retail and to wholesale buyers who take goods on credit. All of it ran on paper. Stock never reconciled, credit was tracked from memory, and the owner's formulas and margins had to stay invisible to counter staff.

My approach

I built two applications: a public website for products and enquiries, and a point-of-sale system covering the whole operation — selling, invoicing, stock, repacking, batch production from versioned formulas, customers and credit, purchases, expenses, stocktakes, day-close cash counts, reports and an activity log. The counter runs offline-tolerant, and the owner's view is gated server-side so staff never receive formulas, cost prices or profit.

How it's built

  • Next.js 16 (App Router, Server Actions) + React 19 + TypeScript on SQLite via node:sqlite; deployed with Docker and Caddy HTTPS on a VPS, with nightly backups.
  • Money as integer cents and quantity as integer thousandths — no floating-point drift anywhere in stock or accounting.
  • Stock is an append-only ledger: the database physically blocks UPDATE and DELETE on stock movements, so quantities can only change by posting a movement.
  • Sales are immutable — voiding posts compensating movements — and prices are snapshotted onto sale lines so reports can never be rewritten by a later price change.
  • Formulas are versioned: editing a recipe inserts a new version, and every batch records the version it was produced from.
  • Role-gated server-side: formulas, cost prices and profit are never sent to a staff session. Offline service worker, ESC/POS receipt printing, and Africa/Nairobi business dates so evening sales land on the right day.

Highlights

  • A trade-secret boundary enforced on the server — staff can sell without ever seeing a formula, a cost or a margin.
  • Append-only stock and immutable sales: the books reconcile because history physically cannot be edited.
  • Versioned formulas and batch production tying every mixed product back to the exact recipe used.
  • Offline-tolerant counter with receipt printing, day-close cash counts and a full activity log.