TrackTrack

Inventory, sales and credit for wholesalers - built for the doorway, not the office.

Short walkthrough of the real app (muted).

Overview

A multi-tenant web app for Ghanaian wholesalers: stock counted in cartons and loose pieces, multi-item sales with discounts and credit, purchase orders, money owed, and reports - and it keeps selling when the network drops.

What makes it work

  • Offline-first: sales recorded on the phone without signal are queued and synced when the network returns
  • ACID checkout - a multi-item sale rolls back completely if stock runs out halfway through
  • Units that match the trade: cartons and loose pieces, with price and stock converted automatically
  • Credit ledger: sell on credit, age the debt (30/60/90 days) and record payments against the original sale
  • Multi-tenant with roles, permissions and an audit log per business
  • Per-tenant backup and restore (ZIP of CSVs) that can never touch another business's data
  • PDF, Excel and CSV reports; subscription plans paid with mobile money

The story

The problem

Walk into a beverage wholesaler in Takoradi and the system is a notebook and the owner's memory. Stock arrives in cartons and leaves in pieces. Half the customers buy on credit. The internet at the counter comes and goes. Off-the-shelf inventory software assumes none of that, so it gets abandoned within a month.

What TrackTrack does

It models the trade the way it actually happens. Products carry two units - the carton you buy in and the piece you sell in - and the app converts stock and prices between them automatically, so the loose bottles on the floor are never lost. A sale can hold many products, apply a discount inside a limit the owner sets (every price change is recorded against the user who made it), and be paid in full, in part, or put on credit. Purchase orders go from "raised" to "received partly" to "received in full", each delivery creating a stock batch with its real cost, so restocking shows what you paid last time and which supplier is actually cheapest. The Today screen opens on the four numbers a wholesaler checks first: the week's sales, money owed, what needs restocking, and anything that needs attention.

Credit, aged properly

Money owed is a ledger, not a note. Each credit sale ages through 30, 60 and 90 days; payments are recorded against the sale they belong to; the dashboard shows total outstanding, how many customers owe, and how much is more than 90 days old.

It keeps selling when the network drops

This is the part I'm proudest of. TrackTrack is installable as a progressive web app. When the connection is gone, a sale is saved on the device and clearly marked waiting to sync - on every screen, until it lands. When the network returns, the sale is re-checked against live stock and prices on the server, and if something no longer adds up it is refused and the seller is told why. Nothing is silently dropped and nothing is silently accepted.

How it's built

Flask on the backend with PostgreSQL (hosted on Neon) and Alembic migrations as the only way the schema changes. Every multi-item sale is one database transaction: if a product runs out halfway through checkout the whole sale rolls back. The app is multi-tenant - each business has its own users, roles, permissions and audit log - and an owner can export everything they own as a ZIP of CSVs and restore it later; primary keys are remapped on import so an archive can never overwrite another business's data. Reports come out as PDF, Excel or CSV with the unit stated on every line. Plans (a free tier for a kiosk, paid tiers for a shop or a depot) are paid by mobile money and never auto-renew - the app reminds you before a plan runs out. The whole thing ships as a Docker image with a pytest suite, and I wrote a small recorder that films the real app so the pitch video is always the current version.