HomeCase studiesCross-Platform Personal Finance Manager with Double-Entry Ledgering...

Case study · Toronto, Canada

Cross-Platform Personal Finance Manager with Double-Entry Ledgering & Bank Aggregation

Consumer Wealth & Budgeting FinTech

Households juggling checking accounts, credit cards, registered savings, and cross-border balances struggle to see real net cash flow when bank portals display pending holds and unlinked transfers differently. We engineered a cross-platform personal finance manager using Flutter, Node.js, and PostgreSQL that normalizes multi-institution feeds into a strict double-entry ledger. Users track category budgets, net worth trajectories, and recurring commitments across iOS, Android, and the web while keeping local snapshots responsive during flaky connectivity.

Industry
Consumer Wealth & Budgeting FinTech
Solution
A cross-platform Flutter mobile and web personal finance suite paired with a Node.js ingestion API and a PostgreSQL double-entry ledger.
Platforms
Cross-platform · Web & API
Stack
Flutter · Node.js · TypeScript · PostgreSQL · Redis · SQLite
Location
Toronto, Canada · delivered remotely
Role
Engineering, with the team behind for mobile and QA

Delivered remotely for a business based in Toronto, Canada. Names withheld by agreement.

Project Overview

Retail banking users rarely keep their financial lives inside a single institution. A typical household in Toronto splits daily spending across a primary chequing account, rewards credit cards, high-interest savings, and registered investment accounts—often spanning both Canadian and US dollar balances. Native banking portals show isolated balances and inconsistent merchant labels, leaving users to stitch spreadsheets together whenever they want an honest picture of monthly cash flow.

We engineered a unified personal finance manager spanning iOS, Android, and desktop web browsers through Flutter, backed by a TypeScript Node.js service layer and a PostgreSQL ledger. Rather than building a fragile screen-scraping wrapper around bank feeds, the architecture treats incoming bank activity, manual cash entries, and shared household budgets as verifiable ledger events that reconcile cleanly over time.

Consumer Data & Synchronization Challenges

Personal wealth tools fail quietly when data hygiene slips. Early discovery highlighted four engineering constraints that shaped the entire system:

  • Pending-to-settled churn: Card authorizations routinely shift amounts slightly (tips, fuel holds, FX spreads) between authorization and settlement, causing naive importers to double-count expenses or drop user edits.
  • Noisy merchant descriptors: Raw bank strings mix terminal codes, city abbreviations, and processor prefixes, hiding recurring subscriptions and distorting budget categories.
  • Transfer inflation: Moving funds from chequing to pay a credit card balance looks like two separate cash events in raw feeds, artificially inflating both income and spending totals unless paired automatically.
  • Household sharing boundaries: Partners need shared visibility into joint household budgets without exposing private individual accounts or compromising credential isolation.

Architectural Strategy

The system enforces a strict separation between raw external feed ingestion and canonical user ledger state. Incoming payloads from open-banking and aggregator adapters land first in staging tables inside PostgreSQL, preserving the exact upstream JSON for auditability and replay. A deterministic normalization pipeline in Node.js then maps those raw events into balanced double-entry postings.

On the client side, Flutter consumes compact delta payloads and caches active budget periods inside encrypted SQLite. Users inspect net worth charts, adjust monthly envelopes, and record cash purchases instantaneously without waiting on network round-trips, while BullMQ workers handle heavy institution polling asynchronously in the background.

Core Capabilities

  • Balanced Double-Entry Household Ledger: Tracks assets, liabilities, income, and expenses with automated transfer pairing so credit card payments and inter-account sweeps never skew spending totals.
  • Multi-Currency Valuation Engine: Supports mixed CAD, USD, and international accounts, computing historical net worth using dated FX snapshots alongside native-currency account views.
  • Deterministic Rules & Learning Overrides: Combines merchant token normalization, regex rule chains, and per-user override memory to categorize transactions accurately and allow one-tap bulk recategorization.
  • Recurring Bill & Cash-Flow Forecasting: Detects payroll cadences, rent, utilities, and subscription renewals to project upcoming account balances before the end of each pay cycle.
  • Granular Shared Spaces: Enables couples or family members to share selected accounts and joint budget categories with scoped read/write permissions.

Technical Architecture

External bank aggregators deliver transaction updates via webhooks and scheduled delta pulls into isolated Node.js worker processes. Workers decrypt institution link tokens on demand, normalize currency minor units using integer arithmetic, run deduplication and transfer-matching heuristics, and commit balanced ledger entries inside PostgreSQL transactions.

Flow: Bank Aggregators & Webhooks → Node.js Ingestion Workers (Redis/BullMQ) → Normalization & Transfer Matcher → PostgreSQL Double-Entry Ledger → Node.js REST/Sync API → Flutter Mobile & Web Client (Encrypted SQLite Cache)

To prevent race conditions during concurrent bank webhooks and manual edits, each account sync acquires a short-lived distributed lock in Redis keyed by institution link ID. Client synchronization relies on monotonic server sync cursors rather than wall-clock timestamps, ensuring neither mobile clock skew nor delayed webhook delivery skips a posting.

Technology Stack

Category Technology detail
Client Applications Flutter (iOS, Android, and responsive Web client from one codebase)
Local Device Storage Encrypted SQLite cache for offline ledger browsing and queued manual entries
API & Sync Services Node.js with TypeScript handling REST endpoints, webhooks, and aggregation orchestration
Core Financial Ledger PostgreSQL with ACID double-entry journal tables and row-level security
Job Queues & Caching Redis + BullMQ for bank-feed polling, categorization pipelines, and FX rate caching
Bank Connectivity Aggregator webhook and OAuth token adapters with institution-specific retry policies
Authentication & Secrets JWT short-lived access tokens, refresh rotation, and envelope encryption for link tokens
Container & Runtime Ops Dockerized API workers with structured observability and zero-downtime migrations

