
CASE STUDY · PERSONAL ·
Pocket Budget
Offline-First Spending Tracker
React NativeSQLiteTypeScript
Overview
Pocket Budget is a sample mobile app. The goal: log an expense in under five seconds, even with no signal.
The constraint that shapes everything
People log spending in shops, on trains and in lifts. So the app treats "offline" as the normal state: every write goes to a local SQLite database first and syncs later.
How it works
- Write the expense to local storage immediately.
- Mark it as pending in a sync queue.
- When a connection returns, push the queue and pull remote changes.
- Resolve conflicts by last-write-wins per field.
What I'd do differently
Conflict resolution by timestamp is simple but can drop edits made on two devices at once. A per-field vector clock would be the next step.