SKIP TO MAIN CONTENT
Back to projects
Hay Vara? - Expense Tracker
Beta Lead Personal 5 mos

Hay Vara? - Expense Tracker

Offline-first expense tracking across iOS, Android, and Web — built from a single Flutter codebase.

Cross-platform

A cross-platform Flutter expense tracker with offline-first data and Clean Architecture — built as a production side project with a co-founder.

Challenges & Solutions

  1. 1
    Challenge

    Drift's mobile implementation relies on dart:io and a native SQLite file via NativeDatabase — neither exists in a browser. The data model and queries were platform-agnostic, but the connection layer wasn't: web required running SQLite as WASM, with Drift falling back between OPFS and IndexedDB depending on browser support. Connection setup also became async and more fragile — a misconfigured asset path or incomplete deploy could let the app boot with no working database at all.

    Solution

    Isolated the database connection behind a single factory function using Dart's conditional imports — resolving to a native file-based implementation on mobile and a WASM-based implementation on web, both exposed through the same AppDatabase contract. Repositories remain unaware of which implementation is active. Added logging to catch silent storage-fallback issues, and ensured WASM assets are correctly versioned and published as part of the Firebase Hosting build.

  2. 2
    Challenge

    The goal wasn't bidirectional sync — it was simpler: deciding what to show when the API is unreachable. Reads follow a network-first strategy, while writes (create/update/delete) require connectivity and fail outright when offline.

    Solution

    Rather than building a sync queue or conflict resolution system, the app uses an implicit 'server wins' strategy on reconnect — the next successful read overwrites the local cache. A deliberate trade-off for an MVP: offline support covers read access while avoiding the complexity that full bidirectional sync would require.

Tech Stack

Languages

Dart

Frameworks

Flutter

Architecture

Feature-first Clean Architecture (data / domain / presentation) with Bloc for state management

Backend

Dart FrogRenderFirebase Auth

Tools & CI/CD

go_routerget_it + injectable (dependency injection)Drift (local persistence — SQLite native / WASM+IndexedDB on web)Dio (networking)Firebase Hosting (web deployment)GitHub Actions (CI/CD — analyze, test, build, deploy)i18n via ARB (English & Spanish)Unit & widget testing

Screenshots