Personal finance management β track expenses, lent & debt, and investments with AI-powered insights.
FinTrack is an open-source personal finance app built for the Bangladeshi context but usable by anyone. It combines expense tracking, a lent & debt ledger, an investment portfolio tracker, and a full AI assistant β all in a premium dark UI (muted Emerald & Gold) with smooth animations.
Everything is yours. Your data lives in your own Supabase project. You can export it anytime, delete it anytime, and self-host the app in under 10 minutes.
Installable as an app. FinTrack is a PWA β on mobile, open the site and choose "Add to Home Screen" (Android Chrome / iOS Safari) to install it like a native app, complete with its own icon and no browser address bar.
- Add, edit, delete transactions (Expense / Income)
- Smart category system with main groups and sub-categories
- AI-powered category suggestion β type a description, Groq auto-suggests the category
- Search, filter by category, type, payment method, and month
- Budget limits per category with visual indicators (amber at 80%, red at 100%)
- No-spend streak tracker with calendar heatmap
- CSV import with column preview and Supabase bulk insert
- Export to Excel (multi-sheet) or CSV
- Inline expression amount field β type
60*4directly into the Amount field and it evaluates live as you type - Floating calculator β a global, draggable calculator reachable from every page, with copy-to-clipboard
- Track money you've lent and owe across people
- Full payment history per entry with running remaining balance
- Tabs: All Β· Lent Β· Debt Β· Summary Β· Payment Logs
- Summary view: Total / Paid back / Remaining per person per type
- Two-step delete confirmation on all entries
- Track committed capital, installment payments, and returns
- ROI %, P&L, and portfolio total computed live
- Return types: Profit / Capital Return / Dividend / Rent
- Payment method + account picker on every payment and return form
- Detail page per investment with payments and returns tabs
All features use your own free Groq API key (14,400 requests/day, no credit card):
| Feature | What it does |
|---|---|
| Smart Categorization | Auto-suggests category while you type the description |
| Anomaly Detection | Flags spending spikes vs your 3-month average |
| Weekly Digest | Friendly 7-day summary with highlights and tips |
| Budget vs Actual Analysis | Explains WHY you're over/under budget |
| Spending Patterns | Identifies expensive habits over 6 months |
| Natural Language Chat | Ask "How much did I spend on food?" in plain English |
| Budget Recommendations | Suggests realistic budgets from your actual spending |
| Goal-Based Plan | Enter a savings goal β get a month-by-month spending plan |
| Benchmarking | Compares your spending vs typical Bangladesh household |
| Debt Payoff Strategy | Snowball vs Avalanche analysis from your ledger data |
- Data Preferences β full CRUD for categories (tree view), payment methods, and accounts
- Payment method smart picker: Cash β auto account Β· MFS β bKash/Nagad/Rocket Β· Card/Bank Transfer β bank selector
- Add custom payment methods and bank accounts
- Budget limits management
- CSV import with drag-and-drop
- Full data export + account deletion (30-day soft-delete recovery)
- Monthly trend (12 months, expense + income lines)
- Category donut for selected month
- Daily spending bars
- Payment method split
- Budget vs actual horizontal bars
- No-spend calendar heatmap with streak counter
- 6 KPI cards: Spent Β· Income Β· Net Β· Daily avg Β· Yearly total Β· No-spend streak
| Layer | Tech |
|---|---|
| Framework | React 19 + Vite 6 |
| Language | TypeScript 5.7 (strict, .tsx/.ts only) |
| Styling | Tailwind CSS v4 (CSS-first, no config file) |
| Routing | TanStack Router v2 (type-safe) |
| Data fetching | TanStack Query v5 |
| State | Zustand |
| Animations | Framer Motion v12 |
| Forms | React Hook Form v8 + Zod v4 |
| Charts | Recharts |
| Icons | Lucide React |
| Backend | Supabase (PostgreSQL 16 + Auth + RLS) |
| AI | Groq API (llama-3.1-8b-instant, browser-direct BYOK) |
| Export | SheetJS (Excel) + Papa Parse (CSV) |
| PWA | vite-plugin-pwa (installable, offline app-shell caching) |
| Hosting | Vercel |
| Package manager | pnpm |
git clone https://github.com/isttiiak/FinTrack.git
cd FinTrack
pnpm install- Create a new Supabase project
- Go to SQL Editor β paste and run
supabase/migrations/001_initial_schema.sql - Copy your project URL and anon key from Settings β API
cp .env.example .env.localEdit .env.local:
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key
pnpm devVisit http://localhost:5173
pnpm build # verify it builds cleanlyThen import the GitHub repo in Vercel and add the two environment variables.
- Go to console.groq.com β sign up free β API Keys β Create API key
- In FinTrack: Settings β AI Insights β paste your key β Save
- Navigate to Analytics β β¨ AI Insights
Your key is stored only in your browser's localStorage β never sent to any server other than Groq directly.
src/
βββ components/
β βββ ai/ β AIHub (all 10 AI features)
β βββ common/ β DeleteButton, ConfirmDialog, PaymentMethodPicker, Logo, ToastContainer
β βββ expenses/ β ExpenseForm, ExpenseCard, CategoryCombobox, CategoryManagerModal
β βββ investments/ β InvestmentForm, ReturnForm, InvestmentPaymentForm
β βββ layout/ β AppShell, Sidebar, MobileNav
β βββ ledger/ β PersonCard, LedgerSummaryTab, LedgerPaymentLogs
βββ hooks/
β βββ useAICategorySuggest.ts β Smart categorization
β βββ useExpenses.ts
β βββ useInvestments.ts
β βββ useLedger.ts
β βββ useCategories.ts
β βββ useNoSpendStreak.ts
β βββ useDemoGuard.ts β Blocks writes in demo mode with a friendly toast
βββ lib/
β βββ groq.ts β Groq API client
β βββ aiContext.ts β AI prompt data builders
β βββ constants.ts β Payment methods, accounts, categories
β βββ export.ts β Excel + CSV export
β βββ utils.ts
βββ pages/
β βββ AnalyticsPage.tsx
β βββ DataSettingsPage.tsx β Category/method/account CRUD
β βββ DashboardPage.tsx
β βββ ExpensesPage.tsx
β βββ InvestmentDetailPage.tsx
β βββ InvestmentsPage.tsx
β βββ LedgerPage.tsx
β βββ PersonDetailPage.tsx
β βββ SettingsPage.tsx
βββ stores/
β βββ authStore.ts
β βββ confirmStore.ts β Two-step delete confirmation
β βββ demoStore.ts
β βββ uiStore.ts
βββ types/
βββ database.types.ts
βββ expense.types.ts
βββ investment.types.ts
βββ ledger.types.ts
| Table | Purpose |
|---|---|
profiles |
User profile (name, avatar, currency, timezone) |
categories |
Expense/income categories with main groups |
budget_limits |
Monthly spend cap per category |
transactions |
All expense and income entries |
persons |
People in the lent/debt ledger |
person_ledger |
Individual lent/debt entries |
ledger_payments |
Payments against ledger entries |
investments |
Investment portfolio entries |
investment_payments |
Installment payments into investments |
investment_returns |
Returns received from investments |
All tables have Row Level Security β users can only see their own data.
- Fork the repo
- Create a branch:
git checkout -b feature/your-feature - Make your changes (TypeScript strict,
.tsxonly) - Run
pnpm buildto verify it type-checks and builds cleanly - Open a PR
- No comments unless the WHY is non-obvious
- No unused variables (TypeScript strict enforces this)
- Inline
<style>in components is fine (no Tailwind classes for custom UI) - All animations via Framer Motion
- All forms via React Hook Form + Zod
MIT β fork it, self-host it, build on it.
Built by Istiak Islam