How tomfunk/fungible works
Fungible is a local-first personal-finance application with terminal and desktop interfaces, plus MCP and HTTP access. The user workflow is to connect accounts or import statements, categorize and tag transactions, then inspect spending, net worth, trends, and financial-health analyses. The shared tool executor exposes finance operations to external clients; the local database holds the common state. README capabilities are included even where implementation excerpts were unavailable. Connections for unsampled modules are limited to documented relationships or SOURCE INDEX references.
Main entry points: db.ts Local database · tools.ts Shared tool executor · sync.ts Plaid sync · create-server.ts MCP server
Components 22
User interfaces
- Terminal UI
tui/App.tsx - Desktop UI
gui/renderer/src/App.tsx - Electron main
gui/main/app.ts
Data ingestion
- Plaid sync
core/sync.ts - Plaid client
core/plaid.ts - CSV imports
core/imports.ts - Balance import
core/balance-import.ts
Finance operations
- Category and name rules
core/rules.ts - Tags
core/tags.ts - Transactions
core/transactions.ts - Finance queries
core/queries.ts - Financial health
core/health.ts - Agent finance context
core/agent-context.ts - Canvas history
core/canvas-history.ts
External access
- Shared tool executor
core/tools.ts - MCP server
mcp/create-server.ts - MCP HTTP transport
mcp/http.ts - HTTP API
api/server.ts
Local state
- Local database
core/db.ts - Daily backups
core/backup.ts - Data directory
core/paths.ts
Other components
- Finance user
Connections 29
- Finance user → Terminal UI: uses
README.md - Finance user → Desktop UI: uses
README.md - Finance user → MCP server: asks Claude
README.md - Finance user → HTTP API: calls
README.md - Terminal UI → Local database: shares local data
README.md - Desktop UI → Local database: shares local data
README.md - Electron main → Local database: initializes
gui/main/app.ts - Electron main → Plaid sync: starts sync
gui/main/app.ts - Plaid sync → Plaid client: fetches accounts and transactions
core/sync.ts - Plaid sync → Category and name rules: loads categorization rules
core/sync.ts - Plaid sync → Tags: applies tag rules
core/sync.ts - Plaid sync → Local database: writes synced data
core/sync.ts - Finance user → CSV imports: imports statements
README.md - Finance user → Balance import: imports balances
README.md - Shared tool executor → Finance queries: queries finance data
core/tools.ts - Shared tool executor → Balance import: previews balance imports
core/tools.ts - Shared tool executor → Category and name rules: manages rules
core/tools.ts - Shared tool executor → Transactions: manages transactions
core/tools.ts - Shared tool executor → Tags: manages tags
core/tools.ts - Agent finance context → Financial health: uses health metrics
core/agent-context.ts - Agent finance context → Local database: reads balances
core/agent-context.ts - MCP server → Shared tool executor: executes tools
mcp/create-server.ts - MCP server → Canvas history: builds Canvas context
mcp/create-server.ts - MCP HTTP transport → MCP server: hosts server
mcp/http.ts - HTTP API → Shared tool executor: executes tools
api/server.ts - HTTP API → Local database: initializes
api/server.ts - Daily backups → Local database: backs up
core/backup.ts - Daily backups → Data directory: stores backups under
core/backup.ts - Local database → Data directory: stores database under
core/db.ts