How barbieri/local-openfinance works
local-openfinance is a local-first Brazilian Open Finance application: the CLI syncs Banco MCP data into SQLite, while a localhost web UI supports transaction review, classification, household account/investment browsing, and AI-assisted reports. The principal workflow is bank sync → persistent local records → browser filtering and classification → reports and chat. The graph preserves documented product branches; source excerpts directly support sync, transaction querying/editing, and report routes, while other README features are represented at their established module paths without asserting unshown call wiring.
Main entry points: App.tsx Web application · connection.ts SQLite database · server.ts Web server · intelligence-routes.ts Intelligence routes
Components 25
Bank synchronization
- CLI commands
src/commands/sync.ts - Sync engine
src/openfinance/sync/engine.ts - Banco MCP client
src/openfinance/client.ts
Local finance data
- SQLite database
src/db/connection.ts - Transaction queries
src/db/transaction-query.ts - Classification service
src/annotation/save-transaction-classification.ts - Transfer detection
src/transfers/detect.ts
Web review
- Web application
src/web/client/App.tsx - Transactions page
src/web/client/pages/TransactionsPage.tsx - Transactions controller
src/web/client/pages/use-transactions-page-controller.ts - Transaction routes
src/web/server/transaction-routes.ts - Credit cards
src/web/client/pages/credit-cards/CreditCardsPage.tsx - Investments
src/web/client/pages/investments/InvestmentsPage.tsx - Classification review
src/web/client/pages/ClassifyTriagePage.tsx - Sync progress UI
src/web/client/pages/SyncPage.tsx - Web server
src/web/server/server.ts
Reports and intelligence
- Reports interface
src/web/client/pages/ReportsPage.tsx - Report chat
src/web/client/pages/ReportChat.tsx - Intelligence routes
src/web/server/intelligence-routes.ts - Report runner
src/intelligence/report-runner.ts - Scoped analysis tools
src/intelligence/tools.ts
Other components
- Household user
- Banco MCP
- Model provider
- Email service
Connections 30
- Household user → CLI commands: starts sync
- CLI commands → Sync engine: runs sync
- Sync engine → Banco MCP client: fetches pages
- Banco MCP client → Banco MCP: posts requests
- Sync engine → SQLite database: upserts records
- SQLite database → Transaction queries: reads records
- Household user → Web application: browses locally
- Web application → Transactions page: opens transactions
- Transactions page → Transactions controller: controls filters
- Transactions controller → Web server: requests data
- Web server → Transaction routes: dispatches routes
- Transaction routes → Transaction queries: lists transactions
- Transaction queries → SQLite database: queries records
- Transaction routes → Classification service: saves classification
- Classification service → SQLite database: writes classification
- Web application → Credit cards: opens card views
- Web application → Investments: opens positions
- Web application → Classification review: opens suggestions
- Web application → Sync progress UI: opens sync status
- Household user → Reports interface: reads reports
- Reports interface → Web server: requests reports
- Web server → Intelligence routes: dispatches analysis
- Intelligence routes → Report runner: previews regeneration
- Report runner → Model provider: generates report
- Report runner → SQLite database: persists report
- Household user → Report chat: asks follow-ups
- Report chat → Intelligence routes: sends chat request
- Intelligence routes → Scoped analysis tools: executes scoped tool
- Scoped analysis tools → SQLite database: reads financial facts
- CLI commands → Email service: sends scheduled reports