A small shop that runs on a ledger accurate to the last đồng.
- Role
- Product, design, full-stack build, operations
- Period
- Aug 2026 →
- Status
- Live, handling real customers' money
- Link
- lockcat.vn ↗
- Shot on
- Next.js 16FastAPIPostgreSQL 16Socket.IODockerCloudflare R2VercelGitHub Actions

A small shop sold on several channels and kept its books by hand. After shipping fees, cash on delivery and stock, the owner could not say what a sale actually earned, and every slip in the notebook cost real money.
Shoppers on their phones, an owner who needs the money picture, and staff who pack and deliver every day.
Five surfaces share one API: storefront, console, staff app, and the old app running alongside during the move. Each order posts double-entry lines, payments arrive through signed webhooks, and the owner edits fees and thresholds from a settings page instead of waiting for a deploy.
- Call · 01
A ledger the owner never has to see
The owner works with orders and cash. Underneath, every đồng moves through double entry. In November I reconciled cash on delivery against the carrier's report and the difference came to zero.
- Call · 02
Staff get their own app and their own API
Staff cannot reach the finance screens because their API has no route to them. A missing road beats a permission flag someone forgets to set.
- Call · 03
Business rules live in data
Fees, thresholds and rates sit in a settings registry read through cfg(). The owner changes a policy in a form; nobody redeploys.
- Call · 04
One 1 GB machine for API and database
I load-tested a rehearsal VM before committing: about 60 requests per second. Enough for the shop today, at close to zero hosting cost.
- 01Writes most of the backend, frontend and test code from a plan I approved
- 02Runs three specialist subagents: code review, schema review, test writing
- 03Bumps the version, the changelog and the notes after every change
- 01Anything touching the database, money, orders, stock or sign-in waits for a plan I sign off
- 02Nobody deletes or skips a test to turn the build green. After two failed fixes, a red test that reproduces the bug comes first
- 03A reviewer agent hunts money bugs: VND rounding, unbalanced entries, double clicks, refunds larger than the payment. It once caught an open-redirect hole before release
- 04Migrations only add. Data fixes run as separate scripts with a dry run first
- 01CI runs lint, tests, a settings-doc check and a Docker build, then deploys a SHA-256-hashed archive
- 02The database backs itself up before each migration; nightly encrypted backups go to three places and stay undeletable for 30 days
- 03Autoheal restarts the backend when /health goes quiet for two minutes
- 04A short outage produced the pool fix and autoheal; a sign-up probe produced an IP-blocking module