All work

Case study · 02

Onhand

Offline-first inventory, sales and stock for one store owner.

Working v1 on Android. Not in a store yet.

Onhand product pageOnhand homeOnhand receipt
13
Screens
31
API endpoints
~380
Automated test cases in the app
0
Bars of signal needed to sell
2.5
Months, Aug to Nov 2026

What it does

Onhand is a Flutter inventory app for a single store owner. Stock is a ledger of movements recorded by scanning: sales, purchases, returns, damage and counts. Everything a shop needs at the counter works offline.

  • Sell and receive: one item at a time or in a batch, pay-later sales, warranty and serial or IMEI tracking, and a warning before you sell more than you have.
  • Costs stay private: purchase costs show as a letter code from a secret word, revealed only after the phone’s fingerprint, face or PIN.
  • Paperwork: 80 mm PDF receipts with warranty dates, barcode label sheets (24, 40 or 65 per A4 page) and a restock list to share.
  • Insight: sales and profit reports, best sellers and slow movers, stock value, and a pay-later ledger.

The store picks its own main and second currency.

Home: products with a stock-health header
A product, its cost code and stock
A warning before selling more than you have
Selling several items at once
An 80 mm PDF receipt
Reports, with profit unlocked
Offline: changes wait to sync
The queue of waiting changes
When the server can’t be reached
The pay-later ledger

How it’s built

The app is Flutter with Riverpod and a repository layer: a cached repository wraps the API one, so screens read from memory and the cache first. The backend is a Laravel 12 API with Sanctum tokens and MySQL, running in Docker on my VPS.

  • Offline: new products and stock movements apply on the phone at once, wait in an ordered queue per account, and replay when the connection returns.
  • Security: the token lives in secure storage, release builds refuse plain HTTP, sign-out clears every cache, and the app respects the server’s rate limits.
  • Interface: my own design system with bundled fonts and motion that turns off when the phone asks for reduced motion.
  • Flutter
  • Dart
  • Riverpod
  • Laravel
  • Sanctum
  • MySQL
  • Barcode scanning
  • PDF
  • Offline-first
  • Docker

Engineering stories

Selling offline without saving twice

A sale made with no signal must reach the server exactly once, even if the app resends it after a timeout. Each change carries its own ID from the phone, so the server can safely ignore a repeat; changes replay in order, and temporary IDs for new products are swapped for the server’s once they sync.

Hiding margins at the counter

A customer standing next to the owner shouldn’t see what an item cost. Costs show as letters from a secret ten-letter word, and the real number appears only while you hold it, after fingerprint, face or phone PIN, with an app PIN and lockout as a fallback.

Scanning that doesn’t create junk

Phone cameras misread barcodes, and every misread offered to create a new product. Unknown codes now need three matching reads, check digits are verified, and only real product barcode formats are accepted.

Where it stands

Onhand works on Android and was tested on a real phone. Only I have used it, and it isn’t in a store yet. It’s English only with a light theme, and reports, photos and the pay-later ledger need a connection. The screenshots show a demo store with made-up products.

Next projectNotesApp

↑↓ move · Enter open · Esc close