# lukestimson/scoop-money architecture

> Architecture diagram of the GitHub repository lukestimson/scoop-money, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lukestimson/scoop-money
- Repository: https://github.com/lukestimson/scoop-money

## Overview

Scoop Money is a local-first personal-finance desktop app. A user opens the desktop interface, navigates finance views, and works with transactions, income, budgets, living expenses and analytics; Electron IPC connects the renderer to main-process handlers and local persistence. The tree also identifies CSV importing, AI/chat, backups and an agent bridge as product capabilities. Several renderer screens and backend modules were not sampled, and the README is empty, so their internal wiring is not inferred here.

Main entry points: [`src/renderer/src/App.tsx`](https://github.com/lukestimson/scoop-money/blob/main/src/renderer/src/App.tsx) (Navigation app), [`src/preload/index.ts`](https://github.com/lukestimson/scoop-money/blob/main/src/preload/index.ts) (IPC API bridge), [`src/main/index.ts`](https://github.com/lukestimson/scoop-money/blob/main/src/main/index.ts) (IPC handlers), [`src/renderer/src/main.tsx`](https://github.com/lukestimson/scoop-money/blob/main/src/renderer/src/main.tsx) (Renderer bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_app["Navigation app<br/>[App.tsx]"]
  node_renderer["Renderer bootstrap<br/>[main.tsx]"]
  node_preload["IPC API bridge<br/>[index.ts]"]
end

subgraph group_finance["Finance workflows"]
  node_transactions["Transactions<br/>[Transactions.tsx]"]
  node_income["Income<br/>[Income.tsx]"]
  node_living["Living expenses<br/>[LivingExpenses.tsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.tsx]"]
  node_analytics["Analytics<br/>[Analytics.tsx]"]
  node_budget["Budget tools<br/>[Budget.tsx]"]
  node_chat["AI chat UI<br/>[ChatBox.tsx]"]
end

subgraph group_services["Main-process services"]
  node_main["IPC handlers<br/>[index.ts]"]
  node_importer["Transaction importer<br/>[importer.ts]"]
  node_ai["AI services<br/>[ai.ts]"]
  node_agent["Agent bridge<br/>[agentBridge.ts]"]
  node_backup["Backup service<br/>[backup.ts]"]
end

subgraph group_persistence["Local data"]
  node_database[("Finance database<br/>[database.ts]")]
end

node_user(("User"))
node_agentclient(("Agent client"))
node_aiproviders["AI providers"]

node_user -->|"opens app"| node_renderer
node_renderer -->|"renders"| node_app
node_app -->|"selects view"| node_transactions
node_app -->|"selects view"| node_income
node_app -->|"selects view"| node_living
node_app -->|"selects view"| node_dashboard
node_app -->|"selects view"| node_analytics
node_app -->|"selects view"| node_budget
node_app -->|"renders"| node_chat
node_transactions -->|"requests data"| node_preload
node_income -->|"requests data"| node_preload
node_living -->|"requests data"| node_preload
node_dashboard -->|"requests data"| node_preload
node_analytics -->|"requests data"| node_preload
node_budget -->|"requests data"| node_preload
node_chat -->|"requests AI"| node_preload
node_preload -->|"invokes IPC"| node_main
node_main -->|"reads and writes"| node_database
node_main -->|"imports file"| node_importer
node_main -->|"initializes AI"| node_ai
node_main -->|"starts bridge"| node_agent
node_main -->|"initializes backups"| node_backup
node_agentclient -.->|"connects"| node_agent
node_ai -.->|"requests completions"| node_aiproviders
node_backup -.->|"backs up data"| node_database

click node_app "https://github.com/lukestimson/scoop-money/blob/main/src/renderer/src/App.tsx"
click node_renderer "https://github.com/lukestimson/scoop-money/blob/main/src/renderer/src/main.tsx"
click node_preload "https://github.com/lukestimson/scoop-money/blob/main/src/preload/index.ts"
click node_transactions "https://github.com/lukestimson/scoop-money/blob/main/src/renderer/src/components/Transactions.tsx"
click node_income "https://github.com/lukestimson/scoop-money/blob/main/src/renderer/src/components/Income.tsx"
click node_living "https://github.com/lukestimson/scoop-money/blob/main/src/renderer/src/components/LivingExpenses.tsx"
click node_dashboard "https://github.com/lukestimson/scoop-money/blob/main/src/renderer/src/components/Dashboard.tsx"
click node_analytics "https://github.com/lukestimson/scoop-money/blob/main/src/renderer/src/components/Analytics.tsx"
click node_budget "https://github.com/lukestimson/scoop-money/blob/main/src/renderer/src/components/Budget.tsx"
click node_chat "https://github.com/lukestimson/scoop-money/blob/main/src/renderer/src/components/ChatBox.tsx"
click node_main "https://github.com/lukestimson/scoop-money/blob/main/src/main/index.ts"
click node_importer "https://github.com/lukestimson/scoop-money/blob/main/src/main/importer.ts"
click node_ai "https://github.com/lukestimson/scoop-money/blob/main/src/main/ai.ts"
click node_agent "https://github.com/lukestimson/scoop-money/blob/main/src/main/agentBridge.ts"
click node_backup "https://github.com/lukestimson/scoop-money/blob/main/src/main/backup.ts"
click node_database "https://github.com/lukestimson/scoop-money/blob/main/src/main/database.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_renderer,node_preload,node_user,node_agentclient toneBlue
class node_transactions,node_income,node_living,node_dashboard,node_analytics,node_budget,node_chat toneAmber
class node_main,node_importer,node_ai,node_agent,node_backup toneMint
class node_database toneRose
class node_aiproviders toneIndigo
```

## Components

### Desktop interface

- [Navigation app](https://github.com/lukestimson/scoop-money/blob/main/src/renderer/src/App.tsx): `src/renderer/src/App.tsx`
- [Renderer bootstrap](https://github.com/lukestimson/scoop-money/blob/main/src/renderer/src/main.tsx): `src/renderer/src/main.tsx`
- [IPC API bridge](https://github.com/lukestimson/scoop-money/blob/main/src/preload/index.ts): `src/preload/index.ts`

### Finance workflows

- [Transactions](https://github.com/lukestimson/scoop-money/blob/main/src/renderer/src/components/Transactions.tsx): `src/renderer/src/components/Transactions.tsx`
- [Income](https://github.com/lukestimson/scoop-money/blob/main/src/renderer/src/components/Income.tsx): `src/renderer/src/components/Income.tsx`
- [Living expenses](https://github.com/lukestimson/scoop-money/blob/main/src/renderer/src/components/LivingExpenses.tsx): `src/renderer/src/components/LivingExpenses.tsx`
- [Dashboard](https://github.com/lukestimson/scoop-money/blob/main/src/renderer/src/components/Dashboard.tsx): `src/renderer/src/components/Dashboard.tsx`
- [Analytics](https://github.com/lukestimson/scoop-money/blob/main/src/renderer/src/components/Analytics.tsx): `src/renderer/src/components/Analytics.tsx`
- [Budget tools](https://github.com/lukestimson/scoop-money/blob/main/src/renderer/src/components/Budget.tsx): `src/renderer/src/components/Budget.tsx`
- [AI chat UI](https://github.com/lukestimson/scoop-money/blob/main/src/renderer/src/components/ChatBox.tsx): `src/renderer/src/components/ChatBox.tsx`

### Main-process services

- [IPC handlers](https://github.com/lukestimson/scoop-money/blob/main/src/main/index.ts): `src/main/index.ts`
- [Transaction importer](https://github.com/lukestimson/scoop-money/blob/main/src/main/importer.ts): `src/main/importer.ts`
- [AI services](https://github.com/lukestimson/scoop-money/blob/main/src/main/ai.ts): `src/main/ai.ts`
- [Agent bridge](https://github.com/lukestimson/scoop-money/blob/main/src/main/agentBridge.ts): `src/main/agentBridge.ts`
- [Backup service](https://github.com/lukestimson/scoop-money/blob/main/src/main/backup.ts): `src/main/backup.ts`

### Local data

- [Finance database](https://github.com/lukestimson/scoop-money/blob/main/src/main/database.ts): `src/main/database.ts`

### Other components

- **User**
- **Agent client**
- **AI providers**

## Connections

- User → Renderer bootstrap: opens app
- Renderer bootstrap → Navigation app: renders
- Navigation app → Transactions: selects view
- Navigation app → Income: selects view
- Navigation app → Living expenses: selects view
- Navigation app → Dashboard: selects view
- Navigation app → Analytics: selects view
- Navigation app → Budget tools: selects view
- Navigation app → AI chat UI: renders
- Transactions → IPC API bridge: requests data
- Income → IPC API bridge: requests data
- Living expenses → IPC API bridge: requests data
- Dashboard → IPC API bridge: requests data
- Analytics → IPC API bridge: requests data
- Budget tools → IPC API bridge: requests data
- AI chat UI → IPC API bridge: requests AI
- IPC API bridge → IPC handlers: invokes IPC
- IPC handlers → Finance database: reads and writes
- IPC handlers → Transaction importer: imports file
- IPC handlers → AI services: initializes AI
- IPC handlers → Agent bridge: starts bridge
- IPC handlers → Backup service: initializes backups
- Agent client → Agent bridge: connects
- AI services → AI providers: requests completions
- Backup service → Finance database: backs up data
