# peter-burza/budgeter architecture

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

- Interactive diagram: https://gitdiagram.com/peter-burza/budgeter
- Repository: https://github.com/peter-burza/budgeter

## Overview

BudgeTer is a personal budget tracker. A user records income or expenses on the dashboard; the app loads account settings and balances, retrieves transaction data, and presents financial overviews. Transactions can be future-dated and processed later, while settings support currency selection and recurring expected transactions. The graph includes authentication, transaction persistence, balance state, and dashboard summaries. The README is brief and several source excerpts are partial, so uncertain integrations and unsampled implementation details are omitted.

Main entry points: [`src/app/page.tsx`](https://github.com/peter-burza/budgeter/blob/main/src/app/page.tsx) (Dashboard), [`src/lib/index.tsx`](https://github.com/peter-burza/budgeter/blob/main/src/lib/index.tsx) (Transaction logic), [`src/context/TransactionsContext.tsx`](https://github.com/peter-burza/budgeter/blob/main/src/context/TransactionsContext.tsx) (Transactions context), [`src/context/CurrentBalance.ts`](https://github.com/peter-burza/budgeter/blob/main/src/context/CurrentBalance.ts) (Balance state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
  node_settingspage["Settings page<br/>[page.tsx]"]
  node_entry["Transaction entry<br/>[Entry.tsx]"]
  node_overview["Budget overview<br/>[BudgetOverview.tsx]"]
  node_currentoverview["Current overview"]
end

subgraph group_identity["Identity and settings"]
  node_auth["Auth context<br/>[AuthContext.tsx]"]
  node_settings["Settings state<br/>[SettingsState.ts]"]
  node_currency["Currency state<br/>[CurrencyState.ts]"]
  node_currencyselector["Currency selector"]
end

subgraph group_money["Transactions and balances"]
  node_transactions["Transactions context"]
  node_currentbalance["Balance state<br/>[CurrentBalance.ts]"]
  node_transactionlogic["Transaction logic<br/>[index.tsx]"]
  node_firestore[("Firestore data")]
end

subgraph group_planning["Recurring and future"]
  node_expstore["Recurring state"]
  node_expui["Recurring settings"]
  node_futurestore["Future state"]
end

node_user(("User"))
node_firebaseauth["Firebase Auth"]

node_user -->|"uses"| node_dashboard
node_user -->|"opens"| node_settingspage
node_dashboard -->|"renders"| node_entry
node_dashboard -->|"renders"| node_overview
node_dashboard -->|"renders"| node_currentoverview
node_entry -->|"saves via"| node_transactionlogic
node_dashboard -->|"fetches settings"| node_settings
node_dashboard -->|"fetches balance"| node_currentbalance
node_dashboard -->|"loads transactions"| node_transactions
node_dashboard -->|"loads recurring"| node_expstore
node_dashboard -->|"loads future"| node_futurestore
node_dashboard -->|"processes recurring"| node_transactionlogic
node_overview -->|"deletes via"| node_transactions
node_settingspage -->|"renders"| node_currencyselector
node_settingspage -->|"renders"| node_expui
node_currencyselector -->|"updates"| node_currency
node_expui -->|"manages"| node_expstore
node_auth -->|"authenticates"| node_firebaseauth
node_auth -->|"resets settings state"| node_settings
node_auth -->|"resets balance state"| node_currentbalance
node_transactions -->|"saves and processes"| node_transactionlogic
node_transactions -->|"reads and writes"| node_firestore
node_transactions -->|"updates balance"| node_currentbalance
node_transactionlogic -->|"reads and writes"| node_firestore
node_transactionlogic -->|"updates balance"| node_currentbalance
node_transactionlogic -->|"adds future entries"| node_futurestore
node_currentbalance -->|"reads and writes"| node_firestore
node_settings -->|"reads and writes"| node_firestore
node_expstore -->|"reads and writes"| node_firestore
node_futurestore -->|"reads and writes"| node_firestore

click node_dashboard "https://github.com/peter-burza/budgeter/blob/main/src/app/page.tsx"
click node_settingspage "https://github.com/peter-burza/budgeter/blob/main/src/app/settings/page.tsx"
click node_entry "https://github.com/peter-burza/budgeter/blob/main/src/components/Entry.tsx"
click node_overview "https://github.com/peter-burza/budgeter/blob/main/src/components/BudgetOverview.tsx"
click node_currentoverview "https://github.com/peter-burza/budgeter/blob/main/src/components/CurrentOverview.tsx"
click node_auth "https://github.com/peter-burza/budgeter/blob/main/src/context/AuthContext.tsx"
click node_settings "https://github.com/peter-burza/budgeter/blob/main/src/context/SettingsState.ts"
click node_currency "https://github.com/peter-burza/budgeter/blob/main/src/context/CurrencyState.ts"
click node_currencyselector "https://github.com/peter-burza/budgeter/blob/main/src/components/ui/CurrencySelector.tsx"
click node_transactions "https://github.com/peter-burza/budgeter/blob/main/src/context/TransactionsContext.tsx"
click node_currentbalance "https://github.com/peter-burza/budgeter/blob/main/src/context/CurrentBalance.ts"
click node_transactionlogic "https://github.com/peter-burza/budgeter/blob/main/src/lib/index.tsx"
click node_expstore "https://github.com/peter-burza/budgeter/blob/main/src/context/ExpTransactionsStore.ts"
click node_expui "https://github.com/peter-burza/budgeter/blob/main/src/components/ExpTransactions.tsx"
click node_futurestore "https://github.com/peter-burza/budgeter/blob/main/src/context/FutureTransactions.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_dashboard,node_settingspage,node_entry,node_overview,node_currentoverview,node_user toneBlue
class node_auth,node_settings,node_currency,node_currencyselector toneAmber
class node_transactions,node_currentbalance,node_transactionlogic,node_firestore toneMint
class node_expstore,node_expui,node_futurestore toneRose
class node_firebaseauth toneIndigo
```

## Components

### App experience

- [Dashboard](https://github.com/peter-burza/budgeter/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Settings page](https://github.com/peter-burza/budgeter/blob/main/src/app/settings/page.tsx): `src/app/settings/page.tsx`
- [Transaction entry](https://github.com/peter-burza/budgeter/blob/main/src/components/Entry.tsx): `src/components/Entry.tsx`
- [Budget overview](https://github.com/peter-burza/budgeter/blob/main/src/components/BudgetOverview.tsx): `src/components/BudgetOverview.tsx`
- [Current overview](https://github.com/peter-burza/budgeter/blob/main/src/components/CurrentOverview.tsx): `src/components/CurrentOverview.tsx`

### Identity and settings

- [Auth context](https://github.com/peter-burza/budgeter/blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [Settings state](https://github.com/peter-burza/budgeter/blob/main/src/context/SettingsState.ts): `src/context/SettingsState.ts`
- [Currency state](https://github.com/peter-burza/budgeter/blob/main/src/context/CurrencyState.ts): `src/context/CurrencyState.ts`
- [Currency selector](https://github.com/peter-burza/budgeter/blob/main/src/components/ui/CurrencySelector.tsx): `src/components/ui/CurrencySelector.tsx`

### Transactions and balances

- [Transactions context](https://github.com/peter-burza/budgeter/blob/main/src/context/TransactionsContext.tsx): `src/context/TransactionsContext.tsx`
- [Balance state](https://github.com/peter-burza/budgeter/blob/main/src/context/CurrentBalance.ts): `src/context/CurrentBalance.ts`
- [Transaction logic](https://github.com/peter-burza/budgeter/blob/main/src/lib/index.tsx): `src/lib/index.tsx`
- **Firestore data**

### Recurring and future

- [Recurring state](https://github.com/peter-burza/budgeter/blob/main/src/context/ExpTransactionsStore.ts): `src/context/ExpTransactionsStore.ts`
- [Recurring settings](https://github.com/peter-burza/budgeter/blob/main/src/components/ExpTransactions.tsx): `src/components/ExpTransactions.tsx`
- [Future state](https://github.com/peter-burza/budgeter/blob/main/src/context/FutureTransactions.ts): `src/context/FutureTransactions.ts`

### Other components

- **User**
- **Firebase Auth**

## Connections

- User → Dashboard: uses
- User → Settings page: opens
- Dashboard → Transaction entry: renders
- Dashboard → Budget overview: renders
- Dashboard → Current overview: renders
- Transaction entry → Transaction logic: saves via
- Dashboard → Settings state: fetches settings
- Dashboard → Balance state: fetches balance
- Dashboard → Transactions context: loads transactions
- Dashboard → Recurring state: loads recurring
- Dashboard → Future state: loads future
- Dashboard → Transaction logic: processes recurring
- Budget overview → Transactions context: deletes via
- Settings page → Currency selector: renders
- Settings page → Recurring settings: renders
- Currency selector → Currency state: updates
- Recurring settings → Recurring state: manages
- Auth context → Firebase Auth: authenticates
- Auth context → Settings state: resets settings state
- Auth context → Balance state: resets balance state
- Transactions context → Transaction logic: saves and processes
- Transactions context → Firestore data: reads and writes
- Transactions context → Balance state: updates balance
- Transaction logic → Firestore data: reads and writes
- Transaction logic → Balance state: updates balance
- Transaction logic → Future state: adds future entries
- Balance state → Firestore data: reads and writes
- Settings state → Firestore data: reads and writes
- Recurring state → Firestore data: reads and writes
- Future state → Firestore data: reads and writes
