How mhabachia/cashflow works
Cashflow is a self-hosted personal-finance web app and PWA. Its main workflow is recording or importing income and expenses, categorizing transactions, and using the resulting data for monthly cash-flow, budgets, recurring costs, and savings goals. Banking adds PSD2 account linking and transaction synchronization; authentication and local SQLite persistence support the application. The graph reflects README capabilities and the supplied source index and excerpts; unsampled page wiring and some action internals are not asserted.
Main entry points: index.ts SQLite finance store · transactions-view.tsx Transaction list · sync-engine.ts Transaction sync engine · page.tsx Cash-flow dashboard
Components 28
Finance workspace
- Cash-flow dashboard
src/app/(app)/page.tsx - Dashboard widgets
src/components/dashboard/dashboard-widget-system.tsx - Savings goals
src/components/savings/savings-goals-section.tsx - Categories and budgets
src/components/categories/categories-presets-view.tsx - Recurring costs
src/components/recurring/fixed-costs-view.tsx - Recurring entry form
src/components/recurring/create-recurring-modal.tsx
Transactions and import
- Transaction list
src/components/transactions/transactions-view.tsx - Quick entry
src/components/transactions/quick-add-modal.tsx - Statement import
src/components/transactions/statement-import-modal.tsx - CSV and statement actions
src/actions/csv-actions.ts - PDF statement parser
src/lib/pdf-statement-parser.ts - Transaction actions
src/actions/transaction-actions.ts - Auto-categorization rules
src/lib/category-rules.ts
Banking
- Banking hub
src/components/banking/banking-hub-view.tsx - Bank account actions
src/actions/bank-actions.ts - Bank authorization
src/app/api/bank-sync/authorize/route.ts - Bank callback
src/app/api/bank-sync/callback/route.ts - Banking provider
src/lib/bank-sync/provider.ts - Transaction sync engine
src/lib/bank-sync/sync-engine.ts - Token vault
src/lib/crypto/vault.ts
Identity and access
- Login and registration
src/app/(auth)/login/page.tsx - Authentication API
src/app/api/auth/[...all]/route.ts - Authentication service
src/lib/auth.ts - Account actions
src/actions/auth-actions.ts - Session and access checks
src/lib/session.ts
Shared platform
- SQLite finance store
src/lib/db/index.ts - Data model
src/lib/db/schema.ts
Other components
- User
Connections 37
- User → Cash-flow dashboard: views finances
- Cash-flow dashboard → SQLite finance store: reads monthly data
src/app/(app)/page.tsx - Cash-flow dashboard → Dashboard widgets: renders widgets
src/app/(app)/page.tsx - Cash-flow dashboard → Savings goals: renders goals
src/app/(app)/page.tsx - User → Transaction list: manages transactions
- Transaction list → Transaction actions: invokes actions
src/components/transactions/transactions-view.tsx - Transaction list → Quick entry: opens entry
src/components/transactions/transactions-view.tsx - Quick entry → Transaction actions: submits transaction
src/components/transactions/quick-add-modal.tsx - Transaction list → Statement import: opens import
src/components/transactions/transactions-view.tsx - Statement import → CSV and statement actions: submits import
src/components/transactions/statement-import-modal.tsx - CSV and statement actions → PDF statement parser: parses statements
src/actions/csv-actions.ts - CSV and statement actions → Auto-categorization rules: applies rules
src/actions/csv-actions.ts - Transaction list → Auto-categorization rules: manages rules
src/components/transactions/transactions-view.tsx - User → Categories and budgets: sets budgets
- Categories and budgets → SQLite finance store: manages finance settings
src/components/categories/categories-presets-view.tsx - User → Recurring costs: manages recurring costs
- Recurring costs → Recurring entry form: creates entries
- Recurring entry form → SQLite finance store: saves recurring items
- Savings goals → SQLite finance store: updates goals
- User → Banking hub: manages accounts
- Banking hub → Bank account actions: invokes actions
src/components/banking/banking-hub-view.tsx - Bank account actions → Transaction sync engine: starts synchronization
src/actions/bank-actions.ts - Bank authorization → Banking provider: starts authorization
src/app/api/bank-sync/authorize/route.ts - Bank callback → Banking provider: exchanges code
src/app/api/bank-sync/callback/route.ts - Bank callback → Transaction sync engine: starts initial sync
src/app/api/bank-sync/callback/route.ts - Transaction sync engine → Banking provider: fetches transactions
src/lib/bank-sync/sync-engine.ts - Transaction sync engine → SQLite finance store: reads and writes
src/lib/bank-sync/sync-engine.ts - Bank callback → Token vault: protects bank tokens
src/app/api/bank-sync/callback/route.ts - Transaction sync engine → Auto-categorization rules: categorizes imports
src/lib/bank-sync/sync-engine.ts - User → Login and registration: signs in
- Login and registration → Authentication API: uses authentication API
- Authentication API → Authentication service: dispatches authentication
src/app/api/auth/[...all]/route.ts - Authentication service → SQLite finance store: uses identity store
src/lib/auth.ts - Account actions → Session and access checks: checks access
src/actions/auth-actions.ts - Session and access checks → Authentication service: checks session
src/lib/session.ts - Account actions → SQLite finance store: manages accounts
src/actions/auth-actions.ts - SQLite finance store → Data model: uses data model
src/lib/db/index.ts