# dimanchello/obsidian-finance architecture

> Architecture diagram of the GitHub repository dimanchello/obsidian-finance, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dimanchello/obsidian-finance
- Repository: https://github.com/dimanchello/obsidian-finance

## Overview

Finance Manager is an Obsidian plugin for tracking accounts and financial activity in note-embedded account blocks. The main workflow starts with an account block, opens an account view, and uses its tabs to manage records, debts, credits, deposits, and currency exchanges; saved account data then supports dashboards, charts, and analytics. The README documents several feature branches whose internal wiring is not shown in the excerpts, so those links are marked unverified rather than presented as inspected call paths.

Main entry points: [`src/AccountView.ts`](https://github.com/dimanchello/obsidian-finance/blob/main/src/AccountView.ts) (Account view), [`main.ts`](https://github.com/dimanchello/obsidian-finance/blob/main/main.ts) (Plugin entry), [`src/tabs/OverviewTab.ts`](https://github.com/dimanchello/obsidian-finance/blob/main/src/tabs/OverviewTab.ts) (Overview dashboard), [`src/tabs/RecordsTab.ts`](https://github.com/dimanchello/obsidian-finance/blob/main/src/tabs/RecordsTab.ts) (Records tab)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Plugin and accounts"]
  node_plugin["Plugin entry<br/>[main.ts]"]
  node_account["Account view<br/>[AccountView.ts]"]
  node_orphaned["Orphaned accounts"]
end

subgraph group_management["Account management"]
  node_account_commands["Account commands<br/>[AccountCommands.ts]"]
  node_records_tab["Records tab<br/>[RecordsTab.ts]"]
  node_import_export["Import and export"]
  node_debts_tab["Debts tab<br/>[DebtsTab.ts]"]
  node_credits_tab["Credits tab<br/>[CreditsTab.ts]"]
  node_deposits_tab["Deposits tab<br/>[DepositsTab.ts]"]
  node_currency_tab["Currency exchanges<br/>[CurrencyTab.ts]"]
end

subgraph group_analysis["Analytics and views"]
  node_overview["Overview dashboard<br/>[OverviewTab.ts]"]
  node_analytics["Record analytics<br/>[AnalyticsView.ts]"]
  node_credit_analytics["Credit analytics"]
  node_deposit_analytics["Deposit analytics"]
end

subgraph group_foundation["Domain and storage"]
  node_records["Records and filters<br/>[records.ts]"]
  node_debt_math["Debt calculations"]
  node_credit_math["Credit schedules"]
  node_deposit_math["Deposit calculations"]
  node_currency_balance["Currency balance<br/>[currencyBalance.ts]"]
  node_metric_math["Trend metrics<br/>[trendMetrics.ts]"]
  node_storage[("Account storage<br/>[FinanceStorage.ts]")]
  node_scheduler["Automatic transactions<br/>[AutoTxScheduler.ts]"]
end

node_user(("Obsidian user"))

node_user -.->|"opens plugin"| node_plugin
node_plugin -->|"opens view"| node_account
node_plugin -->|"initializes storage"| node_storage
node_plugin -->|"offers command"| node_orphaned
node_account -.->|"shows tab"| node_records_tab
node_account -.->|"shows tab"| node_debts_tab
node_account -.->|"shows tab"| node_credits_tab
node_account -.->|"shows tab"| node_deposits_tab
node_account -.->|"shows tab"| node_currency_tab
node_account -.->|"shows tab"| node_overview
node_records_tab -->|"opens import export"| node_import_export
node_records_tab -->|"uses records"| node_records
node_debts_tab -->|"delegates operations"| node_account_commands
node_credits_tab -.->|"uses schedules"| node_credit_math
node_deposits_tab -->|"uses calculations"| node_deposit_math
node_deposits_tab -->|"delegates operations"| node_account_commands
node_currency_tab -->|"uses balances"| node_currency_balance
node_account_commands -->|"reads and writes"| node_storage
node_storage -->|"calculates principal"| node_debt_math
node_overview -.->|"uses metrics"| node_metric_math
node_overview -.->|"opens charts"| node_credit_analytics
node_overview -.->|"opens charts"| node_deposit_analytics
node_analytics -.->|"analyzes records"| node_records_tab
node_scheduler -.->|"updates account data"| node_storage

click node_plugin "https://github.com/dimanchello/obsidian-finance/blob/main/main.ts"
click node_account "https://github.com/dimanchello/obsidian-finance/blob/main/src/AccountView.ts"
click node_account_commands "https://github.com/dimanchello/obsidian-finance/blob/main/src/domain/AccountCommands.ts"
click node_records_tab "https://github.com/dimanchello/obsidian-finance/blob/main/src/tabs/RecordsTab.ts"
click node_records "https://github.com/dimanchello/obsidian-finance/blob/main/src/domain/records.ts"
click node_import_export "https://github.com/dimanchello/obsidian-finance/blob/main/src/ImportExportModal.ts"
click node_debts_tab "https://github.com/dimanchello/obsidian-finance/blob/main/src/tabs/DebtsTab.ts"
click node_debt_math "https://github.com/dimanchello/obsidian-finance/blob/main/src/domain/debtCalculations.ts"
click node_credits_tab "https://github.com/dimanchello/obsidian-finance/blob/main/src/tabs/CreditsTab.ts"
click node_credit_math "https://github.com/dimanchello/obsidian-finance/blob/main/src/domain/creditCalculations.ts"
click node_deposits_tab "https://github.com/dimanchello/obsidian-finance/blob/main/src/tabs/DepositsTab.ts"
click node_deposit_math "https://github.com/dimanchello/obsidian-finance/blob/main/src/domain/depositCalculations.ts"
click node_currency_tab "https://github.com/dimanchello/obsidian-finance/blob/main/src/tabs/CurrencyTab.ts"
click node_currency_balance "https://github.com/dimanchello/obsidian-finance/blob/main/src/domain/currencyBalance.ts"
click node_overview "https://github.com/dimanchello/obsidian-finance/blob/main/src/tabs/OverviewTab.ts"
click node_analytics "https://github.com/dimanchello/obsidian-finance/blob/main/src/AnalyticsView.ts"
click node_credit_analytics "https://github.com/dimanchello/obsidian-finance/blob/main/src/CreditsAnalyticsView.ts"
click node_deposit_analytics "https://github.com/dimanchello/obsidian-finance/blob/main/src/DepositsAnalyticsView.ts"
click node_metric_math "https://github.com/dimanchello/obsidian-finance/blob/main/src/domain/metrics/trendMetrics.ts"
click node_storage "https://github.com/dimanchello/obsidian-finance/blob/main/src/storage/FinanceStorage.ts"
click node_scheduler "https://github.com/dimanchello/obsidian-finance/blob/main/src/AutoTxScheduler.ts"
click node_orphaned "https://github.com/dimanchello/obsidian-finance/blob/main/src/OrphanedAccountsModal.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_plugin,node_account,node_orphaned,node_user toneBlue
class node_account_commands,node_records_tab,node_import_export,node_debts_tab,node_credits_tab,node_deposits_tab,node_currency_tab toneAmber
class node_overview,node_analytics,node_credit_analytics,node_deposit_analytics toneMint
class node_records,node_debt_math,node_credit_math,node_deposit_math,node_currency_balance,node_metric_math,node_storage,node_scheduler toneRose
```

## Components

### Plugin and accounts

- [Plugin entry](https://github.com/dimanchello/obsidian-finance/blob/main/main.ts): `main.ts`
- [Account view](https://github.com/dimanchello/obsidian-finance/blob/main/src/AccountView.ts): `src/AccountView.ts`
- [Orphaned accounts](https://github.com/dimanchello/obsidian-finance/blob/main/src/OrphanedAccountsModal.ts): `src/OrphanedAccountsModal.ts`

### Account management

- [Account commands](https://github.com/dimanchello/obsidian-finance/blob/main/src/domain/AccountCommands.ts): `src/domain/AccountCommands.ts`
- [Records tab](https://github.com/dimanchello/obsidian-finance/blob/main/src/tabs/RecordsTab.ts): `src/tabs/RecordsTab.ts`
- [Import and export](https://github.com/dimanchello/obsidian-finance/blob/main/src/ImportExportModal.ts): `src/ImportExportModal.ts`
- [Debts tab](https://github.com/dimanchello/obsidian-finance/blob/main/src/tabs/DebtsTab.ts): `src/tabs/DebtsTab.ts`
- [Credits tab](https://github.com/dimanchello/obsidian-finance/blob/main/src/tabs/CreditsTab.ts): `src/tabs/CreditsTab.ts`
- [Deposits tab](https://github.com/dimanchello/obsidian-finance/blob/main/src/tabs/DepositsTab.ts): `src/tabs/DepositsTab.ts`
- [Currency exchanges](https://github.com/dimanchello/obsidian-finance/blob/main/src/tabs/CurrencyTab.ts): `src/tabs/CurrencyTab.ts`

### Analytics and views

- [Overview dashboard](https://github.com/dimanchello/obsidian-finance/blob/main/src/tabs/OverviewTab.ts): `src/tabs/OverviewTab.ts`
- [Record analytics](https://github.com/dimanchello/obsidian-finance/blob/main/src/AnalyticsView.ts): `src/AnalyticsView.ts`
- [Credit analytics](https://github.com/dimanchello/obsidian-finance/blob/main/src/CreditsAnalyticsView.ts): `src/CreditsAnalyticsView.ts`
- [Deposit analytics](https://github.com/dimanchello/obsidian-finance/blob/main/src/DepositsAnalyticsView.ts): `src/DepositsAnalyticsView.ts`

### Domain and storage

- [Records and filters](https://github.com/dimanchello/obsidian-finance/blob/main/src/domain/records.ts): `src/domain/records.ts`
- [Debt calculations](https://github.com/dimanchello/obsidian-finance/blob/main/src/domain/debtCalculations.ts): `src/domain/debtCalculations.ts`
- [Credit schedules](https://github.com/dimanchello/obsidian-finance/blob/main/src/domain/creditCalculations.ts): `src/domain/creditCalculations.ts`
- [Deposit calculations](https://github.com/dimanchello/obsidian-finance/blob/main/src/domain/depositCalculations.ts): `src/domain/depositCalculations.ts`
- [Currency balance](https://github.com/dimanchello/obsidian-finance/blob/main/src/domain/currencyBalance.ts): `src/domain/currencyBalance.ts`
- [Trend metrics](https://github.com/dimanchello/obsidian-finance/blob/main/src/domain/metrics/trendMetrics.ts): `src/domain/metrics/trendMetrics.ts`
- [Account storage](https://github.com/dimanchello/obsidian-finance/blob/main/src/storage/FinanceStorage.ts): `src/storage/FinanceStorage.ts`
- [Automatic transactions](https://github.com/dimanchello/obsidian-finance/blob/main/src/AutoTxScheduler.ts): `src/AutoTxScheduler.ts`

### Other components

- **Obsidian user**

## Connections

- Obsidian user → Plugin entry: opens plugin (evidence: `README.md`)
- Plugin entry → Account view: opens view (evidence: `main.ts`)
- Plugin entry → Account storage: initializes storage (evidence: `main.ts`)
- Plugin entry → Orphaned accounts: offers command (evidence: `main.ts`)
- Account view → Records tab: shows tab (evidence: `README.md`)
- Account view → Debts tab: shows tab (evidence: `README.md`)
- Account view → Credits tab: shows tab (evidence: `README.md`)
- Account view → Deposits tab: shows tab (evidence: `README.md`)
- Account view → Currency exchanges: shows tab (evidence: `README.md`)
- Account view → Overview dashboard: shows tab (evidence: `README.md`)
- Records tab → Import and export: opens import export (evidence: `src/tabs/RecordsTab.ts`)
- Records tab → Records and filters: uses records (evidence: `src/tabs/RecordsTab.ts`)
- Debts tab → Account commands: delegates operations
- Credits tab → Credit schedules: uses schedules
- Deposits tab → Deposit calculations: uses calculations (evidence: `src/tabs/DepositsTab.ts`)
- Deposits tab → Account commands: delegates operations (evidence: `src/tabs/DepositsTab.ts`)
- Currency exchanges → Currency balance: uses balances (evidence: `src/tabs/CurrencyTab.ts`)
- Account commands → Account storage: reads and writes (evidence: `src/domain/AccountCommands.ts`)
- Account storage → Debt calculations: calculates principal (evidence: `src/storage/FinanceStorage.ts`)
- Overview dashboard → Trend metrics: uses metrics
- Overview dashboard → Credit analytics: opens charts (evidence: `README.md`)
- Overview dashboard → Deposit analytics: opens charts (evidence: `README.md`)
- Record analytics → Records tab: analyzes records (evidence: `README.md`)
- Automatic transactions → Account storage: updates account data
