TyreTrack - Offline Inventory Management for a Local Tyre Shop
A fully offline, self-hosted inventory system built for a Mauritius-based tyre shop - no internet dependency, no recurring costs, no cloud service to trust with a small business's data.
The Brief
The client, a tyre shop owner, was tracking stock manually, with no way to see current inventory at a glance, no automatic alerts when something was running low, and no reliable record of what had actually sold. Before writing any code, I put together a comparison of three real options (spreadsheets, a locally-hosted web app, a cloud-hosted one) so he could make an informed call rather than just taking my word for the “right” answer. He chose local hosting - no ongoing cost, no dependency on his own internet connection, his data never leaves the shop.
Listening for What Wasn't Being Asked
Somewhere in early conversations, the client kept circling back to one worry, almost reflexively - what happens if something gets accidentally deleted? He never framed it as a feature request. It came up more like a recurring, half-joking anxiety than a spec. But it kept coming up, and that pattern was the actual signal: this client needed to trust that the system would never quietly lose his history, even from his own mistakes.
That's what led to the soft-revert design, undoing a sale or restock never deletes the original record. It marks it as reverted and inserts a compensating entry, so the full, honest history stays intact forever. Nobody explicitly asked for “an audit trail with compensating transactions.” What was actually being asked for was reassurance, and the engineering answer to that was making irreversibility a non-issue by design.
What It Does
- >
Live inventory dashboard - searchable, filterable, with per-tyre low-stock status calculated against either a global threshold or a per-tyre override
- >
Full stock transaction system - sales, restocks, and manual corrections, each logged to an append-only audit trail
- >
A “Sales & Financials” page with VAT and gross-profit reporting, built on Mauritius's VAT-inclusive pricing model
- >
Supplier management, configurable thresholds, and a low-stock alert system
Technical Highlights
- >
Append-only audit ledger with price snapshots. Every stock movement snapshots the cost/selling price and VAT breakdown at the exact moment it happened - historical financial reporting stays accurate even after prices change later, with nothing retroactively recalculated.
- >
Exact VAT extraction, not approximation. The client's prices are VAT-inclusive, so the system backs VAT out using the precise r/(1+r) formula rather than estimating - computed server-side, every rupee accounted for correctly.
- >
Three-tier low-stock resolution. Effective threshold = per-tyre override, falling back to a global baseline, resolved at query time.
- >
Removing complexity on purpose. The system originally shipped with full JWT authentication. Once it was clear this was a genuinely single-user, offline, physically-secured deployment, I removed auth entirely rather than leave it in “just in case” - not over-engineering toward a best practice that didn't actually serve this use case.
Deployment
Rather than handing over source code, the app ships as pre-built Docker images, distributed via USB and loaded directly on the client's machine - his laptop never needs a build toolchain, and the source stays mine. Getting there meant working through real infrastructure problems: WSL2 disk management, Docker Desktop configuration issues, and building a safe, repeatable update procedure so future changes never put the client's live data at risk.
What's Next
The client's current paper VAT invoices are being digitized - a dual thermal-receipt/A4-PDF invoicing system, with every invoice persisted to the database so anything can be reprinted on demand rather than relying on saved files as the source of truth. in progress