A fast, mobile-first personal tracker for who owes you money, how much, why, and whether they've paid. Built with Next.js (App Router) + Supabase, deployed on Vercel, installable on iPhone as a PWA.
- PIN lock — the app is gated behind a PIN. Data is fetched server-side only using the Supabase
service_rolekey, so the browser can never hit the database directly. The PIN unlocks a signed, httpOnly session cookie. - Supabase — data lives in two tables in the shared
body-coachproject:owe_peopleandowe_transactions(RLS on, no public policies — only the server can read/write). - Amounts can be negative — use the
−toggle for adjustments / partial repayments. - Paid vs Pending — marking paid removes it from outstanding totals but keeps the full history.
Set these in .env.local (local dev) and in Vercel → Project → Settings → Environment Variables:
| Variable | What |
|---|---|
SUPABASE_URL |
https://glmuhwqacdvzpoismpol.supabase.co |
SUPABASE_SERVICE_ROLE_KEY |
Supabase → body-coach → Settings → API → service_role (secret) |
APP_PIN |
The PIN you type to unlock (e.g. 4271) |
SESSION_SECRET |
Long random string. Generate: node -e "console.log(require('crypto').randomBytes(32).toString('base64url'))" |
npm install
npm run dev
# open http://localhost:3000- Push this folder to a GitHub repo (or use
vercelCLI). - In Vercel: New Project → import the repo.
- Add the 4 environment variables above (Production + Preview).
- Deploy. Vercel auto-detects Next.js.
npm i -g vercel
vercel # link + first deploy (preview)
vercel --prod # production deployAdd env vars with vercel env add SUPABASE_SERVICE_ROLE_KEY, etc., or in the dashboard.
- Open your Vercel URL in Safari on the iPhone.
- Tap the Share button → Add to Home Screen.
- Launch it from the icon — it opens full-screen like a native app.
See the owe_tracker_init migration. Tables:
owe_people(id, name, created_at)— unique onlower(name).owe_transactions(id, person_id, amount, description, note, txn_date, status, created_at)—statusispending|paid;amountmay be negative.