A personal finance web app: track income and expenses, multiple accounts, transfers, and custom categories. Built with React, Vite, Tailwind CSS, and Supabase. Single-user; syncs across devices after login.
-
Install dependencies
npm install
-
Set up environment variables
Copy
.env.exampleto.envand fill in your Supabase credentials:cp .env.example .env
Edit
.envand set:VITE_SUPABASE_URL– your Supabase project URLVITE_SUPABASE_ANON_KEY– your Supabase anonymous (public) key
-
Start the dev server
npm run dev
Open the URL shown in the terminal (e.g. http://localhost:5173).
-
Create a Supabase project at supabase.com (free tier).
-
Get your credentials
In the Supabase dashboard: Project Settings → API. Copy:- Project URL → use as
VITE_SUPABASE_URL - anon public key → use as
VITE_SUPABASE_ANON_KEY
- Project URL → use as
-
Enable Email auth
In Authentication → Providers, ensure Email is enabled (default). You can disable other providers if you only use email + password. -
Run the database schema
In SQL Editor, run the contents ofsupabase/migration_full_finance.sql. It createsaccounts,categories, andtransactions(and migrates from the oldexpensestable if present). For a brand-new project with no existing data, the same file works and the app will create a default account and categories on first login.
After that, use Authentication → Users to create a user (or sign up from the app).
- Push the project to a Git repository (e.g. GitHub).
- In Vercel, Add New Project and import the repo.
- Set Environment Variables:
VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEY
- Build settings (usually auto-detected):
- Build Command:
npm run build - Output Directory:
dist
- Build Command:
- Deploy. Your app will be available at the generated URL.
To deploy from the command line (after linking the project once in the Vercel dashboard): npx vercel --prod.
- Run
npm run build, then upload the contents of thedistfolder to any static host (Netlify, GitHub Pages, etc.). - Configure the same environment variables in the host’s dashboard so they are available at build time.
To initialize a Git repository and make an initial commit:
git init
git add .
git commit -m "Initial commit: expense tracker MVP"- Frontend: React 18, Vite, TypeScript, Tailwind CSS
- Backend / DB / Auth: Supabase (PostgreSQL + Auth)
- Hosting: Any static host (e.g. Vercel)
src/
├── main.tsx, App.tsx, index.css
├── lib/supabase.ts # Supabase client
├── types/
│ ├── account.ts # Account types
│ ├── category.ts # Category types
│ └── transaction.ts # Transaction types
├── components/
│ ├── Auth.tsx # Login / sign up / logout
│ ├── Dashboard.tsx # Accounts, month summary, transaction list
│ ├── TransactionList.tsx # List transactions with edit/delete
│ ├── TransactionForm.tsx # Add/edit expense, income, or transfer
│ └── Settings.tsx # Accounts and categories CRUD
└── hooks/
├── useAccounts.ts # Accounts with balance
├── useCategories.ts # Expense/income categories
└── useTransactions.ts # Transactions by month and account