# jcig789/ledgr architecture

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

- Interactive diagram: https://gitdiagram.com/jcig789/ledgr
- Repository: https://github.com/jcig789/ledgr

## Overview

Ledgr is an Obsidian personal-finance plugin: users capture transactions and manage obligations, budgets, accounts, and goals; the plugin stores finance records as files in the vault and presents dashboards, statements, forecasts, and reports. The graph preserves the README’s major feature areas while using sampled imports and explicit documentation for wiring; several unsampled modules are represented only by their exact tree paths, so their internal call relationships are omitted.

Main entry points: [`src/main.ts`](https://github.com/jcig789/ledgr/blob/main/src/main.ts) (Plugin commands and views), [`src/ui/DashboardView.ts`](https://github.com/jcig789/ledgr/blob/main/src/ui/DashboardView.ts) (Dashboard), [`src/data/reader.ts`](https://github.com/jcig789/ledgr/blob/main/src/data/reader.ts) (Transaction reading and summaries), [`src/data/networth.ts`](https://github.com/jcig789/ledgr/blob/main/src/data/networth.ts) (Accounts and liabilities)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Plugin entry"]
  node_plugin["Plugin commands and views<br/>[main.ts]"]
  node_settings["Settings<br/>[settings.ts]"]
end

subgraph group_capture["Capture and obligations"]
  node_quick["Transaction capture"]
  node_obligations["Bills and payments<br/>[BillsModal.ts]"]
  node_liabilitypayment["Liability payment"]
  node_bulk["Bulk obligations"]
end

subgraph group_finance["Finance views"]
  node_dashboard["Dashboard<br/>[DashboardView.ts]"]
  node_calendar["Calendar<br/>[CalendarView.ts]"]
  node_networthview["Net worth and goals<br/>[NetWorthView.ts]"]
  node_statements["Financial statements<br/>[StatementsView.ts]"]
  node_standingview["Standing health<br/>[StandingView.ts]"]
end

subgraph group_analytics["Analysis and reports"]
  node_review["Monthly review"]
  node_wrapped["Year-end summary<br/>[WrappedModal.ts]"]
  node_bearing["Bearing score engine<br/>[bearing.ts]"]
  node_projection["Cash flow projection<br/>[projection.ts]"]
  node_debtcost["Debt cost analysis<br/>[debtCost.ts]"]
end

subgraph group_records["Finance data"]
  node_reader["Transaction reading and summaries<br/>[reader.ts]"]
  node_transactions["Transaction records<br/>[transactions.ts]"]
  node_budgets["Budget records<br/>[budgets.ts]"]
  node_networth["Accounts and liabilities<br/>[networth.ts]"]
  node_goals["Savings goals<br/>[goals.ts]"]
  node_bills["Recurring bills<br/>[bills.ts]"]
  node_remittances["Transfer records<br/>[remittances.ts]"]
  node_nw_history["Net worth history<br/>[nwHistory.ts]"]
  node_templates["Recurring templates<br/>[templates.ts]"]
end

node_user(("Obsidian user"))
node_obsidian["Obsidian host"]
node_vault[("Vault finance files")]

node_user -->|"uses plugin"| node_obsidian
node_obsidian -->|"loads"| node_plugin
node_plugin -->|"opens capture"| node_quick
node_plugin -->|"registers view"| node_dashboard
node_plugin -->|"registers view"| node_networthview
node_plugin -->|"registers view"| node_statements
node_plugin -->|"registers view"| node_standingview
node_plugin -->|"registers view"| node_calendar
node_plugin -->|"opens command"| node_review
node_plugin -->|"opens command"| node_wrapped
node_plugin -->|"loads and saves"| node_settings
node_quick -->|"records transaction"| node_transactions
node_dashboard -->|"reads and summarizes"| node_reader
node_dashboard -->|"loads budgets"| node_budgets
node_dashboard -->|"loads bills"| node_bills
node_dashboard -->|"loads obligations"| node_networth
node_dashboard -->|"loads transfers"| node_remittances
node_dashboard -->|"opens management"| node_obligations
node_calendar -->|"reads transactions"| node_reader
node_calendar -->|"shows due bills"| node_bills
node_calendar -->|"shows debt payments"| node_networth
node_obligations -->|"manages bills"| node_bills
node_bulk -->|"adds bills"| node_bills
node_liabilitypayment -->|"updates payment balance"| node_networth
node_liabilitypayment -->|"records payment"| node_transactions
node_networthview -->|"loads and saves"| node_networth
node_networthview -->|"loads goals"| node_goals
node_networthview -->|"reads cash flow"| node_reader
node_networthview -->|"snapshots history"| node_nw_history
node_statements -->|"summarizes transactions"| node_reader
node_standingview -->|"displays assessment"| node_bearing
node_review -->|"reads and summarizes"| node_reader
node_review -->|"loads budgets"| node_budgets
node_review -->|"loads transfers"| node_remittances
node_review -->|"loads goals"| node_goals
node_review -->|"loads accounts"| node_networth
node_bearing -->|"reads transactions"| node_reader
node_bearing -->|"loads balances"| node_networth
node_bearing -->|"loads limits"| node_budgets
node_bearing -->|"loads targets"| node_goals
node_bearing -->|"loads history"| node_nw_history
node_projection -->|"provides forecast"| node_dashboard
node_debtcost -->|"supports debt analysis"| node_networthview
node_templates -->|"applies entries"| node_transactions
node_reader -->|"reads monthly files"| node_vault
node_transactions -->|"stores records"| node_vault
node_budgets -->|"reads and writes"| node_vault
node_networth -->|"reads and writes"| node_vault

click node_plugin "https://github.com/jcig789/ledgr/blob/main/src/main.ts"
click node_settings "https://github.com/jcig789/ledgr/blob/main/src/settings.ts"
click node_quick "https://github.com/jcig789/ledgr/blob/main/src/ui/QuickCaptureModal.ts"
click node_dashboard "https://github.com/jcig789/ledgr/blob/main/src/ui/DashboardView.ts"
click node_calendar "https://github.com/jcig789/ledgr/blob/main/src/ui/CalendarView.ts"
click node_networthview "https://github.com/jcig789/ledgr/blob/main/src/ui/NetWorthView.ts"
click node_statements "https://github.com/jcig789/ledgr/blob/main/src/ui/StatementsView.ts"
click node_standingview "https://github.com/jcig789/ledgr/blob/main/src/ui/StandingView.ts"
click node_obligations "https://github.com/jcig789/ledgr/blob/main/src/ui/BillsModal.ts"
click node_liabilitypayment "https://github.com/jcig789/ledgr/blob/main/src/ui/LiabilityPaymentModal.ts"
click node_bulk "https://github.com/jcig789/ledgr/blob/main/src/ui/BulkObligationsModal.ts"
click node_review "https://github.com/jcig789/ledgr/blob/main/src/ui/MonthlyReviewModal.ts"
click node_wrapped "https://github.com/jcig789/ledgr/blob/main/src/ui/WrappedModal.ts"
click node_reader "https://github.com/jcig789/ledgr/blob/main/src/data/reader.ts"
click node_transactions "https://github.com/jcig789/ledgr/blob/main/src/data/transactions.ts"
click node_budgets "https://github.com/jcig789/ledgr/blob/main/src/data/budgets.ts"
click node_networth "https://github.com/jcig789/ledgr/blob/main/src/data/networth.ts"
click node_goals "https://github.com/jcig789/ledgr/blob/main/src/data/goals.ts"
click node_bills "https://github.com/jcig789/ledgr/blob/main/src/data/bills.ts"
click node_remittances "https://github.com/jcig789/ledgr/blob/main/src/data/remittances.ts"
click node_bearing "https://github.com/jcig789/ledgr/blob/main/src/data/bearing.ts"
click node_projection "https://github.com/jcig789/ledgr/blob/main/src/data/projection.ts"
click node_nw_history "https://github.com/jcig789/ledgr/blob/main/src/data/nwHistory.ts"
click node_debtcost "https://github.com/jcig789/ledgr/blob/main/src/data/debtCost.ts"
click node_templates "https://github.com/jcig789/ledgr/blob/main/src/data/templates.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_settings,node_user toneBlue
class node_quick,node_obligations,node_liabilitypayment,node_bulk,node_vault toneAmber
class node_dashboard,node_calendar,node_networthview,node_statements,node_standingview toneMint
class node_review,node_wrapped,node_bearing,node_projection,node_debtcost toneRose
class node_reader,node_transactions,node_budgets,node_networth,node_goals,node_bills,node_remittances,node_nw_history,node_templates,node_obsidian toneIndigo
```

## Components

### Plugin entry

- [Plugin commands and views](https://github.com/jcig789/ledgr/blob/main/src/main.ts): `src/main.ts`
- [Settings](https://github.com/jcig789/ledgr/blob/main/src/settings.ts): `src/settings.ts`

### Capture and obligations

- [Transaction capture](https://github.com/jcig789/ledgr/blob/main/src/ui/QuickCaptureModal.ts): `src/ui/QuickCaptureModal.ts`
- [Bills and payments](https://github.com/jcig789/ledgr/blob/main/src/ui/BillsModal.ts): `src/ui/BillsModal.ts`
- [Liability payment](https://github.com/jcig789/ledgr/blob/main/src/ui/LiabilityPaymentModal.ts): `src/ui/LiabilityPaymentModal.ts`
- [Bulk obligations](https://github.com/jcig789/ledgr/blob/main/src/ui/BulkObligationsModal.ts): `src/ui/BulkObligationsModal.ts`

### Finance views

- [Dashboard](https://github.com/jcig789/ledgr/blob/main/src/ui/DashboardView.ts): `src/ui/DashboardView.ts`
- [Calendar](https://github.com/jcig789/ledgr/blob/main/src/ui/CalendarView.ts): `src/ui/CalendarView.ts`
- [Net worth and goals](https://github.com/jcig789/ledgr/blob/main/src/ui/NetWorthView.ts): `src/ui/NetWorthView.ts`
- [Financial statements](https://github.com/jcig789/ledgr/blob/main/src/ui/StatementsView.ts): `src/ui/StatementsView.ts`
- [Standing health](https://github.com/jcig789/ledgr/blob/main/src/ui/StandingView.ts): `src/ui/StandingView.ts`

### Analysis and reports

- [Monthly review](https://github.com/jcig789/ledgr/blob/main/src/ui/MonthlyReviewModal.ts): `src/ui/MonthlyReviewModal.ts`
- [Year-end summary](https://github.com/jcig789/ledgr/blob/main/src/ui/WrappedModal.ts): `src/ui/WrappedModal.ts`
- [Bearing score engine](https://github.com/jcig789/ledgr/blob/main/src/data/bearing.ts): `src/data/bearing.ts`
- [Cash flow projection](https://github.com/jcig789/ledgr/blob/main/src/data/projection.ts): `src/data/projection.ts`
- [Debt cost analysis](https://github.com/jcig789/ledgr/blob/main/src/data/debtCost.ts): `src/data/debtCost.ts`

### Finance data

- [Transaction reading and summaries](https://github.com/jcig789/ledgr/blob/main/src/data/reader.ts): `src/data/reader.ts`
- [Transaction records](https://github.com/jcig789/ledgr/blob/main/src/data/transactions.ts): `src/data/transactions.ts`
- [Budget records](https://github.com/jcig789/ledgr/blob/main/src/data/budgets.ts): `src/data/budgets.ts`
- [Accounts and liabilities](https://github.com/jcig789/ledgr/blob/main/src/data/networth.ts): `src/data/networth.ts`
- [Savings goals](https://github.com/jcig789/ledgr/blob/main/src/data/goals.ts): `src/data/goals.ts`
- [Recurring bills](https://github.com/jcig789/ledgr/blob/main/src/data/bills.ts): `src/data/bills.ts`
- [Transfer records](https://github.com/jcig789/ledgr/blob/main/src/data/remittances.ts): `src/data/remittances.ts`
- [Net worth history](https://github.com/jcig789/ledgr/blob/main/src/data/nwHistory.ts): `src/data/nwHistory.ts`
- [Recurring templates](https://github.com/jcig789/ledgr/blob/main/src/data/templates.ts): `src/data/templates.ts`

### Other components

- **Obsidian user**
- **Obsidian host**
- **Vault finance files**

## Connections

- Obsidian user → Obsidian host: uses plugin
- Obsidian host → Plugin commands and views: loads
- Plugin commands and views → Transaction capture: opens capture
- Plugin commands and views → Dashboard: registers view
- Plugin commands and views → Net worth and goals: registers view
- Plugin commands and views → Financial statements: registers view
- Plugin commands and views → Standing health: registers view
- Plugin commands and views → Calendar: registers view
- Plugin commands and views → Monthly review: opens command
- Plugin commands and views → Year-end summary: opens command
- Plugin commands and views → Settings: loads and saves
- Transaction capture → Transaction records: records transaction
- Dashboard → Transaction reading and summaries: reads and summarizes
- Dashboard → Budget records: loads budgets
- Dashboard → Recurring bills: loads bills
- Dashboard → Accounts and liabilities: loads obligations
- Dashboard → Transfer records: loads transfers
- Dashboard → Bills and payments: opens management
- Calendar → Transaction reading and summaries: reads transactions
- Calendar → Recurring bills: shows due bills
- Calendar → Accounts and liabilities: shows debt payments
- Bills and payments → Recurring bills: manages bills
- Bulk obligations → Recurring bills: adds bills
- Liability payment → Accounts and liabilities: updates payment balance
- Liability payment → Transaction records: records payment
- Net worth and goals → Accounts and liabilities: loads and saves
- Net worth and goals → Savings goals: loads goals
- Net worth and goals → Transaction reading and summaries: reads cash flow
- Net worth and goals → Net worth history: snapshots history
- Financial statements → Transaction reading and summaries: summarizes transactions
- Standing health → Bearing score engine: displays assessment
- Monthly review → Transaction reading and summaries: reads and summarizes
- Monthly review → Budget records: loads budgets
- Monthly review → Transfer records: loads transfers
- Monthly review → Savings goals: loads goals
- Monthly review → Accounts and liabilities: loads accounts
- Bearing score engine → Transaction reading and summaries: reads transactions
- Bearing score engine → Accounts and liabilities: loads balances
- Bearing score engine → Budget records: loads limits
- Bearing score engine → Savings goals: loads targets
- Bearing score engine → Net worth history: loads history
- Cash flow projection → Dashboard: provides forecast
- Debt cost analysis → Net worth and goals: supports debt analysis
- Recurring templates → Transaction records: applies entries
- Transaction reading and summaries → Vault finance files: reads monthly files
- Transaction records → Vault finance files: stores records
- Budget records → Vault finance files: reads and writes
- Accounts and liabilities → Vault finance files: reads and writes
