# kazhimykan/finance-diary architecture

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

- Interactive diagram: https://gitdiagram.com/kazhimykan/finance-diary
- Repository: https://github.com/kazhimykan/finance-diary

## Overview

This is a browser-based personal finance tracker. Users enter income and expenses, then review and filter records and see calculated summaries and budget progress. The same script also manages passive-income records and bank deposits, and provides a JSON file export. The available excerpts show these capabilities within one monolithic script; the empty README provides no further product description, and omitted source prevents verifying some internal calls.

Main entry points: [`index.html`](https://github.com/kazhimykan/finance-diary/blob/main/index.html) (Finance interface), [`script.js`](https://github.com/kazhimykan/finance-diary/blob/main/script.js) (Record entry and edits)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_finance["Finance tracking"]
  node_ui["Finance interface<br/>[index.html]"]
  node_records["Record entry and edits<br/>[script.js]"]
  node_summaries["Totals and budget<br/>[script.js]"]
  node_record_views["Search and record views<br/>[script.js]"]
end

subgraph group_passive["Passive income"]
  node_passive_ui["Passive-income interface<br/>[index.html]"]
  node_passive_records["Passive-income records<br/>[script.js]"]
  node_passive_views["Passive-income views<br/>[script.js]"]
end

subgraph group_deposits["Bank deposits"]
  node_deposit_ui["Deposit interface<br/>[index.html]"]
  node_deposit_records["Deposit management<br/>[script.js]"]
end

subgraph group_persistence["Local data and export"]
  node_browser_store[("Browser local storage")]
  node_json_export["JSON file export<br/>[script.js]"]
end

node_user(("User"))

node_user -->|"uses"| node_ui
node_ui -->|"submits records"| node_records
node_records -->|"saves records"| node_browser_store
node_records -->|"renders records"| node_record_views
node_record_views -.->|"updates totals"| node_summaries
node_ui -->|"sets budget"| node_summaries
node_user -->|"uses"| node_passive_ui
node_passive_ui -->|"submits records"| node_passive_records
node_passive_records -.->|"renders records"| node_passive_views
node_user -->|"uses"| node_deposit_ui
node_deposit_ui -->|"submits deposits"| node_deposit_records
node_user -->|"requests export"| node_json_export
node_json_export -.->|"exports data"| node_browser_store

click node_ui "https://github.com/kazhimykan/finance-diary/blob/main/index.html"
click node_records "https://github.com/kazhimykan/finance-diary/blob/main/script.js"
click node_summaries "https://github.com/kazhimykan/finance-diary/blob/main/script.js"
click node_record_views "https://github.com/kazhimykan/finance-diary/blob/main/script.js"
click node_passive_ui "https://github.com/kazhimykan/finance-diary/blob/main/index.html"
click node_passive_records "https://github.com/kazhimykan/finance-diary/blob/main/script.js"
click node_passive_views "https://github.com/kazhimykan/finance-diary/blob/main/script.js"
click node_deposit_ui "https://github.com/kazhimykan/finance-diary/blob/main/index.html"
click node_deposit_records "https://github.com/kazhimykan/finance-diary/blob/main/script.js"
click node_json_export "https://github.com/kazhimykan/finance-diary/blob/main/script.js"

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_ui,node_records,node_summaries,node_record_views,node_user toneBlue
class node_passive_ui,node_passive_records,node_passive_views toneAmber
class node_deposit_ui,node_deposit_records toneMint
class node_browser_store,node_json_export toneRose
```

## Components

### Finance tracking

- [Finance interface](https://github.com/kazhimykan/finance-diary/blob/main/index.html): `index.html`
- [Record entry and edits](https://github.com/kazhimykan/finance-diary/blob/main/script.js): `script.js`
- [Totals and budget](https://github.com/kazhimykan/finance-diary/blob/main/script.js): `script.js`
- [Search and record views](https://github.com/kazhimykan/finance-diary/blob/main/script.js): `script.js`

### Passive income

- [Passive-income interface](https://github.com/kazhimykan/finance-diary/blob/main/index.html): `index.html`
- [Passive-income records](https://github.com/kazhimykan/finance-diary/blob/main/script.js): `script.js`
- [Passive-income views](https://github.com/kazhimykan/finance-diary/blob/main/script.js): `script.js`

### Bank deposits

- [Deposit interface](https://github.com/kazhimykan/finance-diary/blob/main/index.html): `index.html`
- [Deposit management](https://github.com/kazhimykan/finance-diary/blob/main/script.js): `script.js`

### Local data and export

- **Browser local storage**
- [JSON file export](https://github.com/kazhimykan/finance-diary/blob/main/script.js): `script.js`

### Other components

- **User**

## Connections

- User → Finance interface: uses
- Finance interface → Record entry and edits: submits records (evidence: `script.js`)
- Record entry and edits → Browser local storage: saves records (evidence: `script.js`)
- Record entry and edits → Search and record views: renders records (evidence: `script.js`)
- Search and record views → Totals and budget: updates totals (evidence: `script.js`)
- Finance interface → Totals and budget: sets budget (evidence: `script.js`)
- User → Passive-income interface: uses
- Passive-income interface → Passive-income records: submits records (evidence: `script.js`)
- Passive-income records → Passive-income views: renders records (evidence: `script.js`)
- User → Deposit interface: uses
- Deposit interface → Deposit management: submits deposits (evidence: `script.js`)
- User → JSON file export: requests export (evidence: `script.js`)
- JSON file export → Browser local storage: exports data
