Personal product · Active & live (2026–Present)

FlowPath

Offline-first double-entry personal finance PWA with bilingual quick entry, IndexedDB causal sync, and dual-layer encrypted backups.

Creator & Full-Stack Developer. Designed the SQLite double-entry ledger, offline sync queue, bilingual parser, and encrypted Drive/R2 backup pipeline.

System architecture & sync flow

Local-first writes queue in Dexie IndexedDB with pure state projection, sync causally into SQLite WAL via Web Locks and idempotency keys, and replicate to Google Drive and Cloudflare R2.

CLIENT · OFFLINE-FIRST PWABILINGUAL PARSERQuick Entry (ID / EN)Mixed-intent + direction guardsDEXIE INDEXEDDBsyncQueue + cachedStateQueue coalescing & pure projectionAPP SHELLService Worker + Web LocksCross-tab serialized syncIdempotencyUUID remapSERVER · NEXT.JS + NODE:SQLITEREST API (38 ROUTES)Zod + OIDC + ConcurrencyCSRF, expectedUpdatedAt, locksDOUBLE-ENTRY LEDGERSQLite WAL (19 Tables)SUM(credit - debit) · 0 driftDocker · Coolify · Caddy TLSDUAL-LAYER BACKUPPER-USER AUTO-BACKUPGoogle Drive v3JSON v3 + SHA-256AES-256-GCM tokensOFFSITE SERVER SNAPSHOTCloudflare Worker + R2VACUUM INTO → gzip + AESGFS retention (24h / 7d / 4w)

Architecture & technical choices

  • Derived double-entry ledger (node:sqlite WAL): Wallet balances are never stored as mutable columns. Every balance is derived from active entries (SUM(credit - debit)), while debt and reimbursement movements are isolated as system adjustments so cash-flow analytics stay accurate with zero balance drift.
  • Offline-first causal sync (Dexie + Web Locks): Mutations write locally to IndexedDB with queue coalescing and pure state projection over the server snapshot. When online, flushSyncQueue replays operations sequentially using Idempotency-Key, optimistic concurrency (expectedUpdatedAt), automatic temporary-to-server UUID remapping, and navigator.locks across tabs.
  • Bilingual quick-entry parser: A deterministic local parser splits mixed-intent Indonesian/English notes (expenses, transfers, debts, reminders) with financial direction guards so reimbursements never leak into income, plus optional OpenAI-compatible parsing validated with Zod.
  • Dual-layer encrypted backup: Per-user incremental Google Drive backups (drive.file, AES-256-GCM encrypted tokens) paired with scheduled SQLite VACUUM INTO snapshots compressed, encrypted (FLOWPATH2), and shipped to a Cloudflare Worker + R2 bucket with GFS retention.

Scope & testing

19 SQLite tables, 38 active REST endpoints, 14 unit/integration suites, and 6 Playwright E2E offline browser tests—containerized with multi-stage Docker and deployed via Coolify & Caddy.

Product interface

Technology stack

  • Next.js 16
  • React 19
  • TypeScript
  • Node.js SQLite
  • Dexie IndexedDB
  • Zod
  • Google OIDC
  • Cloudflare R2
  • Docker
XX · Judgement

Contact

Send a Prayer · Above the Gray Fog