PesaTrack: building a private expense tracker that works offline
How and why I built a no-account, local-first money tracker for Android and iOS.
The problem
Most expense trackers ask for an account, sync your data to a server and fill the screen with ads. For people who just want to know where their money went, that is a lot of trust to hand over before getting any value.
In Tanzania, money also lives in several places at once: cash, a bank account and one or more mobile-money wallets. A useful tracker has to treat those as separate accounts, not as one pile.
What I set out to build
A tracker that works fully offline, needs no sign-up and keeps every record on the phone. Logging a transaction should take a few taps, and the numbers (balances, budgets, reports) should always add up.
Key decisions
- Local-first storage
- Data lives in a Hive database on the device. There is no backend to run, nothing to leak and nothing that breaks without a connection. The trade-off is that backup is the user's job, so export to CSV and JSON is built in.
- Multiple accounts from day one
- Cash, bank, mobile money and savings each have their own balance, and transfers between them are first-class, so totals stay honest.
- Clean, feature-based architecture
- Each feature (transactions, accounts, budgets, reports) is split into data, domain and presentation layers, with Riverpod for state. Business rules stay out of widgets, which keeps them testable.
- Privacy by default
- Analytics measure how the app is used (screens, feature taps), never what is in it: no amounts, notes or names are ever sent.
Making it dependable
A finance app that loses data is worse than no app. After seeing storage errors in crash reports, I made database opening defensive: if a box cannot be read, the app first copies the original file to a backup and only then starts fresh, and if even that fails it keeps the original untouched and runs in memory instead of crashing. Recovery is covered by automated tests, including restoring data from the backup.
The app reports crashes and performance through Firebase Crashlytics and Performance, with storage state attached to each report, so problems can be found without ever collecting financial data.
Stack
Flutter (Android and iOS), Riverpod, Hive, GoRouter, Firebase Analytics, Crashlytics and Performance.
Try PesaTrack
Free on Android and iOS. No account needed.