Inspiration
Most money apps ask for an account, a server and your bank's SMS access, and then keep your spending data. I wanted one for everyday money in India that doesn't work that way. It should track spending, budgets, splits and bills, and it should keep everything on your own phone. The name baaki is the Hindi word for what's left over or still owed, which is the question most people actually have about their money.
What it does
Baaki is an offline-first personal finance app for Android and iOS. It has no account, no server and no network requests.
- Track income and expenses with a calculator-style keypad (it even has an equals key).
- Set monthly budgets by category and account, and set up recurring bills that post themselves when due.
- Split purchases between people and track who still owes you, then settle each share into an account.
- See where the money went in reports (overview, cash flow, income, expense, category and account) and a spending calendar drawn as sized bubbles.
- Import bank statements from CSV or Excel, and export your data.
- Make password-locked backups that restore on any phone, and lock the app with biometrics.
- Start with a guided setup tour and demo data.
How I built it
- UI: I built the app with Next.js 15, React 19, TypeScript, Tailwind and Recharts, as a static export.
- Database: PGlite (Postgres compiled to WebAssembly) runs on the device behind Prisma through a driver adapter. The schema has 17 SQL migrations that run on the phone.
- Native shells: Capacitor 8 wraps the same build for Android and iOS. Small native plugins in Java and Swift handle the launch video and a privacy screen for the app switcher.
- Backups: they use AES-256-GCM with a PBKDF2-SHA-256 key (600,000 iterations), so a backup opens on any phone with just the password.
- Quality: about 27,000 lines of TypeScript with 39 Vitest files covering money maths, splits, backup crypto, migrations and importers. CI runs lint, type-check, tests, the build and a debug APK on every push.
Challenges I ran into
- A real Postgres on a phone. Prisma and Postgres normally assume a server. I had to run them in the browser engine, in a worker, with the migrations applied on the device. The schema history also shows the app was first built with logins and a server and later stripped down to the on-device design.
- iOS and the database files. On iOS the database couldn't be reopened after the app reloaded. The fix was to close its files before the reload.
- Old Android WebViews. Layout bugs such as the spending legend wrapping onto two lines needed fixes for older versions.
- Money correctness. Amounts are stored in paise, rounding needed care (amounts shown without paise had to round rather than cut off), and a test now checks that adding a transaction moves every number by exactly the right amount.
- Messy imports. Identical rows in a statement are real, separate purchases and had to stay separate.
- Keeping the code maintainable. I refactored the biggest components into parts and grouped src/lib by concern.
Accomplishments that I'm proud of
- It is fully private by design, with no account and no server, and it still has the features of a connected app.
- One codebase ships on both Android and iOS, with published releases (v1.0.0 on 8 Oct 2026, v1.1.0 on 15 Nov 2026).
- Encrypted backups that restore on any phone, and a test suite that guards the money logic.
- A polished first run: a launch video, an app tour, profile pictures and a spending calendar that looks good.
What I learned
- Postgres on-device through WebAssembly is practical, and a static web build inside Capacitor gets you both platforms.
- Local-first moves the hard problems to migrations, backups and recovery, because there is no server to fall back on.
- Money code needs tests more than most code does.
- Each platform's WebView behaves differently, so the "same code" still needs native-specific fixes.
What's next for Baaki
- A Play Store and App Store release.
- Optional sync between your own devices that stays end-to-end encrypted.
- Smarter imports, such as auto-categorising from past statements.
- Widgets and reminders for upcoming bills.
