Dube
Offline-first debt book for shopkeepers: an Android app, a sync API and an admin panel
Dube, from the Amharic word for buying on credit, replaces the paper notebook shopkeepers use to track who owes them money. It works with no connection, syncs when one appears, and reminds the shopkeeper who to call.
The problem
Shopkeepers record credit in notebooks that get lost, can't be searched and never remind anyone to pay. Connectivity is unreliable, so a cloud-only app would fail at the counter.
What I built
The phone's SQLite database is the working store, so every action works offline. A hand-written sync engine pushes local changes and then pulls server changes using server-set cursors. Each shop is a tenant, and a subscription lock blocks writes after a grace period on both the server and the device.
Results
- 19 end-to-end API tests cover tenant isolation, the sync contract and the subscription lock.
- A written sync protocol document defines the contract between the app and the API.
- One runbook brings up the API, admin panel and Android app with seeded demo accounts.
Features
- Record credit and repayments with no connection
- Home screen of everyone with an outstanding balance, with tap-to-call
- English, Amharic and Afaan Oromo
- 14-day trial with offline payment by Telebirr, bank or cash, activated from the admin panel
- Writes blocked after a seven-day grace period, reads always allowed
- Money stored as whole santim end to end to avoid rounding errors
How it's put together
Three repositories: a NestJS API, an Expo Router app and a Vite admin panel.
- Tenant scoping applied to every query through AsyncLocalStorage context
- Push-then-pull sync with dirty flags and last-write-wins conflict handling
- Phone number and password sign-in through Better Auth
- PostgreSQL and Redis in Docker Compose, with a separate test database
Related projects
Mobile apps2026MediOne
MediOne, Djibouti
Online pharmacy and delivery for Djibouti, with a NestJS API and an Expo app that tracks orders on a map
Solo buildNestJSMikroORMPostgreSQL+13
Web apps2026Church management platform
Multi-tenant church management: members, households, attendance, forms, analytics and WhatsApp messaging
Solo buildNext.jsReactTanStack Query+11
Web apps2025–2026Shair
Hair consultation platform where a guided quiz builds a profile customers share with their salon
Solo buildReactViteTanStack Router+13