# rohergun/personal-budget-manager architecture

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

- Interactive diagram: https://gitdiagram.com/rohergun/personal-budget-manager
- Repository: https://github.com/rohergun/personal-budget-manager

## Overview

BudgetManager combines a React finance dashboard with a Spring REST API. Users register or sign in, then manage transactions, categories, budgets, and savings goals; the dashboard presents monthly activity and budget comparisons. The backend separates HTTP controllers, domain services, and repositories. The README documents JWT authentication, login rate limiting, caching, and health checks; source excerpts are limited, so wiring beyond the sampled service contracts and authentication helpers is represented only where the tree and documentation support it.

Main entry points: [`frontend/src/App.tsx`](https://github.com/rohergun/personal-budget-manager/blob/main/frontend/src/App.tsx) (Route application), [`src/main/java/io/github/rohergun/budgetmanager/auth/AuthController.java`](https://github.com/rohergun/personal-budget-manager/blob/main/src/main/java/io/github/rohergun/budgetmanager/auth/AuthController.java) (Auth controller), [`frontend/src/pages`](https://github.com/rohergun/personal-budget-manager/tree/main/frontend/src/pages) (Finance pages), [`frontend/src/api/client.ts`](https://github.com/rohergun/personal-budget-manager/blob/main/frontend/src/api/client.ts) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["Route application<br/>[App.tsx]"]
  node_auth_context["Auth context<br/>[AuthContext.tsx]"]
  node_finance_pages["Finance pages"]
  node_api_client["API client<br/>[client.ts]"]
  node_api_modules["API modules"]
end

subgraph group_identity["Identity and security"]
  node_application["Spring application"]
  node_auth_controller["Auth controller"]
  node_auth_service["Auth service"]
  node_jwt["JWT service<br/>[JwtService.java]"]
  node_user_details["User lookup"]
  node_security_filters["Security filters"]
end

subgraph group_finance["Finance domains"]
  node_transaction["Transactions"]
  node_category["Categories"]
  node_budget["Budgets"]
  node_goal["Financial goals"]
  node_user_profile["User profile"]
end

subgraph group_insights["Summary and operations"]
  node_summary["Monthly summary"]
  node_cache_config["Cache configuration<br/>[CacheConfig.java]"]
  node_health["Cache health"]
end

node_person(("Finance user"))
node_database[("Relational database")]
node_api_consumer(("REST API consumer"))

node_person -->|"uses"| node_app
node_app -->|"provides auth"| node_auth_context
node_app -->|"routes"| node_finance_pages
node_finance_pages -->|"requests data"| node_api_modules
node_api_modules -->|"uses client"| node_api_client
node_api_client -->|"HTTP requests"| node_api_consumer
node_api_consumer -->|"REST requests"| node_auth_controller
node_api_consumer -->|"REST requests"| node_transaction
node_api_consumer -->|"REST requests"| node_category
node_api_consumer -->|"REST requests"| node_budget
node_api_consumer -->|"REST requests"| node_goal
node_api_consumer -->|"REST requests"| node_summary
node_api_consumer -->|"REST requests"| node_user_profile
node_application -->|"starts application"| node_auth_controller
node_auth_controller -->|"delegates auth"| node_auth_service
node_auth_service -->|"issues tokens"| node_jwt
node_user_details -->|"loads users"| node_database
node_security_filters -->|"validates tokens"| node_jwt
node_transaction -->|"persists records"| node_database
node_category -->|"persists records"| node_database
node_budget -->|"persists records"| node_database
node_goal -->|"persists records"| node_database
node_user_profile -->|"persists profiles"| node_database
node_summary -->|"reads activity"| node_database
node_health -.->|"checks cache"| node_cache_config

click node_app "https://github.com/rohergun/personal-budget-manager/blob/main/frontend/src/App.tsx"
click node_auth_context "https://github.com/rohergun/personal-budget-manager/blob/main/frontend/src/context/AuthContext.tsx"
click node_finance_pages "https://github.com/rohergun/personal-budget-manager/tree/main/frontend/src/pages"
click node_api_client "https://github.com/rohergun/personal-budget-manager/blob/main/frontend/src/api/client.ts"
click node_api_modules "https://github.com/rohergun/personal-budget-manager/tree/main/frontend/src/api"
click node_application "https://github.com/rohergun/personal-budget-manager/blob/main/src/main/java/io/github/rohergun/budgetmanager/BudgetManagerApplication.java"
click node_auth_controller "https://github.com/rohergun/personal-budget-manager/blob/main/src/main/java/io/github/rohergun/budgetmanager/auth/AuthController.java"
click node_auth_service "https://github.com/rohergun/personal-budget-manager/blob/main/src/main/java/io/github/rohergun/budgetmanager/auth/AuthServiceImpl.java"
click node_jwt "https://github.com/rohergun/personal-budget-manager/blob/main/src/main/java/io/github/rohergun/budgetmanager/security/JwtService.java"
click node_user_details "https://github.com/rohergun/personal-budget-manager/blob/main/src/main/java/io/github/rohergun/budgetmanager/security/CustomUserDetailsService.java"
click node_security_filters "https://github.com/rohergun/personal-budget-manager/tree/main/src/main/java/io/github/rohergun/budgetmanager/security"
click node_transaction "https://github.com/rohergun/personal-budget-manager/tree/main/src/main/java/io/github/rohergun/budgetmanager/transaction"
click node_category "https://github.com/rohergun/personal-budget-manager/tree/main/src/main/java/io/github/rohergun/budgetmanager/category"
click node_budget "https://github.com/rohergun/personal-budget-manager/tree/main/src/main/java/io/github/rohergun/budgetmanager/budget"
click node_goal "https://github.com/rohergun/personal-budget-manager/tree/main/src/main/java/io/github/rohergun/budgetmanager/financialgoal"
click node_user_profile "https://github.com/rohergun/personal-budget-manager/tree/main/src/main/java/io/github/rohergun/budgetmanager/user"
click node_summary "https://github.com/rohergun/personal-budget-manager/tree/main/src/main/java/io/github/rohergun/budgetmanager/summary"
click node_cache_config "https://github.com/rohergun/personal-budget-manager/blob/main/src/main/java/io/github/rohergun/budgetmanager/config/CacheConfig.java"
click node_health "https://github.com/rohergun/personal-budget-manager/blob/main/src/main/java/io/github/rohergun/budgetmanager/config/CacheHealthIndicator.java"

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_auth_context,node_finance_pages,node_api_client,node_api_modules,node_person toneBlue
class node_application,node_auth_controller,node_auth_service,node_jwt,node_user_details,node_security_filters,node_database toneAmber
class node_transaction,node_category,node_budget,node_goal,node_user_profile,node_api_consumer toneMint
class node_summary,node_cache_config,node_health toneRose
```

## Components

### Web application

- [Route application](https://github.com/rohergun/personal-budget-manager/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Auth context](https://github.com/rohergun/personal-budget-manager/blob/main/frontend/src/context/AuthContext.tsx): `frontend/src/context/AuthContext.tsx`
- [Finance pages](https://github.com/rohergun/personal-budget-manager/tree/main/frontend/src/pages): `frontend/src/pages`
- [API client](https://github.com/rohergun/personal-budget-manager/blob/main/frontend/src/api/client.ts): `frontend/src/api/client.ts`
- [API modules](https://github.com/rohergun/personal-budget-manager/tree/main/frontend/src/api): `frontend/src/api`

### Identity and security

- [Spring application](https://github.com/rohergun/personal-budget-manager/blob/main/src/main/java/io/github/rohergun/budgetmanager/BudgetManagerApplication.java): `src/main/java/io/github/rohergun/budgetmanager/BudgetManagerApplication.java`
- [Auth controller](https://github.com/rohergun/personal-budget-manager/blob/main/src/main/java/io/github/rohergun/budgetmanager/auth/AuthController.java): `src/main/java/io/github/rohergun/budgetmanager/auth/AuthController.java`
- [Auth service](https://github.com/rohergun/personal-budget-manager/blob/main/src/main/java/io/github/rohergun/budgetmanager/auth/AuthServiceImpl.java): `src/main/java/io/github/rohergun/budgetmanager/auth/AuthServiceImpl.java`
- [JWT service](https://github.com/rohergun/personal-budget-manager/blob/main/src/main/java/io/github/rohergun/budgetmanager/security/JwtService.java): `src/main/java/io/github/rohergun/budgetmanager/security/JwtService.java`
- [User lookup](https://github.com/rohergun/personal-budget-manager/blob/main/src/main/java/io/github/rohergun/budgetmanager/security/CustomUserDetailsService.java): `src/main/java/io/github/rohergun/budgetmanager/security/CustomUserDetailsService.java`
- [Security filters](https://github.com/rohergun/personal-budget-manager/tree/main/src/main/java/io/github/rohergun/budgetmanager/security): `src/main/java/io/github/rohergun/budgetmanager/security`

### Finance domains

- [Transactions](https://github.com/rohergun/personal-budget-manager/tree/main/src/main/java/io/github/rohergun/budgetmanager/transaction): `src/main/java/io/github/rohergun/budgetmanager/transaction`
- [Categories](https://github.com/rohergun/personal-budget-manager/tree/main/src/main/java/io/github/rohergun/budgetmanager/category): `src/main/java/io/github/rohergun/budgetmanager/category`
- [Budgets](https://github.com/rohergun/personal-budget-manager/tree/main/src/main/java/io/github/rohergun/budgetmanager/budget): `src/main/java/io/github/rohergun/budgetmanager/budget`
- [Financial goals](https://github.com/rohergun/personal-budget-manager/tree/main/src/main/java/io/github/rohergun/budgetmanager/financialgoal): `src/main/java/io/github/rohergun/budgetmanager/financialgoal`
- [User profile](https://github.com/rohergun/personal-budget-manager/tree/main/src/main/java/io/github/rohergun/budgetmanager/user): `src/main/java/io/github/rohergun/budgetmanager/user`

### Summary and operations

- [Monthly summary](https://github.com/rohergun/personal-budget-manager/tree/main/src/main/java/io/github/rohergun/budgetmanager/summary): `src/main/java/io/github/rohergun/budgetmanager/summary`
- [Cache configuration](https://github.com/rohergun/personal-budget-manager/blob/main/src/main/java/io/github/rohergun/budgetmanager/config/CacheConfig.java): `src/main/java/io/github/rohergun/budgetmanager/config/CacheConfig.java`
- [Cache health](https://github.com/rohergun/personal-budget-manager/blob/main/src/main/java/io/github/rohergun/budgetmanager/config/CacheHealthIndicator.java): `src/main/java/io/github/rohergun/budgetmanager/config/CacheHealthIndicator.java`

### Other components

- **Finance user**
- **Relational database**
- **REST API consumer**

## Connections

- Finance user → Route application: uses
- Route application → Auth context: provides auth
- Route application → Finance pages: routes
- Finance pages → API modules: requests data
- API modules → API client: uses client
- API client → REST API consumer: HTTP requests
- REST API consumer → Auth controller: REST requests
- REST API consumer → Transactions: REST requests
- REST API consumer → Categories: REST requests
- REST API consumer → Budgets: REST requests
- REST API consumer → Financial goals: REST requests
- REST API consumer → Monthly summary: REST requests
- REST API consumer → User profile: REST requests
- Spring application → Auth controller: starts application
- Auth controller → Auth service: delegates auth
- Auth service → JWT service: issues tokens
- User lookup → Relational database: loads users
- Security filters → JWT service: validates tokens
- Transactions → Relational database: persists records
- Categories → Relational database: persists records
- Budgets → Relational database: persists records
- Financial goals → Relational database: persists records
- User profile → Relational database: persists profiles
- Monthly summary → Relational database: reads activity
- Cache health → Cache configuration: checks cache
