# simongsk/finance-and-investment-tool architecture

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

- Interactive diagram: https://gitdiagram.com/simongsk/finance-and-investment-tool
- Repository: https://github.com/simongsk/finance-and-investment-tool

## Overview

Økonomiværktøjer is a static, browser-based Danish personal-finance app. Users enter figures in its tools, receive projections and summaries, and keep their data locally; monthly status can update both wealth and portfolio histories. The README also documents guides, CSV/print reports, backup and restore, and offline use. The graph reflects those documented capabilities and the sampled storage and calculation code; unsampled wiring is shown only where the tree and documentation support it.

Main entry points: [`index.html`](https://github.com/simongsk/finance-and-investment-tool/blob/main/index.html) (Finance tools page), [`js/tool3-fire.js`](https://github.com/simongsk/finance-and-investment-tool/blob/main/js/tool3-fire.js) (FIRE calculator), [`js/net-worth.js`](https://github.com/simongsk/finance-and-investment-tool/blob/main/js/net-worth.js) (Net worth), [`js/monthly-status.js`](https://github.com/simongsk/finance-and-investment-tool/blob/main/js/monthly-status.js) (Monthly status)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_page["Finance tools page<br/>[index.html]"]
  node_calc["Shared calculations<br/>[calc.js]"]
  node_service["Offline support<br/>[sw.js]"]
end

subgraph group_invest["Investing tools"]
  node_guides["Tips and guides<br/>[fold.js]"]
  node_ask["ASK vs depot<br/>[tool1-ask-akt.js]"]
  node_monthly["Monthly investing<br/>[tool2-monthly.js]"]
  node_fire["FIRE calculator<br/>[tool3-fire.js]"]
  node_etf["ETF tax lookup<br/>[etf-tax.js]"]
end

subgraph group_finance["Finance planning"]
  node_budget["Budget planner<br/>[budget.js]"]
  node_pension["Pension planner<br/>[pension.js]"]
  node_loan["Loan capacity<br/>[loan-capacity.js]"]
  node_housing["Buy vs rent<br/>[buy-vs-rent.js]"]
  node_debt["Debt payoff<br/>[debt-payoff.js]"]
end

subgraph group_data["Personal data"]
  node_portfolio["Portfolio tracker<br/>[tool4-portfolio.js]"]
  node_wealth["Net worth<br/>[net-worth.js]"]
  node_status["Monthly status<br/>[monthly-status.js]"]
  node_storage[("Browser storage")]
  node_report["Print and CSV reports<br/>[report.js]"]
  node_backup["Backup and restore<br/>[sync.js]"]
end

node_user(("User"))
node_browser(("Browser"))
node_positivliste["Positive list data<br/>[positivliste.json]"]

node_user -->|"opens"| node_page
node_page -->|"offers"| node_ask
node_page -->|"offers"| node_monthly
node_page -->|"offers"| node_fire
node_page -->|"offers"| node_guides
node_page -->|"offers"| node_etf
node_page -->|"offers"| node_portfolio
node_page -->|"offers"| node_budget
node_page -->|"offers"| node_pension
node_page -->|"offers"| node_loan
node_page -->|"offers"| node_housing
node_page -->|"offers"| node_debt
node_page -->|"offers"| node_wealth
node_user -->|"enters figures"| node_ask
node_user -->|"enters figures"| node_monthly
node_user -->|"enters figures"| node_fire
node_ask -->|"calculates"| node_calc
node_monthly -->|"calculates"| node_calc
node_fire -->|"calculates"| node_calc
node_budget -->|"reads and writes"| node_storage
node_wealth -->|"reads and writes"| node_storage
node_portfolio -->|"reads and writes"| node_storage
node_status -->|"reads and writes"| node_storage
node_status -->|"updates history"| node_wealth
node_status -->|"updates history"| node_portfolio
node_fire -->|"fetches spending"| node_budget
node_fire -->|"fetches assets"| node_wealth
node_report -->|"reads data"| node_storage
node_backup -->|"backs up and restores"| node_storage
node_etf -.->|"loads on search"| node_positivliste
node_page -->|"registers"| node_service
node_service -->|"caches app"| node_browser

click node_page "https://github.com/simongsk/finance-and-investment-tool/blob/main/index.html"
click node_calc "https://github.com/simongsk/finance-and-investment-tool/blob/main/js/calc.js"
click node_guides "https://github.com/simongsk/finance-and-investment-tool/blob/main/js/fold.js"
click node_ask "https://github.com/simongsk/finance-and-investment-tool/blob/main/js/tool1-ask-akt.js"
click node_monthly "https://github.com/simongsk/finance-and-investment-tool/blob/main/js/tool2-monthly.js"
click node_fire "https://github.com/simongsk/finance-and-investment-tool/blob/main/js/tool3-fire.js"
click node_etf "https://github.com/simongsk/finance-and-investment-tool/blob/main/js/etf-tax.js"
click node_portfolio "https://github.com/simongsk/finance-and-investment-tool/blob/main/js/tool4-portfolio.js"
click node_budget "https://github.com/simongsk/finance-and-investment-tool/blob/main/js/budget.js"
click node_pension "https://github.com/simongsk/finance-and-investment-tool/blob/main/js/pension.js"
click node_loan "https://github.com/simongsk/finance-and-investment-tool/blob/main/js/loan-capacity.js"
click node_housing "https://github.com/simongsk/finance-and-investment-tool/blob/main/js/buy-vs-rent.js"
click node_debt "https://github.com/simongsk/finance-and-investment-tool/blob/main/js/debt-payoff.js"
click node_wealth "https://github.com/simongsk/finance-and-investment-tool/blob/main/js/net-worth.js"
click node_status "https://github.com/simongsk/finance-and-investment-tool/blob/main/js/monthly-status.js"
click node_report "https://github.com/simongsk/finance-and-investment-tool/blob/main/js/report.js"
click node_backup "https://github.com/simongsk/finance-and-investment-tool/blob/main/js/sync.js"
click node_service "https://github.com/simongsk/finance-and-investment-tool/blob/main/sw.js"
click node_positivliste "https://github.com/simongsk/finance-and-investment-tool/blob/main/data/positivliste.json"

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_page,node_calc,node_service,node_user,node_browser toneBlue
class node_guides,node_ask,node_monthly,node_fire,node_etf toneAmber
class node_budget,node_pension,node_loan,node_housing,node_debt toneMint
class node_portfolio,node_wealth,node_status,node_storage,node_report,node_backup toneRose
class node_positivliste toneTeal
```

## Components

### App shell

- [Finance tools page](https://github.com/simongsk/finance-and-investment-tool/blob/main/index.html): `index.html`
- [Shared calculations](https://github.com/simongsk/finance-and-investment-tool/blob/main/js/calc.js): `js/calc.js`
- [Offline support](https://github.com/simongsk/finance-and-investment-tool/blob/main/sw.js): `sw.js`

### Investing tools

- [Tips and guides](https://github.com/simongsk/finance-and-investment-tool/blob/main/js/fold.js): `js/fold.js`
- [ASK vs depot](https://github.com/simongsk/finance-and-investment-tool/blob/main/js/tool1-ask-akt.js): `js/tool1-ask-akt.js`
- [Monthly investing](https://github.com/simongsk/finance-and-investment-tool/blob/main/js/tool2-monthly.js): `js/tool2-monthly.js`
- [FIRE calculator](https://github.com/simongsk/finance-and-investment-tool/blob/main/js/tool3-fire.js): `js/tool3-fire.js`
- [ETF tax lookup](https://github.com/simongsk/finance-and-investment-tool/blob/main/js/etf-tax.js): `js/etf-tax.js`

### Finance planning

- [Budget planner](https://github.com/simongsk/finance-and-investment-tool/blob/main/js/budget.js): `js/budget.js`
- [Pension planner](https://github.com/simongsk/finance-and-investment-tool/blob/main/js/pension.js): `js/pension.js`
- [Loan capacity](https://github.com/simongsk/finance-and-investment-tool/blob/main/js/loan-capacity.js): `js/loan-capacity.js`
- [Buy vs rent](https://github.com/simongsk/finance-and-investment-tool/blob/main/js/buy-vs-rent.js): `js/buy-vs-rent.js`
- [Debt payoff](https://github.com/simongsk/finance-and-investment-tool/blob/main/js/debt-payoff.js): `js/debt-payoff.js`

### Personal data

- [Portfolio tracker](https://github.com/simongsk/finance-and-investment-tool/blob/main/js/tool4-portfolio.js): `js/tool4-portfolio.js`
- [Net worth](https://github.com/simongsk/finance-and-investment-tool/blob/main/js/net-worth.js): `js/net-worth.js`
- [Monthly status](https://github.com/simongsk/finance-and-investment-tool/blob/main/js/monthly-status.js): `js/monthly-status.js`
- **Browser storage**
- [Print and CSV reports](https://github.com/simongsk/finance-and-investment-tool/blob/main/js/report.js): `js/report.js`
- [Backup and restore](https://github.com/simongsk/finance-and-investment-tool/blob/main/js/sync.js): `js/sync.js`

### Other components

- **User**
- **Browser**
- [Positive list data](https://github.com/simongsk/finance-and-investment-tool/blob/main/data/positivliste.json): `data/positivliste.json`

## Connections

- User → Finance tools page: opens
- Finance tools page → ASK vs depot: offers
- Finance tools page → Monthly investing: offers
- Finance tools page → FIRE calculator: offers
- Finance tools page → Tips and guides: offers
- Finance tools page → ETF tax lookup: offers
- Finance tools page → Portfolio tracker: offers
- Finance tools page → Budget planner: offers
- Finance tools page → Pension planner: offers
- Finance tools page → Loan capacity: offers
- Finance tools page → Buy vs rent: offers
- Finance tools page → Debt payoff: offers
- Finance tools page → Net worth: offers
- User → ASK vs depot: enters figures
- User → Monthly investing: enters figures
- User → FIRE calculator: enters figures
- ASK vs depot → Shared calculations: calculates
- Monthly investing → Shared calculations: calculates
- FIRE calculator → Shared calculations: calculates
- Budget planner → Browser storage: reads and writes
- Net worth → Browser storage: reads and writes
- Portfolio tracker → Browser storage: reads and writes
- Monthly status → Browser storage: reads and writes
- Monthly status → Net worth: updates history
- Monthly status → Portfolio tracker: updates history
- FIRE calculator → Budget planner: fetches spending
- FIRE calculator → Net worth: fetches assets
- Print and CSV reports → Browser storage: reads data
- Backup and restore → Browser storage: backs up and restores
- ETF tax lookup → Positive list data: loads on search
- Finance tools page → Offline support: registers
- Offline support → Browser: caches app
