I'll build a beautiful mobile-first Family Expense Tracker with local-first persistence and a sync queue architecture (ready for future Google Sheets backend). Let me plan and execute efficiently.
Now let me install the router and build the whole app.
Now I'll create all the core files in parallel — types, storage layer with sync queue, auth, sample data, and updated CSS.
Now let me create the store hook, helpers, and all screens in parallel.
Let me fix the TypeScript errors - variable shadowing and unused imports.
Let me check the login file to see the remaining issue.
Good - the file looks correct. Let me build now to verify.
Built successfully. Here's a summary of what was implemented:
✅ Family Expense Tracker — Complete
Architecture
- Local-first persistence (localStorage) with a sync queue that's ready for Google Sheets Apps Script — just paste a webhook URL in Settings and pending changes auto-push
- Cross-tab reactivity via broadcast events
- HashRouter for static hosting (works on Cloudflare Pages without URL rewrite config)
Auth
- SHA-256 password hashing (Web Crypto API, no deps)
- First-launch "create password" flow → demo data is seeded
- 7-day session, logout clears it, forgot-password resets everything
Screens
- Login — gradient card, big touch targets, reset option
- Dashboard — month nav, Income / Expense / Net cards (Net turns green/rose based on sign), category breakdown bars with color chips, quick actions
- Add/Edit Transaction — type toggle, giant ₹ amount input, native date picker, smart comboboxes for Category & Paid By (filter-as-you-type + auto-add new), "Add & Done" / "Add & Continue"
- Transactions — filters (month / type / category), edit/delete inline, mini totals, "Unsynced" badge for dirty items
- Settings — cloud webhook URL, category chips with delete, paid-by list, CSV export, open-Sheet shortcut, sign-out, wipe-all
Design
- Mobile-first (max-w-xl centered), bottom nav with floating indigo "Add" pill
- Tailwind gradients (indigo→violet primary, emerald income, rose expense)
- Stable per-category colors, smooth fade/slide animations
- Safe-area padding for iOS, number-keyboard for amounts
Verified
- CRUD (save/update/edit/delete) all wired through
storage.ts
- Reports: monthly totals, category breakdowns (income + expense), filterable history, CSV export
- Build: 307 KB / 91 KB gzipped, compiled in 1.81s ✅
Files built: src/lib/types.ts, src/lib/auth.ts, src/lib/storage.ts, src/index.css, src/hooks/useStore.ts, src/lib/helpers.ts, src/components/Layout.tsx, src/screens/Login.tsx, src/screens/Dashboard.tsx, src/screens/AddTransaction.tsx, src/screens/Transactions.tsx, src/screens/Settings.tsx, src/App.tsx, index.html