# chvzrml-glitch/budget-tracker architecture

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

- Interactive diagram: https://gitdiagram.com/chvzrml-glitch/budget-tracker
- Repository: https://github.com/chvzrml-glitch/budget-tracker

## Overview

This is a browser-based personal budgeting app implemented primarily in one large JavaScript file. The user-facing workflow is to sign in, manage budget records, and review monthly reports or savings. The sampled code confirms Firebase authentication and Firestore persistence, and identifies transaction, transfer, debt, allowance, preset, money-pool, and Savings Vault data. Because the README is empty and the source excerpt is partial, internal links between these features are shown only where the excerpt supports them.

Main entry points: [`script.js`](https://github.com/chvzrml-glitch/budget-tracker/blob/main/script.js) (App runtime), [`index.html`](https://github.com/chvzrml-glitch/budget-tracker/blob/main/index.html) (App page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser client"]
  node_page["App page<br/>[index.html]"]
  node_runtime["App runtime<br/>[script.js]"]
end

subgraph group_budget["Budget management"]
  node_records["Budget records<br/>[script.js]"]
  node_transactions["Transactions<br/>[script.js]"]
  node_transfers["Transfers<br/>[script.js]"]
  node_debts["Debts<br/>[script.js]"]
  node_allowances["Allowance entries<br/>[script.js]"]
  node_presets["Presets<br/>[script.js]"]
  node_money_pool["Money pools<br/>[script.js]"]
end

subgraph group_insights["Savings and reports"]
  node_savings_vault["Savings Vault<br/>[script.js]"]
  node_monthly_report["Monthly report<br/>[script.js]"]
end

subgraph group_firebase["Firebase services"]
  node_auth{{"Firebase Auth"}}
  node_firestore[("Cloud budget store")]
end

node_user(("Budget user"))

node_user -.->|"uses"| node_page
node_page -.->|"hosts"| node_runtime
node_runtime -->|"authenticates"| node_auth
node_runtime -->|"loads and saves"| node_firestore
node_runtime -->|"loads and saves"| node_records
node_records -.->|"includes"| node_transactions
node_records -.->|"includes"| node_transfers
node_records -.->|"includes"| node_debts
node_records -.->|"includes"| node_allowances
node_runtime -->|"renders"| node_presets
node_runtime -->|"handles actions"| node_savings_vault
node_runtime -->|"builds report"| node_monthly_report
node_runtime -.->|"updates"| node_money_pool

click node_page "https://github.com/chvzrml-glitch/budget-tracker/blob/main/index.html"
click node_runtime "https://github.com/chvzrml-glitch/budget-tracker/blob/main/script.js"
click node_records "https://github.com/chvzrml-glitch/budget-tracker/blob/main/script.js"
click node_transactions "https://github.com/chvzrml-glitch/budget-tracker/blob/main/script.js"
click node_transfers "https://github.com/chvzrml-glitch/budget-tracker/blob/main/script.js"
click node_debts "https://github.com/chvzrml-glitch/budget-tracker/blob/main/script.js"
click node_allowances "https://github.com/chvzrml-glitch/budget-tracker/blob/main/script.js"
click node_presets "https://github.com/chvzrml-glitch/budget-tracker/blob/main/script.js"
click node_money_pool "https://github.com/chvzrml-glitch/budget-tracker/blob/main/script.js"
click node_savings_vault "https://github.com/chvzrml-glitch/budget-tracker/blob/main/script.js"
click node_monthly_report "https://github.com/chvzrml-glitch/budget-tracker/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_page,node_runtime,node_user toneBlue
class node_records,node_transactions,node_transfers,node_debts,node_allowances,node_presets,node_money_pool toneAmber
class node_savings_vault,node_monthly_report toneMint
class node_auth,node_firestore toneRose
```

## Components

### Browser client

- [App page](https://github.com/chvzrml-glitch/budget-tracker/blob/main/index.html): `index.html`
- [App runtime](https://github.com/chvzrml-glitch/budget-tracker/blob/main/script.js): `script.js`

### Budget management

- [Budget records](https://github.com/chvzrml-glitch/budget-tracker/blob/main/script.js): `script.js`
- [Transactions](https://github.com/chvzrml-glitch/budget-tracker/blob/main/script.js): `script.js`
- [Transfers](https://github.com/chvzrml-glitch/budget-tracker/blob/main/script.js): `script.js`
- [Debts](https://github.com/chvzrml-glitch/budget-tracker/blob/main/script.js): `script.js`
- [Allowance entries](https://github.com/chvzrml-glitch/budget-tracker/blob/main/script.js): `script.js`
- [Presets](https://github.com/chvzrml-glitch/budget-tracker/blob/main/script.js): `script.js`
- [Money pools](https://github.com/chvzrml-glitch/budget-tracker/blob/main/script.js): `script.js`

### Savings and reports

- [Savings Vault](https://github.com/chvzrml-glitch/budget-tracker/blob/main/script.js): `script.js`
- [Monthly report](https://github.com/chvzrml-glitch/budget-tracker/blob/main/script.js): `script.js`

### Firebase services

- **Firebase Auth**
- **Cloud budget store**

### Other components

- **Budget user**

## Connections

- Budget user → App page: uses
- App page → App runtime: hosts
- App runtime → Firebase Auth: authenticates (evidence: `script.js`)
- App runtime → Cloud budget store: loads and saves (evidence: `script.js`)
- App runtime → Budget records: loads and saves (evidence: `script.js`)
- Budget records → Transactions: includes (evidence: `script.js`)
- Budget records → Transfers: includes (evidence: `script.js`)
- Budget records → Debts: includes (evidence: `script.js`)
- Budget records → Allowance entries: includes (evidence: `script.js`)
- App runtime → Presets: renders (evidence: `script.js`)
- App runtime → Savings Vault: handles actions (evidence: `script.js`)
- App runtime → Monthly report: builds report (evidence: `script.js`)
- App runtime → Money pools: updates (evidence: `script.js`)
