A free, mobile-first PWA for managing event budgets (weddings, etc.) — built so a small group of family members can collaborate on a shared expense list and a separate plan/forecast.
Stack: React + Vite + TypeScript + Tailwind v4 · Supabase (Postgres + Auth + RLS) · GitHub Pages.
This README covers the base setup (auth + DB connection + deploy pipeline). Features (events, transactions, plan items, sharing) are added in later iterations.
- Node 22+ and npm 10+
- A free Supabase account
- A Google Cloud Console project for OAuth (free)
- A GitHub account with this repo
- Sign in at supabase.com (use GitHub).
- New project → name
event-planner→ region ap-south-1 (Mumbai) → generate a strong DB password and save it. - Wait ~2 minutes for the project to be provisioned.
- Project Settings → API: copy the Project URL and anon public key.
In the Supabase dashboard → SQL Editor → paste the contents of supabase/migrations/0001_profiles.sql and run it. This creates the profiles table, the auto-create-on-signup trigger, and RLS policies.
- In Google Cloud Console, create a new project
event-planner. - APIs & Services → OAuth consent screen → External → fill in app name, support email, developer email → add scope
openid email profile→ save. - APIs & Services → Credentials → Create credentials → OAuth client ID → Web application:
- Authorized redirect URIs:
https://<your-project-ref>.supabase.co/auth/v1/callback
- Save and copy the Client ID and Client Secret.
- Authorized redirect URIs:
- Supabase dashboard → Authentication → Providers → Google → enable, paste Client ID + Client Secret → save.
- Authentication → URL Configuration → set Site URL to your live GitHub Pages URL, e.g.
https://<your-username>.github.io/EventPlanner/. Under Redirect URLs, add bothhttp://localhost:5173/EventPlanner/**(local dev) andhttps://<your-username>.github.io/EventPlanner/**(production). The/EventPlanner/path is required because vite.config.ts setsbase: '/EventPlanner/'.
cp .env.example .env.local
# fill in VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY
npm install
npm run devOpen http://localhost:5173/EventPlanner/ (note the path — required because of the base setting in vite.config.ts). Sign in with Google → fill phone → see Home.
- GitHub repo → Settings → Pages → Source = GitHub Actions.
- Settings → Secrets and variables → Actions → New repository secret, add:
VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEY
- Push to
main. TheDeploy to GitHub Pagesworkflow builds and publishes the site. - Once live, copy your Pages URL into Supabase Site URL and into the Google OAuth Authorized redirect URIs.
The Supabase keep-alive workflow runs every 5 days to prevent Supabase's free-tier projects from pausing after 7 days of inactivity. No action needed once the secrets above are set.
npm run dev— local dev servernpm run build— type-check then production build intodist/npm run preview— preview the built site locallynpm run typecheck— TypeScript only, no build
src/
lib/
supabase.ts — Supabase client + Profile type
auth.tsx — AuthProvider, useAuth() hook
components/
SignIn.tsx — Google button + magic link form
PhoneCapture.tsx — one-time phone capture after first sign-in
Home.tsx — placeholder; features go here next
App.tsx — top-level branching (SignIn / PhoneCapture / Home)
main.tsx — entry point
supabase/
migrations/
0001_profiles.sql — profiles table + RLS + triggers
.github/workflows/
deploy.yml — push-to-main → GH Pages
keep-alive.yml — every 5 days → ping Supabase
Zero, as long as we stay within the Supabase free tier (500 MB DB / 50 k MAU / unlimited API calls). No credit card needed.