Skip to content
echtsquad
Own productSoftware & Apps

Mandi Khata: a digital ledger for commission agents

We rebuilt a fish market commission agent’s paper ledger as a web application where every balance is derived from entries rather than typed – a wrong total cannot be saved at all.

Mandi Khata: a digital ledger for commission agents

Starting point

In a Pakistani fish market a commission agent sells goods on behalf of suppliers and keeps a commission. Almost every buyer takes the goods on credit, so the business runs on knowing who owes whom. That record is a paper ledger: it cannot be searched, cannot be totalled without adding it up by hand, and is gone if the book is gone.

Solution

Every sale and cash movement is entered once; every balance, day total and report is derived from those entries. Money is stored as whole paisa and weight as whole grams, so no rounding error accumulates. The money identity (gross = commission + expenses + payout) is enforced as a database constraint, so an incorrect calculation cannot be saved. Nothing is ever deleted: a correction inserts a reversing entry and the original stays visible, struck through, like a line drawn in a paper ledger.

Implementation

React 19 with Vite and Tailwind on the front end, Supabase with Postgres as the backend. Two roles (owner, staff) are enforced in four layers, ending at row-level security in Postgres. The interface is available in English and Urdu with full right-to-left layout. Per-shop data isolation was proven by running two separate accounts against the same tables.

Workflow

How the data flows

  1. Sale / paymententered once
  2. Constraintmoney identity in Postgres
  3. Day bookfilterable, totalled
  4. Ledgersrunning balance per party
  5. Reportsowner only

Screens

Screenshots & mockups

Results

What changed

English + Urdu (RTL)

Languages

Verified result

4 layers down to row-level security

Role enforcement

Verified result

Intro call

Something similar in mind? Let’s talk.

In a free intro call we clarify what you need, what it costs and when it will be done. No sales pressure.