EngineeringHow it's built
Khatabook is a local-first, cross-platform Flutter application organised as a two-surface product. The process starts in main, which owns a PersistentTabController and composes Home and Settings into a PersistentTabView. Home is the operational ledger: dashboard totals, party list, party statement, and give/got entry. Settings is the business control plane: profile, books, language, backup, PIN, and staff access. Tab state is retained, the Android back button is handled by the shell, and the navigation bar hides when the software keyboard is visible so amount entry never fights the chrome. A typical flow is: the owner opens Home, searches or selects a party, posts You Gave or You Got, the on-device ledger writes the entry and recomputes that party’s running balance plus business to-collect and to-pay, then the same record is available for statement sharing. Because the domain lives in one Flutter module graph, iOS, Android, web, Windows, macOS, and Linux all present the same book.
modularcross-platformlocal-firstpersistent navigation shellparty-centric ledger
Decision
One Flutter codebase for six platforms
The khata has to be on the phone at the counter and on a desktop in the back office, and those must be the same book.
Product, design, and ledger logic stay unified. A party posted on Android is the same party on web and Windows without a second implementation.
Decision
Persistent two-tab information architecture
Daily work is posting and collecting. Occasional work is configuring the business. Mixing those in one stack produces either a cluttered home or a settings screen nobody can find.
Home stays a ledger. Settings stays a control plane. Tab state, back-stack, and keyboard behaviour are owned by the shell so neither surface feels like a detour.
Decision
Party-centric books instead of generic transactions
Owners think in people and firms, not in a global journal. A running balance per party is the unit they already trust.
The product matches the mental model of the paper khata, which is what makes digital adoption possible at the counter.
Stack
Khatabook is a Flutter product on Dart 3, compiled to six platform targets from one codebase. Material and Cupertino are used together so the ledger feels native on Android and iOS while remaining coherent on web and desktop. A persistent bottom-navigation shell is the application backbone: Home is the operational ledger, Settings is business control, and tab state, back-stack, and keyboard behavior are treated as product infrastructure. The stack is chosen so a culturally specific financial workflow can ship as one application rather than as separate mobile, web, and desktop programmes.
FlutterDart 3Material DesignCupertinopersistent_bottom_nav_barOn-device SQLite ledgerFlutter multi-platform embeddingProgressive web app deliveryPlatform application sandboxBusiness PIN lockflutter_lints and widget tests