# abhii121/expense-tracker-project architecture

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

- Interactive diagram: https://gitdiagram.com/abhii121/expense-tracker-project
- Repository: https://github.com/abhii121/expense-tracker-project

## Overview

Expense Tracker is a personal-finance dashboard. Users register or sign in, then manage transactions, categories, and monthly budgets; the dashboard summarizes activity and charts trends. The Angular client calls an ASP.NET Core API, whose domain services operate on EF Core data in SQL Server. CSV import and signup-time category seeding are additional workflows. Relationships below use the README and SOURCE INDEX references; unsampled modules are represented by their exact tree paths, but their internal behavior is not inferred beyond documented capabilities.

Main entry points: [`client/src/app/app.routes.ts`](https://github.com/abhii121/expense-tracker-project/blob/main/client/src/app/app.routes.ts) (App routes), [`server/ExpenseTracker.Api/Data/AppDbContext.cs`](https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Data/AppDbContext.cs) (EF Core context), [`client/src/app/core/services/category.service.ts`](https://github.com/abhii121/expense-tracker-project/blob/main/client/src/app/core/services/category.service.ts) (Category client), [`client/src/app/features/transactions`](https://github.com/abhii121/expense-tracker-project/tree/main/client/src/app/features/transactions) (Transactions UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Angular client"]
  node_routes["App routes<br/>[app.routes.ts]"]
  node_auth_ui["Login and registration"]
  node_shell["Authenticated shell<br/>[shell.component.ts]"]
  node_transactions_ui["Transactions UI"]
  node_categories_ui["Categories UI"]
  node_budgets_ui["Budgets UI"]
  node_dashboard_ui["Dashboard and charts"]
  node_auth_client["Auth client<br/>[auth.service.ts]"]
  node_transaction_client["Transaction client"]
  node_category_client["Category client"]
  node_budget_client["Budget client<br/>[budget.service.ts]"]
  node_dashboard_client["Dashboard client"]
end

subgraph group_api["API endpoints"]
  node_auth_api["Auth endpoint<br/>[AuthController.cs]"]
  node_transaction_api["Transaction endpoint"]
  node_category_api["Category endpoint"]
  node_budget_api["Budget endpoint"]
  node_dashboard_api["Dashboard endpoint"]
end

subgraph group_domain["Finance services"]
  node_auth_service["Authentication and seeding<br/>[AuthService.cs]"]
  node_transaction_service["Transaction operations"]
  node_csv_service["CSV import"]
  node_category_service["Category operations<br/>[CategoryService.cs]"]
  node_budget_service["Budget calculations<br/>[BudgetService.cs]"]
  node_dashboard_service["Dashboard aggregation"]
  node_jwt_service["JWT tokens<br/>[JwtTokenService.cs]"]
end

subgraph group_storage["Persistence"]
  node_db_context["EF Core context<br/>[AppDbContext.cs]"]
  node_sql[("SQL Server")]
end

node_user(("User"))

node_user -->|"uses"| node_routes
node_routes -->|"routes to"| node_auth_ui
node_routes -->|"routes to"| node_shell
node_routes -->|"routes to"| node_dashboard_ui
node_routes -->|"routes to"| node_transactions_ui
node_routes -->|"routes to"| node_categories_ui
node_routes -->|"routes to"| node_budgets_ui
node_auth_ui -->|"calls"| node_auth_client
node_shell -->|"uses"| node_auth_client
node_transactions_ui -->|"calls"| node_transaction_client
node_transactions_ui -->|"calls"| node_category_client
node_categories_ui -->|"calls"| node_category_client
node_budgets_ui -->|"calls"| node_budget_client
node_budgets_ui -->|"calls"| node_category_client
node_dashboard_ui -->|"calls"| node_dashboard_client
node_auth_client -->|"HTTP requests"| node_auth_api
node_transaction_client -->|"HTTP requests"| node_transaction_api
node_category_client -->|"HTTP requests"| node_category_api
node_budget_client -->|"HTTP requests"| node_budget_api
node_dashboard_client -->|"HTTP requests"| node_dashboard_api
node_auth_api -->|"calls"| node_auth_service
node_transaction_api -->|"calls"| node_transaction_service
node_transaction_api -->|"calls"| node_csv_service
node_category_api -->|"calls"| node_category_service
node_budget_api -->|"calls"| node_budget_service
node_dashboard_api -->|"calls"| node_dashboard_service
node_auth_service -->|"generates token"| node_jwt_service
node_auth_service -->|"reads and writes"| node_db_context
node_transaction_service -->|"reads and writes"| node_db_context
node_csv_service -->|"imports into"| node_db_context
node_category_service -->|"reads and writes"| node_db_context
node_budget_service -->|"reads and writes"| node_db_context
node_dashboard_service -->|"reads"| node_db_context
node_db_context -->|"persists data"| node_sql

click node_routes "https://github.com/abhii121/expense-tracker-project/blob/main/client/src/app/app.routes.ts"
click node_auth_ui "https://github.com/abhii121/expense-tracker-project/tree/main/client/src/app/features/auth"
click node_shell "https://github.com/abhii121/expense-tracker-project/blob/main/client/src/app/layout/shell/shell.component.ts"
click node_transactions_ui "https://github.com/abhii121/expense-tracker-project/tree/main/client/src/app/features/transactions"
click node_categories_ui "https://github.com/abhii121/expense-tracker-project/blob/main/client/src/app/features/categories/categories.component.ts"
click node_budgets_ui "https://github.com/abhii121/expense-tracker-project/blob/main/client/src/app/features/budgets/budgets.component.ts"
click node_dashboard_ui "https://github.com/abhii121/expense-tracker-project/blob/main/client/src/app/features/dashboard/dashboard.component.ts"
click node_auth_client "https://github.com/abhii121/expense-tracker-project/blob/main/client/src/app/core/services/auth.service.ts"
click node_transaction_client "https://github.com/abhii121/expense-tracker-project/blob/main/client/src/app/core/services/transaction.service.ts"
click node_category_client "https://github.com/abhii121/expense-tracker-project/blob/main/client/src/app/core/services/category.service.ts"
click node_budget_client "https://github.com/abhii121/expense-tracker-project/blob/main/client/src/app/core/services/budget.service.ts"
click node_dashboard_client "https://github.com/abhii121/expense-tracker-project/blob/main/client/src/app/core/services/dashboard.service.ts"
click node_auth_api "https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Controllers/AuthController.cs"
click node_transaction_api "https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Controllers/TransactionsController.cs"
click node_category_api "https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Controllers/CategoriesController.cs"
click node_budget_api "https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Controllers/BudgetsController.cs"
click node_dashboard_api "https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Controllers/DashboardController.cs"
click node_auth_service "https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Services/AuthService.cs"
click node_transaction_service "https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Services/TransactionService.cs"
click node_csv_service "https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Services/CsvImportService.cs"
click node_category_service "https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Services/CategoryService.cs"
click node_budget_service "https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Services/BudgetService.cs"
click node_dashboard_service "https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Services/DashboardService.cs"
click node_jwt_service "https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Services/JwtTokenService.cs"
click node_db_context "https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/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_routes,node_auth_ui,node_shell,node_transactions_ui,node_categories_ui,node_budgets_ui,node_dashboard_ui,node_auth_client,node_transaction_client,node_category_client,node_budget_client,node_dashboard_client,node_user toneBlue
class node_auth_api,node_transaction_api,node_category_api,node_budget_api,node_dashboard_api toneAmber
class node_auth_service,node_transaction_service,node_csv_service,node_category_service,node_budget_service,node_dashboard_service,node_jwt_service toneMint
class node_db_context,node_sql toneRose
```

## Components

### Angular client

- [App routes](https://github.com/abhii121/expense-tracker-project/blob/main/client/src/app/app.routes.ts): `client/src/app/app.routes.ts`
- [Login and registration](https://github.com/abhii121/expense-tracker-project/tree/main/client/src/app/features/auth): `client/src/app/features/auth`
- [Authenticated shell](https://github.com/abhii121/expense-tracker-project/blob/main/client/src/app/layout/shell/shell.component.ts): `client/src/app/layout/shell/shell.component.ts`
- [Transactions UI](https://github.com/abhii121/expense-tracker-project/tree/main/client/src/app/features/transactions): `client/src/app/features/transactions`
- [Categories UI](https://github.com/abhii121/expense-tracker-project/blob/main/client/src/app/features/categories/categories.component.ts): `client/src/app/features/categories/categories.component.ts`
- [Budgets UI](https://github.com/abhii121/expense-tracker-project/blob/main/client/src/app/features/budgets/budgets.component.ts): `client/src/app/features/budgets/budgets.component.ts`
- [Dashboard and charts](https://github.com/abhii121/expense-tracker-project/blob/main/client/src/app/features/dashboard/dashboard.component.ts): `client/src/app/features/dashboard/dashboard.component.ts`
- [Auth client](https://github.com/abhii121/expense-tracker-project/blob/main/client/src/app/core/services/auth.service.ts): `client/src/app/core/services/auth.service.ts`
- [Transaction client](https://github.com/abhii121/expense-tracker-project/blob/main/client/src/app/core/services/transaction.service.ts): `client/src/app/core/services/transaction.service.ts`
- [Category client](https://github.com/abhii121/expense-tracker-project/blob/main/client/src/app/core/services/category.service.ts): `client/src/app/core/services/category.service.ts`
- [Budget client](https://github.com/abhii121/expense-tracker-project/blob/main/client/src/app/core/services/budget.service.ts): `client/src/app/core/services/budget.service.ts`
- [Dashboard client](https://github.com/abhii121/expense-tracker-project/blob/main/client/src/app/core/services/dashboard.service.ts): `client/src/app/core/services/dashboard.service.ts`

### API endpoints

- [Auth endpoint](https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Controllers/AuthController.cs): `server/ExpenseTracker.Api/Controllers/AuthController.cs`
- [Transaction endpoint](https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Controllers/TransactionsController.cs): `server/ExpenseTracker.Api/Controllers/TransactionsController.cs`
- [Category endpoint](https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Controllers/CategoriesController.cs): `server/ExpenseTracker.Api/Controllers/CategoriesController.cs`
- [Budget endpoint](https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Controllers/BudgetsController.cs): `server/ExpenseTracker.Api/Controllers/BudgetsController.cs`
- [Dashboard endpoint](https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Controllers/DashboardController.cs): `server/ExpenseTracker.Api/Controllers/DashboardController.cs`

### Finance services

- [Authentication and seeding](https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Services/AuthService.cs): `server/ExpenseTracker.Api/Services/AuthService.cs`
- [Transaction operations](https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Services/TransactionService.cs): `server/ExpenseTracker.Api/Services/TransactionService.cs`
- [CSV import](https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Services/CsvImportService.cs): `server/ExpenseTracker.Api/Services/CsvImportService.cs`
- [Category operations](https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Services/CategoryService.cs): `server/ExpenseTracker.Api/Services/CategoryService.cs`
- [Budget calculations](https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Services/BudgetService.cs): `server/ExpenseTracker.Api/Services/BudgetService.cs`
- [Dashboard aggregation](https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Services/DashboardService.cs): `server/ExpenseTracker.Api/Services/DashboardService.cs`
- [JWT tokens](https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Services/JwtTokenService.cs): `server/ExpenseTracker.Api/Services/JwtTokenService.cs`

### Persistence

- [EF Core context](https://github.com/abhii121/expense-tracker-project/blob/main/server/ExpenseTracker.Api/Data/AppDbContext.cs): `server/ExpenseTracker.Api/Data/AppDbContext.cs`
- **SQL Server**

### Other components

- **User**

## Connections

- User → App routes: uses (evidence: `client/src/app/app.routes.ts`)
- App routes → Login and registration: routes to (evidence: `client/src/app/app.routes.ts`)
- App routes → Authenticated shell: routes to (evidence: `client/src/app/app.routes.ts`)
- App routes → Dashboard and charts: routes to (evidence: `client/src/app/app.routes.ts`)
- App routes → Transactions UI: routes to (evidence: `client/src/app/app.routes.ts`)
- App routes → Categories UI: routes to (evidence: `client/src/app/app.routes.ts`)
- App routes → Budgets UI: routes to (evidence: `client/src/app/app.routes.ts`)
- Login and registration → Auth client: calls (evidence: `client/src/app/features/auth/register/register.component.ts`)
- Authenticated shell → Auth client: uses (evidence: `client/src/app/layout/shell/shell.component.ts`)
- Transactions UI → Transaction client: calls (evidence: `client/src/app/features/transactions/transaction-list/transaction-list.component.ts`)
- Transactions UI → Category client: calls (evidence: `client/src/app/features/transactions/transaction-list/transaction-list.component.ts`)
- Categories UI → Category client: calls (evidence: `client/src/app/features/categories/categories.component.ts`)
- Budgets UI → Budget client: calls (evidence: `client/src/app/features/budgets/budgets.component.ts`)
- Budgets UI → Category client: calls (evidence: `client/src/app/features/budgets/budgets.component.ts`)
- Dashboard and charts → Dashboard client: calls (evidence: `client/src/app/features/dashboard/dashboard.component.ts`)
- Auth client → Auth endpoint: HTTP requests (evidence: `README.md`)
- Transaction client → Transaction endpoint: HTTP requests (evidence: `README.md`)
- Category client → Category endpoint: HTTP requests (evidence: `README.md`)
- Budget client → Budget endpoint: HTTP requests (evidence: `README.md`)
- Dashboard client → Dashboard endpoint: HTTP requests (evidence: `README.md`)
- Auth endpoint → Authentication and seeding: calls (evidence: `server/ExpenseTracker.Api/Controllers/AuthController.cs`)
- Transaction endpoint → Transaction operations: calls (evidence: `server/ExpenseTracker.Api/Controllers/TransactionsController.cs`)
- Transaction endpoint → CSV import: calls (evidence: `server/ExpenseTracker.Api/Controllers/TransactionsController.cs`)
- Category endpoint → Category operations: calls (evidence: `server/ExpenseTracker.Api/Controllers/CategoriesController.cs`)
- Budget endpoint → Budget calculations: calls (evidence: `server/ExpenseTracker.Api/Controllers/BudgetsController.cs`)
- Dashboard endpoint → Dashboard aggregation: calls (evidence: `server/ExpenseTracker.Api/Controllers/DashboardController.cs`)
- Authentication and seeding → JWT tokens: generates token (evidence: `server/ExpenseTracker.Api/Services/AuthService.cs`)
- Authentication and seeding → EF Core context: reads and writes (evidence: `server/ExpenseTracker.Api/Services/AuthService.cs`)
- Transaction operations → EF Core context: reads and writes (evidence: `server/ExpenseTracker.Api/Services/TransactionService.cs`)
- CSV import → EF Core context: imports into (evidence: `server/ExpenseTracker.Api/Services/CsvImportService.cs`)
- Category operations → EF Core context: reads and writes (evidence: `server/ExpenseTracker.Api/Services/CategoryService.cs`)
- Budget calculations → EF Core context: reads and writes (evidence: `server/ExpenseTracker.Api/Services/BudgetService.cs`)
- Dashboard aggregation → EF Core context: reads (evidence: `server/ExpenseTracker.Api/Services/DashboardService.cs`)
- EF Core context → SQL Server: persists data