Engineering Trade-offs & Solutions

Engineering Challenge Solution & Trade-off
Floating-point rounding errors across multi-currency budgets Stored every monetary amount as signed 64-bit integer minor units paired with explicit ISO currency codes in PostgreSQL; slightly more verbose serialization in Node.js eliminated penny drift completely.
Bank webhooks arriving out of order or duplicating pending authorizations Built an idempotent staging-to-ledger reconciler keyed on external ID plus fuzzy settlement window matching, retaining raw webhook history for deterministic reprocessing.
Expensive aggregate queries slowing down monthly dashboard loads Maintained incremental materialized summary buckets per user, category, and month updated transactionally on ledger writes, trading minor write overhead for instant mobile dashboard loads.
Rebuilding chart and ledger formatting separately for web and mobile Standardized on Flutter across iOS, Android, and Web; required careful responsive layout tuning for desktop keyboard navigation, but removed cross-platform calculation discrepancies.

Security & Reliability

Financial aggregation demands least-privilege isolation even within internal infrastructure. PostgreSQL enforces Row-Level Security policies keyed to authenticated household scopes, providing a defense-in-depth guardrail behind Node.js authorization middleware. All monetary fields and aggregator link tokens are encrypted at rest, with per-user data encryption keys wrapped by hardware-backed KMS keys so database snapshots never expose usable credentials.

On mobile devices, local SQLite storage is encrypted via SQLCipher backed by keys stored in iOS Keychain and Android Keystore, gated behind optional biometric unlock. Outbound webhooks and aggregator callbacks require HMAC signature verification and replay-window checks before touching BullMQ queues.

Performance & Scale

Consumer finance traffic exhibits sharp spikes around Friday paydays, first-of-month rent cycles, and morning commute balance checks. BullMQ separates interactive user-triggered refreshes into a high-priority queue while throttling overnight background institution syncs to respect upstream aggregator rate limits.

In Flutter, transaction feeds paginate via keyset cursors rather than SQL OFFSET queries, keeping scroll performance smooth even when an account carries years of historical postings. Pre-computed monthly category rollups in PostgreSQL and short-TTL Redis caching for FX conversion tables keep p95 API responses predictable under heavy morning load.

Operational Outcomes

Consolidating multi-bank feeds, manual cash entries, and shared budgets into a disciplined ledger architecture improved clarity for users and maintainability for engineering:

  • Trustworthy net cash-flow reporting: Automated transfer pairing and pending-to-settled reconciliation stopped double-counting card repayments and authorization holds.
  • Consistent cross-device experience: Households switch seamlessly between phone check-ins on transit and detailed desktop category reviews with identical math and instant cached rendering.
  • Resilient upstream feed handling: Decoupled BullMQ ingestion workers absorb third-party bank outages and rate-limit backoffs gracefully without degrading client responsiveness.
  • Audit-ready ledger integrity: Double-entry invariants and raw feed staging tables give support and engineering teams deterministic traceability whenever a user questions a balance calculation.

01 — Questions

asked about this kind of project

Why model consumer budgeting on a double-entry PostgreSQL ledger instead of a flat transactions table?

Flat transaction tables break down as soon as a user transfers money from checking to a credit card or splits a grocery bill across shared household accounts. Modeling balanced debit and credit postings in PostgreSQL guarantees that internal transfers cancel out in net-spend reports while preserving exact account balances across every currency.

How does the system prevent duplicate transactions when pending bank authorizations settle?

The Node.js ingestion worker pairs each institution's external transaction identifier with a deterministic fingerprint covering account ID, posting window, normalized merchant descriptor, and signed amount. When a pending authorization clears with a settled timestamp, the pipeline promotes and reconciles the existing pending posting rather than inserting a second spend entry.

What happens when a user logs cash expenses or recategorizes spending while offline?

The Flutter app writes manual cash entries and category overrides into an encrypted local SQLite store tagged with client-generated UUIDs and logical timestamps. Once connectivity returns, a background sync worker replays those mutations idempotently against the Node.js API, resolving field-level conflicts without blocking the user interface.

How are third-party bank link tokens protected inside the backend?

Aggregator access tokens never reach mobile or browser storage. The Node.js service encrypts each institution token with per-user data keys managed via KMS envelope encryption before persisting the ciphertext in PostgreSQL, restricting decryption strictly to isolated sync workers.

Why choose Flutter for both mobile and web delivery in a consumer finance product?

Maintaining native Swift, Kotlin, and separate browser chart libraries introduced constant drift in currency rounding, date-range rollups, and interactive cash-flow graphs. Flutter allowed one Dart domain layer to drive consistent 60fps charts, budget envelopes, and keyboard-accessible web tables from shared state models.

How do you handle multi-currency accounts such as CAD checking alongside USD cards?

Every posting records both its native transaction currency and a base-currency valuation anchored to daily closing FX snapshots stored in PostgreSQL. Historical net-worth charts remain stable over time because past months retain their settlement-day conversion rate rather than recalculating retroactively against today's spot price.

03 — Similar project?

describe what is different about yours

Build yours.

Tell me what exists, what you need and the deadline. Fixed price for a defined scope, or $55/day (8–9 hours work) with a written plan first.

Solitaire Corporate Park, Makarba, Ahmedabad, Gujarat 380015, India · IST (UTC+5:30) · --:-- IST · Mon–Fri 09:00–18:00 IST · US & EU overlap daily

No newsletter, no CRM. Just a reply.