# ghofranmohamed2006/expense-and-budget-tracker architecture

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

- Interactive diagram: https://gitdiagram.com/ghofranmohamed2006/expense-and-budget-tracker
- Repository: https://github.com/ghofranmohamed2006/expense-and-budget-tracker

## Overview

Pennywise is a personal finance web app; the README identifies the ASP.NET Core project under `Backend` as the supported integrated application and describes the other project folders as legacy or prototypes. The principal workflow is account access, then managing financial records and viewing summaries or reports. The graph preserves the documented budget, category, savings-goal, and settings areas. Several controllers and frontend interactions were not sampled, so their internal calls are not asserted; dashed edges mark documented or likely integration points whose wiring is not shown.

Main entry points: [`Backend/Program.cs`](https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Program.cs) (ASP.NET app host), [`Backend/Controllers/AuthController.cs`](https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Controllers/AuthController.cs) (Authentication API), [`Backend/Controllers/BudgetsController.cs`](https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Controllers/BudgetsController.cs) (Budgets), [`Backend/Controllers/GoalsController.cs`](https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Controllers/GoalsController.cs) (Savings goals)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Account Access"]
  node_auth["Authentication API<br/>[AuthController.cs]"]
  node_tokens["JWT tokens<br/>[TokenService.cs]"]
  node_settings["Profile settings"]
end

subgraph group_finance["Finance Management"]
  node_transactions["Transactions"]
  node_categories["Categories"]
  node_budgets["Budgets"]
  node_budgetmodel["Budget records<br/>[BudgetCategory.cs]"]
  node_goals["Savings goals<br/>[GoalsController.cs]"]
  node_goalmodel["Goal records<br/>[Goal.cs]"]
end

subgraph group_insights["Financial Insights"]
  node_dashboard["Dashboard"]
  node_reports["Reports"]
end

subgraph group_platform["Application Platform"]
  node_webapp["Finance interface<br/>[app.js]"]
  node_apphost["ASP.NET app host<br/>[Program.cs]"]
  node_database[("SQLite data context<br/>[AppDbContext.cs]")]
end

node_user(("Finance user"))

node_user -->|"uses"| node_webapp
node_webapp -.->|"requests API"| node_apphost
node_apphost -->|"maps controllers"| node_auth
node_apphost -->|"configures SQLite"| node_database
node_auth -->|"creates tokens"| node_tokens
node_user -.->|"records activity"| node_transactions
node_user -.->|"organizes activity"| node_categories
node_user -.->|"sets limits"| node_budgets
node_budgets -->|"uses records"| node_budgetmodel
node_user -.->|"tracks savings"| node_goals
node_goals -->|"uses records"| node_goalmodel
node_user -.->|"views summary"| node_dashboard
node_user -.->|"analyzes spending"| node_reports
node_user -.->|"manages preferences"| node_settings

click node_webapp "https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Frontend/app.js"
click node_apphost "https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Program.cs"
click node_auth "https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Controllers/AuthController.cs"
click node_tokens "https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Services/TokenService.cs"
click node_transactions "https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Controllers/TransactionsController.cs"
click node_categories "https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Controllers/CategoriesController.cs"
click node_budgets "https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Controllers/BudgetsController.cs"
click node_budgetmodel "https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Model/BudgetCategory.cs"
click node_goals "https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Controllers/GoalsController.cs"
click node_goalmodel "https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Model/Goal.cs"
click node_dashboard "https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Controllers/DashboardController.cs"
click node_reports "https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Controllers/ReportsController.cs"
click node_settings "https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Controllers/SettingsController.cs"
click node_database "https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Data/AppDbContext.cs"

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_auth,node_tokens,node_settings,node_user toneBlue
class node_transactions,node_categories,node_budgets,node_budgetmodel,node_goals,node_goalmodel toneAmber
class node_dashboard,node_reports toneMint
class node_webapp,node_apphost,node_database toneRose
```

## Components

### Account Access

- [Authentication API](https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Controllers/AuthController.cs): `Backend/Controllers/AuthController.cs`
- [JWT tokens](https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Services/TokenService.cs): `Backend/Services/TokenService.cs`
- [Profile settings](https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Controllers/SettingsController.cs): `Backend/Controllers/SettingsController.cs`

### Finance Management

- [Transactions](https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Controllers/TransactionsController.cs): `Backend/Controllers/TransactionsController.cs`
- [Categories](https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Controllers/CategoriesController.cs): `Backend/Controllers/CategoriesController.cs`
- [Budgets](https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Controllers/BudgetsController.cs): `Backend/Controllers/BudgetsController.cs`
- [Budget records](https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Model/BudgetCategory.cs): `Backend/Model/BudgetCategory.cs`
- [Savings goals](https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Controllers/GoalsController.cs): `Backend/Controllers/GoalsController.cs`
- [Goal records](https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Model/Goal.cs): `Backend/Model/Goal.cs`

### Financial Insights

- [Dashboard](https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Controllers/DashboardController.cs): `Backend/Controllers/DashboardController.cs`
- [Reports](https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Controllers/ReportsController.cs): `Backend/Controllers/ReportsController.cs`

### Application Platform

- [Finance interface](https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Frontend/app.js): `Frontend/app.js`
- [ASP.NET app host](https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Program.cs): `Backend/Program.cs`
- [SQLite data context](https://github.com/ghofranmohamed2006/expense-and-budget-tracker/blob/main/Backend/Data/AppDbContext.cs): `Backend/Data/AppDbContext.cs`

### Other components

- **Finance user**

## Connections

- Finance user → Finance interface: uses (evidence: `README.md`)
- Finance interface → ASP.NET app host: requests API
- ASP.NET app host → Authentication API: maps controllers (evidence: `Backend/Program.cs`)
- ASP.NET app host → SQLite data context: configures SQLite (evidence: `Backend/Program.cs`)
- Authentication API → JWT tokens: creates tokens (evidence: `Backend/Controllers/AuthController.cs`)
- Finance user → Transactions: records activity (evidence: `README.md`)
- Finance user → Categories: organizes activity (evidence: `README.md`)
- Finance user → Budgets: sets limits (evidence: `README.md`)
- Budgets → Budget records: uses records (evidence: `Backend/Controllers/BudgetsController.cs`)
- Finance user → Savings goals: tracks savings (evidence: `README.md`)
- Savings goals → Goal records: uses records
- Finance user → Dashboard: views summary (evidence: `README.md`)
- Finance user → Reports: analyzes spending (evidence: `README.md`)
- Finance user → Profile settings: manages preferences (evidence: `README.md`)
