Personal expense tracker PWA. React 18 + Vite, Supabase, GitHub Pages. Built from expense-tracker-prd.md.
npm install
npm run dev
- Create a project at supabase.com → copy the Project URL and anon key into
src/lib/supabase.js(replace the two placeholders) - SQL editor → run
supabase/schema.sql - Authentication → Providers → Email: enabled. Turn Confirm email: off for instant registration (or leave on if you want email verification)
- Authentication → URL Configuration → Site URL:
https://<your-username>.github.io/expense-tracker/ - After deploying, register once with your email and a password
- Then Authentication → Settings → turn off "Allow new users to sign up" so nobody else can register
- Create a repo named exactly
expense-tracker(the Vite base path and manifest depend on it) - Push this folder to
main - Repo Settings → Pages → Source: GitHub Actions
- Every push to
mainbuilds and deploys automatically (.github/workflows/deploy.yml)
Open the deployed URL in Safari → Share → Add to Home Screen. The app runs fullscreen, works offline, and self-updates on next open after each deploy.
- The anon key is safe to commit; Row Level Security is the security boundary
- Sign-in uses email OTP codes, never magic links (magic links break installed iOS PWAs)
- All dates are computed in local time, never via
toISOString()(IST midnight bug) - Offline writes queue in localStorage and flush when back online; client-generated UUIDs + upsert make retries idempotent