# karthees-m/expense-tracker architecture

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

- Interactive diagram: https://gitdiagram.com/karthees-m/expense-tracker
- Repository: https://github.com/karthees-m/expense-tracker

## Overview

This is a React expense-tracking app. A user signs in, then the app loads their Firestore transactions and presents a dashboard plus transaction, category, budget, calendar, and settings views. Users can add, edit, and delete records; budgets are saved locally. The graph emphasizes the app-level orchestration and distinct product views. Some view implementations were not sampled, so their internal behavior and links are omitted; documented capabilities are retained where evidence permits.

Main entry points: [`src/App.jsx`](https://github.com/karthees-m/expense-tracker/blob/main/src/App.jsx) (App Orchestrator), [`src/components/AddModal/AddExpenseModal.jsx`](https://github.com/karthees-m/expense-tracker/blob/main/src/components/AddModal/AddExpenseModal.jsx) (Add Transaction), [`src/pages/Transactions/Transactions.jsx`](https://github.com/karthees-m/expense-tracker/blob/main/src/pages/Transactions/Transactions.jsx) (Transaction Manager), [`src/pages/Budgets/Budgets.jsx`](https://github.com/karthees-m/expense-tracker/blob/main/src/pages/Budgets/Budgets.jsx) (Budgets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App Shell &amp; Access"]
  node_app["App Orchestrator<br/>[App.jsx]"]
  node_authview["Sign-in View<br/>[LoginPage.jsx]"]
  node_navigation["Sidebar Navigation<br/>[Sidebar.jsx]"]
  node_firebase["Firebase Setup<br/>[firebase.js]"]
  node_fireauth(("Firebase Auth"))
end

subgraph group_records["Expense Records"]
  node_firestore[("Firestore")]
  node_expensemodal["Add Transaction"]
  node_transactions["Transaction Manager<br/>[Transactions.jsx]"]
  node_categories["Category Manager<br/>[Categories.jsx]"]
end

subgraph group_insights["Spending Views"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_budgets["Budgets<br/>[Budgets.jsx]"]
  node_calendar["Expense Calendar"]
end

subgraph group_preferences["Personalization"]
  node_settings["Settings<br/>[Settings.jsx]"]
  node_localstorage[("Browser Storage")]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_authview
node_user -->|"chooses sign-in"| node_authview
node_app -->|"uses auth"| node_firebase
node_app -->|"authenticates"| node_fireauth
node_firebase -->|"configures"| node_fireauth
node_app -->|"loads transactions"| node_firestore
node_app -->|"loads categories"| node_firestore
node_app -->|"renders"| node_navigation
node_user -->|"selects view"| node_navigation
node_app -->|"renders"| node_dashboard
node_app -->|"renders"| node_transactions
node_app -->|"renders"| node_categories
node_app -->|"renders"| node_budgets
node_app -->|"renders"| node_calendar
node_app -->|"renders"| node_settings
node_app -->|"renders"| node_expensemodal
node_user -->|"enters transaction"| node_expensemodal
node_expensemodal -->|"adds record"| node_firestore
node_transactions -->|"edits or deletes"| node_firestore
node_categories -->|"saves categories"| node_firestore
node_app -->|"passes expenses"| node_budgets
node_budgets -->|"saves budgets"| node_localstorage
node_app -->|"passes transactions"| node_calendar
node_settings -->|"updates profile"| node_fireauth
node_user -->|"manages records"| node_transactions

click node_app "https://github.com/karthees-m/expense-tracker/blob/main/src/App.jsx"
click node_authview "https://github.com/karthees-m/expense-tracker/blob/main/src/components/LoginPage/LoginPage.jsx"
click node_navigation "https://github.com/karthees-m/expense-tracker/blob/main/src/components/Sidebar/Sidebar.jsx"
click node_firebase "https://github.com/karthees-m/expense-tracker/blob/main/src/firebase.js"
click node_expensemodal "https://github.com/karthees-m/expense-tracker/blob/main/src/components/AddModal/AddExpenseModal.jsx"
click node_transactions "https://github.com/karthees-m/expense-tracker/blob/main/src/pages/Transactions/Transactions.jsx"
click node_categories "https://github.com/karthees-m/expense-tracker/blob/main/src/pages/Categories/Categories.jsx"
click node_dashboard "https://github.com/karthees-m/expense-tracker/blob/main/src/pages/Dashboard/Dashboard.jsx"
click node_budgets "https://github.com/karthees-m/expense-tracker/blob/main/src/pages/Budgets/Budgets.jsx"
click node_calendar "https://github.com/karthees-m/expense-tracker/blob/main/src/pages/Calendar/ExpenseCalendar.jsx"
click node_settings "https://github.com/karthees-m/expense-tracker/blob/main/src/pages/Settings/Settings.jsx"

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_app,node_authview,node_navigation,node_firebase,node_fireauth,node_user toneBlue
class node_firestore,node_expensemodal,node_transactions,node_categories toneAmber
class node_dashboard,node_budgets,node_calendar toneMint
class node_settings,node_localstorage toneRose
```

## Components

### App Shell & Access

- [App Orchestrator](https://github.com/karthees-m/expense-tracker/blob/main/src/App.jsx): `src/App.jsx`
- [Sign-in View](https://github.com/karthees-m/expense-tracker/blob/main/src/components/LoginPage/LoginPage.jsx): `src/components/LoginPage/LoginPage.jsx`
- [Sidebar Navigation](https://github.com/karthees-m/expense-tracker/blob/main/src/components/Sidebar/Sidebar.jsx): `src/components/Sidebar/Sidebar.jsx`
- [Firebase Setup](https://github.com/karthees-m/expense-tracker/blob/main/src/firebase.js): `src/firebase.js`
- **Firebase Auth**

### Expense Records

- **Firestore**
- [Add Transaction](https://github.com/karthees-m/expense-tracker/blob/main/src/components/AddModal/AddExpenseModal.jsx): `src/components/AddModal/AddExpenseModal.jsx`
- [Transaction Manager](https://github.com/karthees-m/expense-tracker/blob/main/src/pages/Transactions/Transactions.jsx): `src/pages/Transactions/Transactions.jsx`
- [Category Manager](https://github.com/karthees-m/expense-tracker/blob/main/src/pages/Categories/Categories.jsx): `src/pages/Categories/Categories.jsx`

### Spending Views

- [Dashboard](https://github.com/karthees-m/expense-tracker/blob/main/src/pages/Dashboard/Dashboard.jsx): `src/pages/Dashboard/Dashboard.jsx`
- [Budgets](https://github.com/karthees-m/expense-tracker/blob/main/src/pages/Budgets/Budgets.jsx): `src/pages/Budgets/Budgets.jsx`
- [Expense Calendar](https://github.com/karthees-m/expense-tracker/blob/main/src/pages/Calendar/ExpenseCalendar.jsx): `src/pages/Calendar/ExpenseCalendar.jsx`

### Personalization

- [Settings](https://github.com/karthees-m/expense-tracker/blob/main/src/pages/Settings/Settings.jsx): `src/pages/Settings/Settings.jsx`
- **Browser Storage**

### Other components

- **User**

## Connections

- User → App Orchestrator: uses
- App Orchestrator → Sign-in View: renders (evidence: `src/App.jsx`)
- User → Sign-in View: chooses sign-in (evidence: `src/components/LoginPage/LoginPage.jsx`)
- App Orchestrator → Firebase Setup: uses auth (evidence: `src/App.jsx`)
- App Orchestrator → Firebase Auth: authenticates (evidence: `src/App.jsx`)
- Firebase Setup → Firebase Auth: configures (evidence: `src/firebase.js`)
- App Orchestrator → Firestore: loads transactions (evidence: `src/App.jsx`)
- App Orchestrator → Firestore: loads categories (evidence: `src/App.jsx`)
- App Orchestrator → Sidebar Navigation: renders (evidence: `src/App.jsx`)
- User → Sidebar Navigation: selects view (evidence: `src/components/Sidebar/Sidebar.jsx`)
- App Orchestrator → Dashboard: renders (evidence: `src/App.jsx`)
- App Orchestrator → Transaction Manager: renders (evidence: `src/App.jsx`)
- App Orchestrator → Category Manager: renders (evidence: `src/App.jsx`)
- App Orchestrator → Budgets: renders (evidence: `src/App.jsx`)
- App Orchestrator → Expense Calendar: renders (evidence: `src/App.jsx`)
- App Orchestrator → Settings: renders (evidence: `src/App.jsx`)
- App Orchestrator → Add Transaction: renders (evidence: `src/App.jsx`)
- User → Add Transaction: enters transaction (evidence: `src/components/AddModal/AddExpenseModal.jsx`)
- Add Transaction → Firestore: adds record (evidence: `src/components/AddModal/AddExpenseModal.jsx`)
- Transaction Manager → Firestore: edits or deletes (evidence: `src/pages/Transactions/Transactions.jsx`)
- Category Manager → Firestore: saves categories (evidence: `src/pages/Categories/Categories.jsx`)
- App Orchestrator → Budgets: passes expenses (evidence: `src/App.jsx`)
- Budgets → Browser Storage: saves budgets (evidence: `src/pages/Budgets/Budgets.jsx`)
- App Orchestrator → Expense Calendar: passes transactions (evidence: `src/App.jsx`)
- Settings → Firebase Auth: updates profile (evidence: `src/pages/Settings/Settings.jsx`)
- User → Transaction Manager: manages records (evidence: `src/pages/Transactions/Transactions.jsx`)
