I'll analyze this request. The user wants a Family Expense Tracker with these key refinements from the final note:
- Local-first storage (save locally, then background sync) — not direct Google Sheets
- Password creation on first run (user creates their own)
- Beautiful, easy mobile-first flow
- Full CRUD: save, update, edit, delete + reports
Let me start by exploring the project structure.
Let me check the CSS setup, main entry, and utility files to understand the Tailwind configuration.
Now I understand the setup: React 19, Tailwind CSS v4 (via @import), single-file build, with @ alias and cn utility available.
Let me build this local-first Family Expense Tracker ("Gullak"). My plan:
- Local-first storage with instant localStorage saves + a background "sync" indicator/queue (with optional configurable endpoint hook)
- Password creation on first run (SHA-256 via Web Crypto)
- Full CRUD: add, edit, delete + monthly reports/dashboard
- Beautiful, mobile-first design with bottom nav
Let me start with the design system (CSS) and core library files.
Now the constants, storage, calculations, and CSV/backup utilities.
Now the core: the global state provider (AppContext) that handles local-first persistence, the background-sync indicator, auth (password create/verify/change), CRUD, and toasts.
Now the icon set and reusable UI primitives.
Now the reusable UI primitives (Button, Card, inputs, Modal, SegmentedControl, ProgressBar, EmptyState, etc.).
Now the authentication screen (handles first-time password creation + login).
Now the Header (top bar + brand + sync indicator) and BottomNav.
Let me create a small color helper and the shared TransactionRow component used by both Dashboard and the list.
Now the Dashboard — the main report screen with month selector, net balance, breakdowns, and recent activity.
Let me clean up the unused import and a leftover element in the Dashboard.
Now the Add/Edit Transaction form — a key screen for fast entry with "Add" and "Add & Continue" flows.
Now the Transaction List with filters (month/type/category), search, and date grouping.
Let me wire the TopBar's export button (uses the filtered list) instead of the placeholder.
Let me verify the final state of that file around the imports and TopBar.
The second edit didn't apply (parallel edits conflicted). Let me apply the TopBar change now.
Now the Settings screen — manage categories, change password, cloud sync config, data export/import, and logout.
Now the main App.tsx that wires routing, the toast host, and the phone-framed layout.
I introduced a nested provider bug. Let me rewrite App.tsx cleanly.
Now let me update index.html with a proper title, the Inter font, and mobile-friendly meta tags.
Let me clean up the redundant py-3.5 on the large button size, then build to verify everything compiles.
The build succeeded. Let me make one UX refinement: when editing a transaction, return to the screen the user came from (Dashboard or List) rather than always going to the List.
Parallel edits to the same file conflicted again. Let me check the current state and fix sequentially.
The state was added but the other two edits didn't apply. Let me fix editTransaction first.
Now update the edit screen's onDone to use the origin.
Let me rebuild to confirm everything compiles after the fixes.
The app builds cleanly. Let me add a couple of polish refinements to the Dashboard: prevent navigating into empty future months, and improve the net-balance subtitle. Let me view the relevant section first.
Let me add the current-or-future month check and use it. First the logic near positive:
Now update the forward button to be disabled when at the current month or beyond:
Now improve the net-balance subtitle. Let me view that section.
Let me rebuild to confirm everything still compiles.
The build is clean and the app is complete. Here's a summary of what I built.
Gullak — Family Expense Tracker
A polished, local-first mobile expense tracker that honors your pivot from direct Google Sheets to "save locally first, then sync in the background."
How it addresses your notes
- Local-first with background sync — Every change is written to
localStorage instantly (the true source of truth). A live sync indicator (Saving → Syncing → Saved) shows the background queue working. There's an optional Cloud Sync toggle in Settings where you can paste a webhook / Google Apps Script URL — when enabled, the app POSTs a JSON backup there automatically after each change (best-effort, never blocks the UI).
- Create password on first run — First launch shows a Create Password screen (with strength meter + confirm). The password is [SECURITY_DATA_4]‑256 hashed** (via Web Crypto) before storing — never plaintext. Returning users get a login screen; sessions persist 7 days, logout clears them, and the password is changeable in Settings.
- Save / update / edit / delete / reports — all implemented and verified.
Screens & features
- Auth — branded gradient create-password / unlock screen.
- Dashboard (reports) — month selector ◀ ▶ (can't scroll into empty future months), color-shifting net-balance hero, Income/Expense stat cards, expense & income breakdowns sorted high→low with percentage bars, and recent activity.
- Add / Edit transaction — big numeric amount pad, Income/Expense segmented toggle, category & paid-by comboboxes (type new → auto-saved), note, native date picker. "Add" and "Add & Continue" flows; edit includes delete with confirm.
- Transaction list — search + filters (month / type / category), date-grouped rows, per-filter income/expense/net summary, and one-tap CSV export of the filtered view.
- Settings — manage categories (add/delete), change password, cloud-sync config + "sync now", export CSV, JSON backup/restore, load sample data, clear data, full reset, and logout.
Craft details
- Mobile-first phone-framed layout, bottom nav with a raised + FAB, toasts, confirm dialogs, friendly empty states, smooth animations, INR (₹) formatting, and large touch targets with numeric keyboards.
- Clean modular structure:
lib/ (types, storage, crypto, calculations, csv, format, colors), context/AppContext, and reusable components/.
To connect real Google Sheets later: deploy a Google Apps Script doPost that accepts the JSON backup and write its URL into Settings → Cloud Sync — the local-first core keeps working regardless.
Files built: src/index.css, src/lib/types.ts, src/lib/crypto.ts, src/lib/format.ts, src/lib/constants.ts, src/lib/storage.ts, src/lib/calculations.ts, src/lib/csv.ts, src/context/AppContext.tsx, src/components/Icons.tsx, src/components/ui.tsx, src/components/Login.tsx, src/components/Header.tsx, src/components/BottomNav.tsx, src/lib/colors.ts, src/components/TransactionRow.tsx, src/components/Dashboard.tsx, src/components/AddTransaction.tsx, src/components/TransactionList.tsx, src/components/Settings.tsx, src/App.tsx, index.html