Case StudyFlutterSQLiteRiverpodLocal-FirstOpen Source

Pitaka

Local-First Personal Finance Tracker for Filipinos

RoleCreator & Lead Mobile Engineer
TimelineOngoing Open Source Project
Pitaka
Screenshot 1
Screenshot 2
Screenshot 3
The Problem & Context

The Challenge

Most financial apps require users to link sensitive banking credentials to third-party cloud servers or inundate users with ads and subscriptions. Filipinos needed a secure way to reconcile GCash, Maya, SeaBank, and traditional bank balances with zero privacy trade-offs.

The Engineering Solution

How It Was Solved

Engineered a local-first mobile client using Flutter and SQLite. State management is powered by Riverpod, ensuring asynchronous reactive UI updates with zero cloud dependencies or user tracking.

System Architecture & Data Flow

Local-First Reactive State Architecture

Zero network egress: client data remains entirely encapsulated on the local device filesystem with encryption.

Layer 01

Presentation Layer

Flutter widget tree with native adaptive design tokens and fluid gesture support.

Flutter, Material 3
Layer 02

Reactive State Controller

Riverpod providers orchestrating asynchronous financial computations and currency conversions.

Riverpod v2
Layer 03

Data Access Object (DAO)

Abstraction layer shielding repository queries and maintaining referential integrity across ledger items.

Dart DAO Pattern
Layer 04

Persistent Engine

Embedded on-device SQLite database with write-ahead logging (WAL) for microsecond query speeds.

SQLite / sqflite

Key Features & Engineering Highlights

Philippine Banking & E-Wallet Tailoring

Pre-configured metadata, fee schemas, and color-coded presets for GCash, Maya, BPI, BDO, UnionBank, and Gotyme.

Zero Cloud / Zero Analytics Tracking

No telemetry, no remote servers, no account registration. All transactions remain strictly on the user's hardware.

Multi-Currency Ledger & Instant Reconciliation

High-precision integer-based balance arithmetic preventing IEEE 754 floating point calculation inaccuracies.

Architectural Trade-offs & Decisions

Decision 1: Local SQLite Database over Cloud BaaS (Firebase/Supabase)

Why This Choice:

Personal finance data is extremely sensitive; local-first architecture offers immutable user trust and offline resilience anywhere in the country.

Accepted Trade-off:

Cross-device synchronization requires manual user-initiated file backups rather than automatic cloud replication.

Decision 2: Riverpod Code Generation over Vanilla Provider

Why This Choice:

Compile-time safety for provider dependencies, preventing runtime provider not found exceptions and optimizing rebuild trees.

Accepted Trade-off:

Requires running build_runner during development cycles.

Measurable Outcomes & Production Impact

  • ✓100% offline capability with zero latency on balance calculations.
  • ✓Over 0kb of user data sent to external servers, delivering true privacy.
  • ✓Open source codebase published on GitHub for community auditing.