AKHIL SINGH
CREDIT DUE6,400ITEMINOUTSTOCKPOMFRET+42-1824PRAWN+30-34-4SURMAI+25-1114

A phone-first buy and sell book for a fish trader. Every harbour consignment and every sale goes in once, and stock, daily rates and customer credit fall out of the ledger.

The problem

A fish trader buys four to ten lots a morning at the harbour and sells them the same day. Hotels and vendors buy wholesale on credit and settle weekly. Walk-in customers pay cash or UPI. Prices change every morning. All of it was tracked in a paper book at the stall, and the question that mattered most, who owes what, depended on that book being right.

What I built

FishBook does four things, all from a phone at the stall:

  • Buy. Record a supplier consignment. Stock goes up and the per-unit cost is remembered.
  • Rates. Set today's selling price for every item in one pass.
  • Sell. A fast register for retail and wholesale, with a printable sale slip.
  • Collect. A per-customer ledger of what's outstanding and what's been paid.

How it works

The backend is a Go monolith on the standard library with PostgreSQL. Stock movements are an append-only table and the source of truth; the current stock figure is updated in the same transaction. Stock is allowed to go negative on purpose. A negative number means a purchase hasn't been entered yet, and the UI shows it in red so it gets fixed the same day.

Customer balances are never stored. Outstanding is derived from unpaid credit sales minus payments, and settlement only goes through payments, so there is one path and the numbers cannot disagree. Money is integer paise; quantities are fixed-precision decimals in kg or pieces.

Per-lot cost is kept so FIFO or weighted-average profit can be added later. Profit is deliberately not shown yet.

A fish catalog with local-language aliases is embedded in the binary, so adding an item never calls a third-party API. The frontend is a Next.js PWA with offline handling. The Android app is a Capacitor shell over the deployed web app, with native fixes for printing receipts and the back button.

Outcome

The web app and a signed Android APK are built, with Vitest on the frontend and backend tests that run against a real Postgres. The next step is a pilot with the trader.

Need something like this built? contact@akhilsingh.in

Next
AI Catalog Studio →