How b-3llum/finance-tracker works
FinTrack is a self-hosted personal finance tracker. Its main workflow is to register and configure an account, add or import transactions, then use those records for balance tracking, budgets, forecasts, reports, and AI insights. The graph preserves the README’s other finance domains and the sampled API-to-SQLite behavior. Page-to-endpoint wiring and unsampled route internals are not shown; documented AI provider options are marked optional.
Main entry points: db.ts SQLite database · auth.ts JWT authentication · ai AI feature routes · ai-client.ts AI provider client
Components 24
Access and interface
- Login and registration
src/app/(auth)/login/page.tsx - Finance workspace
src/app/(app)/layout.tsx - Dashboard
src/app/(app)/dashboard/page.tsx - Offline app shell
public/sw.js
Financial records
- Transactions API
src/app/api/transactions/route.ts - Bank data import
src/app/api/import/route.ts - Accounts and balances
src/app/api/accounts/route.ts - Categories
src/app/api/categories/route.ts - Recurring bills
src/app/api/bills/route.ts
Planning and analysis
- Category budgets
src/app/api/budget/route.ts - Savings goals
src/app/api/savings/route.ts - Debt tracking
src/app/api/debts - Net worth
src/app/api/net-worth/route.ts - Cash flow forecast
src/app/api/forecast/route.ts
Reports and AI
- Report generation
src/app/api/reports/route.ts - Report builder
src/lib/report-generator.ts - AI feature routes
src/app/api/ai - AI provider client
src/lib/ai-client.ts
Runtime services
- Authentication routes
src/app/api/auth - JWT authentication
src/lib/auth.ts - Ollama service
src/lib/ollama.ts - SQLite database
src/lib/db.ts
Other components
- Finance user
- Claude or OpenAI
Connections 29
- Finance user → Login and registration: uses
- Finance user → Finance workspace: uses
- Login and registration → Authentication routes: submits credentials
- Authentication routes → JWT authentication: authenticates
- Transactions API → JWT authentication: gets user ID
- Bank data import → JWT authentication: gets user ID
- Accounts and balances → JWT authentication: gets user ID
- Categories → JWT authentication: gets user ID
- Category budgets → JWT authentication: gets user ID
- Cash flow forecast → JWT authentication: gets user ID
- Report generation → JWT authentication: gets user ID
- AI feature routes → JWT authentication: gets user ID
- Transactions API → SQLite database: reads and writes
- Bank data import → SQLite database: imports rows
- Accounts and balances → SQLite database: reads and writes
- Categories → SQLite database: reads and writes
- Recurring bills → SQLite database: reads and writes
- Category budgets → SQLite database: reads
- Savings goals → SQLite database: reads and writes
- Debt tracking → SQLite database: reads and writes
- Net worth → SQLite database: reads
- Cash flow forecast → SQLite database: reads
- Report generation → Report builder: generates reports
- Report builder → SQLite database: stores report data
- AI feature routes → AI provider client: requests AI
- AI provider client → Ollama service: queries local model
- AI provider client → Claude or OpenAI: queries cloud model
- AI feature routes → SQLite database: reads and stores insights
- Offline app shell → Finance user: supports offline use