Privacy-First Expense Tracker Data Flow

This walkthrough applies the topic to a Kenya SMS finance tracker: local data, no transaction-data network calls in v1, CSV export, app lock, and optional user-owned backup later.

Flow

flowchart TD
    sms["SMS inbox"] --> parser["On-device parser"]
    parser --> review["User review"]
    review --> room[(Room database)]
    room --> charts["Local charts"]
    room --> csv["CSV export"]
    room --> backup["Optional encrypted backup"]
    keyStore["Android Keystore"] --> backup

Data Model

TablePurpose
raw_messagessource SMS text and sender metadata, if user opts in
transactionsnormalized expenses/income/transfers
categorieslocal category rules
exportsexport audit metadata
settingsapp preferences, never hardcoded secrets

V1 Boundaries

  • no cloud account required
  • no transaction data sent to a server
  • app works offline
  • CSV export is visible from settings and empty-state copy
  • biometric/PIN lock protects casual access
  • migration tests run before release

Later Backup

Add user-owned backup only after local export works. A good backup v2 encrypts the backup before it leaves the device and verifies restore on a clean install.