Skip to content

CASE STUDY · CLIENT PROJECT

Hatoba

A retail system for a health-food store: point of sale, warehouse, and online shop that finally agree on one stock figure.

CLIENT
Hatoba — Rumah Pangan Sehat
OUR ROLE
Assessment, redesign, build, deploy
CHANNELS
Point of sale, warehouse, online store
STARTED
August 2026, still running

The problem

Hatoba's retail system was built in 2021. Since March 2024 its stock sync had stopped working — and nobody knew for more than two years.

The numbers at the till, in the warehouse, and in the online store slowly drifted apart. No error message, no warning. Just stock that no longer matched, and one new habit in the store: counting by hand before trusting the screen.

We read the code first

Before proposing anything, we went through the existing system. It turned up 14 faults visible in the code, and 7 more that only surfaced once it was running.

The conclusion was not a pleasant one to deliver: this was not one bug that could be patched. The way that system stored stock made drift impossible to detect. The owner decided to rebuild. Three days later the first version was running on the server.

Stock is never overwritten

The old system kept stock as a single number, overwritten on every change. The moment one write failed, the number was wrong for good, with no trail to show when it started going astray.

Now every movement is recorded as a new row, and the database refuses update and delete on those rows — refused at the database layer, not merely a rule in code that can be worked around. The stock balance is not a stored number; it is the sum of its rows. If a figure looks wrong, the rows can be opened one by one: when, at which location, for what reason, and by whom.

A product page in the Hatoba admin panel: stock per location on top, movement history below it.
A single product page. The 64 and 17 above were never typed in by anyone — both are the sum of the rows beneath them.

One system, three channels

The till and the warehouse run as a desktop application that keeps working when the internet is down, then catches up on its own once the network returns. Customers shop on the web from their phones.

All three are served by the same program reading the same ledger. There are no longer two places that can disagree about stock, because there is only one place.

The product list in the Hatoba admin panel, with columns for cost price, selling price, and margin.
The catalogue in the admin panel: cost price, selling price and margin all in one table.
The Hatoba online store front with its product list, selling prices, and category filter.
The customer storefront, from exactly the same catalogue. The cost price never leaves the building — only the selling price is ever sent to a public channel.

Two small things that save a lot

Every operation that changes stock must carry an idempotency key. If a cashier taps twice because the network feels slow, the second one is rejected — not recorded twice.

The till's basket is also cleared only after the server has actually answered with success. In the old system the basket was cleared first; if the answer never came, the sale vanished without trace and only turned up at closing.

About the results

This page deliberately carries no “Results” section full of numbers yet. The system has been running since August 2026, but we do not yet have before-and-after measurements we can stand behind — how long closing the books used to take against now, what the latest stock discrepancy is. Once those numbers exist and the owner is happy for us to publish them, those are what will go here.

Screenshots were taken from a test installation with invented data. No real customer names, prices, or receipt numbers appear on this page.

RUNS ON

  • Go
  • PostgreSQL
  • Wails desktop app
  • Flutter
  • Docker on a VPS
  • Cloudflare Tunnel

All work

Let's build something worth running

Tell us what you are trying to build or monitor. We will be straightforward about whether we can solve it, and how we would approach it.

Tell us about your project

No commitment. We reply personally within 1–2 business days.

WhatsApp