# johnskouloudis/expensetrackingsystem architecture

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

- Interactive diagram: https://gitdiagram.com/johnskouloudis/expensetrackingsystem
- Repository: https://github.com/johnskouloudis/expensetrackingsystem

## Overview

This repository is the Spring Boot backend for a personal expense-tracking product; the README describes a Vue frontend that is not present in the supplied tree. Users manage accounts and transactions, then use budgets, analytics, receipt storage, and CSV export. The tree exposes controllers, services, repositories, and persistence entities, but no source excerpts were provided, so internal call relationships are not asserted; dashed links mark relationships implied by the README rather than verified in source.

Main entry points: [`src/main/java/com/example/expensetrackingsystem/ExpenseTrackingSystemApplication.java`](https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/ExpenseTrackingSystemApplication.java) (Spring backend), [`src/main/java/com/example/expensetrackingsystem/services/ReceiptService.java`](https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/services/ReceiptService.java) (Receipt handling), [`src/main/java/com/example/expensetrackingsystem/controllers/AuthController.java`](https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/controllers/AuthController.java) (Authentication), [`src/main/java/com/example/expensetrackingsystem/controllers/AccountController.java`](https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/controllers/AccountController.java) (Accounts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API and identity"]
  node_backend["Spring backend"]
  node_auth["Authentication"]
  node_security["JWT security"]
end

subgraph group_finance["Finance workflows"]
  node_accounts["Accounts"]
  node_transactions["Transactions"]
  node_categories["Categories"]
  node_budgets["Budgets"]
end

subgraph group_insights["Insights and files"]
  node_analytics["Analytics"]
  node_receipts["Receipt handling"]
  node_receipt_storage["Receipt storage<br/>[ImageService.java]"]
  node_csv_export["CSV export"]
end

subgraph group_persistence["Persistence"]
  node_repositories["Data repositories"]
  node_entities["Finance records"]
end

node_user(("App user"))
node_postgres[("PostgreSQL")]

node_user -.->|"uses"| node_backend
node_user -.->|"signs in"| node_auth
node_user -.->|"tracks accounts"| node_accounts
node_user -.->|"records activity"| node_transactions
node_user -.->|"classifies activity"| node_categories
node_user -.->|"sets budgets"| node_budgets
node_user -.->|"views insights"| node_analytics
node_user -.->|"attaches receipts"| node_receipts
node_user -.->|"exports data"| node_csv_export
node_backend -.->|"persists data"| node_postgres
node_receipts -.->|"stores files"| node_receipt_storage

click node_backend "https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/ExpenseTrackingSystemApplication.java"
click node_auth "https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/controllers/AuthController.java"
click node_security "https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/config/SecurityConfig.java"
click node_accounts "https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/controllers/AccountController.java"
click node_transactions "https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/controllers/TransactionController.java"
click node_categories "https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/controllers/CategoryController.java"
click node_budgets "https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/controllers/BudgetController.java"
click node_analytics "https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/services/TransactionService.java"
click node_receipts "https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/services/ReceiptService.java"
click node_receipt_storage "https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/services/ImageService.java"
click node_csv_export "https://github.com/johnskouloudis/expensetrackingsystem/tree/main/src/main/java/com/example/expensetrackingsystem/services"
click node_repositories "https://github.com/johnskouloudis/expensetrackingsystem/tree/main/src/main/java/com/example/expensetrackingsystem/repositories"
click node_entities "https://github.com/johnskouloudis/expensetrackingsystem/tree/main/src/main/java/com/example/expensetrackingsystem/entities"

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_backend,node_auth,node_security,node_user toneBlue
class node_accounts,node_transactions,node_categories,node_budgets,node_postgres toneAmber
class node_analytics,node_receipts,node_receipt_storage,node_csv_export toneMint
class node_repositories,node_entities toneRose
```

## Components

### API and identity

- [Spring backend](https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/ExpenseTrackingSystemApplication.java): `src/main/java/com/example/expensetrackingsystem/ExpenseTrackingSystemApplication.java`
- [Authentication](https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/controllers/AuthController.java): `src/main/java/com/example/expensetrackingsystem/controllers/AuthController.java`
- [JWT security](https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/config/SecurityConfig.java): `src/main/java/com/example/expensetrackingsystem/config/SecurityConfig.java`

### Finance workflows

- [Accounts](https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/controllers/AccountController.java): `src/main/java/com/example/expensetrackingsystem/controllers/AccountController.java`
- [Transactions](https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/controllers/TransactionController.java): `src/main/java/com/example/expensetrackingsystem/controllers/TransactionController.java`
- [Categories](https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/controllers/CategoryController.java): `src/main/java/com/example/expensetrackingsystem/controllers/CategoryController.java`
- [Budgets](https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/controllers/BudgetController.java): `src/main/java/com/example/expensetrackingsystem/controllers/BudgetController.java`

### Insights and files

- [Analytics](https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/services/TransactionService.java): `src/main/java/com/example/expensetrackingsystem/services/TransactionService.java`
- [Receipt handling](https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/services/ReceiptService.java): `src/main/java/com/example/expensetrackingsystem/services/ReceiptService.java`
- [Receipt storage](https://github.com/johnskouloudis/expensetrackingsystem/blob/main/src/main/java/com/example/expensetrackingsystem/services/ImageService.java): `src/main/java/com/example/expensetrackingsystem/services/ImageService.java`
- [CSV export](https://github.com/johnskouloudis/expensetrackingsystem/tree/main/src/main/java/com/example/expensetrackingsystem/services): `src/main/java/com/example/expensetrackingsystem/services`

### Persistence

- [Data repositories](https://github.com/johnskouloudis/expensetrackingsystem/tree/main/src/main/java/com/example/expensetrackingsystem/repositories): `src/main/java/com/example/expensetrackingsystem/repositories`
- [Finance records](https://github.com/johnskouloudis/expensetrackingsystem/tree/main/src/main/java/com/example/expensetrackingsystem/entities): `src/main/java/com/example/expensetrackingsystem/entities`

### Other components

- **App user**
- **PostgreSQL**

## Connections

- App user → Spring backend: uses (evidence: `README.md`)
- App user → Authentication: signs in (evidence: `README.md`)
- App user → Accounts: tracks accounts (evidence: `README.md`)
- App user → Transactions: records activity (evidence: `README.md`)
- App user → Categories: classifies activity (evidence: `README.md`)
- App user → Budgets: sets budgets (evidence: `README.md`)
- App user → Analytics: views insights (evidence: `README.md`)
- App user → Receipt handling: attaches receipts (evidence: `README.md`)
- App user → CSV export: exports data (evidence: `README.md`)
- Spring backend → PostgreSQL: persists data (evidence: `README.md`)
- Receipt handling → Receipt storage: stores files (evidence: `README.md`)
