# badiaael/support-desk architecture

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

- Interactive diagram: https://gitdiagram.com/badiaael/support-desk
- Repository: https://github.com/badiaael/support-desk

## Overview

Support Desk is a ticket-management web application: clients report technical problems, technicians track ticket status and comments, and users can view monthly activity reports. The React interface routes users to ticket listing, creation, detail, and reporting workflows; its API module issues HTTP requests to the Spring application. The backend is organized around ticket, client, and report domains, with PostgreSQL persistence. The README documents the capabilities and database setup, but backend implementation was not sampled, so internal backend call relationships are not asserted.

Main entry points: [`frontend/src/api.js`](https://github.com/badiaael/support-desk/blob/main/frontend/src/api.js) (HTTP API client), [`frontend/src/App.jsx`](https://github.com/badiaael/support-desk/blob/main/frontend/src/App.jsx) (React app routes), [`src/main/java/com/example/SupportDesk/ticket/TicketService.java`](https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/ticket/TicketService.java) (Ticket rules and workflow), [`frontend/src/pages/TicketListPage.jsx`](https://github.com/badiaael/support-desk/blob/main/frontend/src/pages/TicketListPage.jsx) (Ticket list)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_webapp["React app routes<br/>[App.jsx]"]
  node_ticket_list["Ticket list<br/>[TicketListPage.jsx]"]
  node_ticket_filters["Ticket filters<br/>[TicketFilters.jsx]"]
  node_ticket_table["Ticket table<br/>[TicketTable.jsx]"]
  node_ticket_create["Ticket creation"]
  node_ticket_detail["Ticket detail"]
  node_report_page["Report page<br/>[ReportPage.jsx]"]
  node_badges["Status and priority badges<br/>[Badge.jsx]"]
  node_date_format["Date formatting<br/>[format.js]"]
  node_http_api["HTTP API client<br/>[api.js]"]
end

subgraph group_ticket["Ticket management"]
  node_ticket_api["Ticket API"]
  node_ticket_service["Ticket rules and workflow<br/>[TicketService.java]"]
  node_ticket_query["Ticket filtering"]
  node_ticket_store["Ticket persistence"]
  node_comment_domain["Ticket comments<br/>[Comment.java]"]
  node_comment_store["Comment persistence"]
end

subgraph group_client["Client management"]
  node_client_api["Client API"]
  node_client_service["Client management<br/>[ClientService.java]"]
  node_client_store["Client persistence"]
end

subgraph group_report["Monthly reporting"]
  node_report_api["Report API"]
  node_report_service["Report aggregation<br/>[ReportService.java]"]
  node_report_calc["Monthly calculations"]
end

subgraph group_platform["Persistence and errors"]
  node_database[("PostgreSQL database")]
  node_schema["Database schema migration"]
  node_error_handler["API error handling"]
end

node_user(("Desk user"))

node_user -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_ticket_list
node_webapp -->|"routes to"| node_ticket_create
node_webapp -->|"routes to"| node_ticket_detail
node_webapp -->|"routes to"| node_report_page
node_ticket_list -->|"renders"| node_ticket_filters
node_ticket_list -->|"renders"| node_ticket_table
node_ticket_list -->|"loads tickets"| node_http_api
node_ticket_create -->|"creates ticket"| node_http_api
node_ticket_detail -->|"loads and updates"| node_http_api
node_report_page -->|"loads report"| node_http_api
node_ticket_table -->|"renders"| node_badges
node_ticket_table -->|"formats dates"| node_date_format
node_ticket_detail -->|"renders"| node_badges
node_ticket_detail -->|"formats dates"| node_date_format
node_report_page -->|"uses labels"| node_badges
node_http_api -.->|"HTTP requests"| node_ticket_api
node_http_api -.->|"HTTP requests"| node_client_api
node_http_api -.->|"HTTP requests"| node_report_api
node_ticket_api -.->|"delegates"| node_ticket_service
node_ticket_service -.->|"filters tickets"| node_ticket_query
node_ticket_service -.->|"persists tickets"| node_ticket_store
node_ticket_service -.->|"stores comments"| node_comment_store
node_ticket_service -.->|"manages comments"| node_comment_domain
node_client_api -.->|"delegates"| node_client_service
node_client_service -.->|"reads clients"| node_client_store
node_report_api -.->|"delegates"| node_report_service
node_report_service -.->|"calculates metrics"| node_report_calc
node_ticket_store -.->|"reads and writes"| node_database
node_comment_store -.->|"reads and writes"| node_database
node_client_store -.->|"reads and writes"| node_database
node_schema -.->|"defines schema"| node_database

click node_webapp "https://github.com/badiaael/support-desk/blob/main/frontend/src/App.jsx"
click node_ticket_list "https://github.com/badiaael/support-desk/blob/main/frontend/src/pages/TicketListPage.jsx"
click node_ticket_filters "https://github.com/badiaael/support-desk/blob/main/frontend/src/components/TicketFilters.jsx"
click node_ticket_table "https://github.com/badiaael/support-desk/blob/main/frontend/src/components/TicketTable.jsx"
click node_ticket_create "https://github.com/badiaael/support-desk/blob/main/frontend/src/pages/TicketCreatePage.jsx"
click node_ticket_detail "https://github.com/badiaael/support-desk/blob/main/frontend/src/pages/TicketDetailPage.jsx"
click node_report_page "https://github.com/badiaael/support-desk/blob/main/frontend/src/pages/ReportPage.jsx"
click node_badges "https://github.com/badiaael/support-desk/blob/main/frontend/src/components/Badge.jsx"
click node_date_format "https://github.com/badiaael/support-desk/blob/main/frontend/src/format.js"
click node_http_api "https://github.com/badiaael/support-desk/blob/main/frontend/src/api.js"
click node_ticket_api "https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/ticket/TicketController.java"
click node_ticket_service "https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/ticket/TicketService.java"
click node_ticket_query "https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/ticket/TicketSpecifications.java"
click node_ticket_store "https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/ticket/TicketRepository.java"
click node_comment_domain "https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/ticket/comment/Comment.java"
click node_comment_store "https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/ticket/comment/CommentRepository.java"
click node_client_api "https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/client/ClientController.java"
click node_client_service "https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/client/ClientService.java"
click node_client_store "https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/client/ClientRepository.java"
click node_report_api "https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/report/ReportController.java"
click node_report_service "https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/report/ReportService.java"
click node_report_calc "https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/report/MonthlyReportCalculator.java"
click node_schema "https://github.com/badiaael/support-desk/blob/main/src/main/resources/db/migration/V1__support_desk_tables.sql"
click node_error_handler "https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/shared/error/GlobalExceptionHandler.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_webapp,node_ticket_list,node_ticket_filters,node_ticket_table,node_ticket_create,node_ticket_detail,node_report_page,node_badges,node_date_format,node_http_api,node_user toneBlue
class node_ticket_api,node_ticket_service,node_ticket_query,node_ticket_store,node_comment_domain,node_comment_store toneAmber
class node_client_api,node_client_service,node_client_store toneMint
class node_report_api,node_report_service,node_report_calc toneRose
class node_database,node_schema,node_error_handler toneIndigo
```

## Components

### Web interface

- [React app routes](https://github.com/badiaael/support-desk/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Ticket list](https://github.com/badiaael/support-desk/blob/main/frontend/src/pages/TicketListPage.jsx): `frontend/src/pages/TicketListPage.jsx`
- [Ticket filters](https://github.com/badiaael/support-desk/blob/main/frontend/src/components/TicketFilters.jsx): `frontend/src/components/TicketFilters.jsx`
- [Ticket table](https://github.com/badiaael/support-desk/blob/main/frontend/src/components/TicketTable.jsx): `frontend/src/components/TicketTable.jsx`
- [Ticket creation](https://github.com/badiaael/support-desk/blob/main/frontend/src/pages/TicketCreatePage.jsx): `frontend/src/pages/TicketCreatePage.jsx`
- [Ticket detail](https://github.com/badiaael/support-desk/blob/main/frontend/src/pages/TicketDetailPage.jsx): `frontend/src/pages/TicketDetailPage.jsx`
- [Report page](https://github.com/badiaael/support-desk/blob/main/frontend/src/pages/ReportPage.jsx): `frontend/src/pages/ReportPage.jsx`
- [Status and priority badges](https://github.com/badiaael/support-desk/blob/main/frontend/src/components/Badge.jsx): `frontend/src/components/Badge.jsx`
- [Date formatting](https://github.com/badiaael/support-desk/blob/main/frontend/src/format.js): `frontend/src/format.js`
- [HTTP API client](https://github.com/badiaael/support-desk/blob/main/frontend/src/api.js): `frontend/src/api.js`

### Ticket management

- [Ticket API](https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/ticket/TicketController.java): `src/main/java/com/example/SupportDesk/ticket/TicketController.java`
- [Ticket rules and workflow](https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/ticket/TicketService.java): `src/main/java/com/example/SupportDesk/ticket/TicketService.java`
- [Ticket filtering](https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/ticket/TicketSpecifications.java): `src/main/java/com/example/SupportDesk/ticket/TicketSpecifications.java`
- [Ticket persistence](https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/ticket/TicketRepository.java): `src/main/java/com/example/SupportDesk/ticket/TicketRepository.java`
- [Ticket comments](https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/ticket/comment/Comment.java): `src/main/java/com/example/SupportDesk/ticket/comment/Comment.java`
- [Comment persistence](https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/ticket/comment/CommentRepository.java): `src/main/java/com/example/SupportDesk/ticket/comment/CommentRepository.java`

### Client management

- [Client API](https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/client/ClientController.java): `src/main/java/com/example/SupportDesk/client/ClientController.java`
- [Client management](https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/client/ClientService.java): `src/main/java/com/example/SupportDesk/client/ClientService.java`
- [Client persistence](https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/client/ClientRepository.java): `src/main/java/com/example/SupportDesk/client/ClientRepository.java`

### Monthly reporting

- [Report API](https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/report/ReportController.java): `src/main/java/com/example/SupportDesk/report/ReportController.java`
- [Report aggregation](https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/report/ReportService.java): `src/main/java/com/example/SupportDesk/report/ReportService.java`
- [Monthly calculations](https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/report/MonthlyReportCalculator.java): `src/main/java/com/example/SupportDesk/report/MonthlyReportCalculator.java`

### Persistence and errors

- **PostgreSQL database**
- [Database schema migration](https://github.com/badiaael/support-desk/blob/main/src/main/resources/db/migration/V1__support_desk_tables.sql): `src/main/resources/db/migration/V1__support_desk_tables.sql`
- [API error handling](https://github.com/badiaael/support-desk/blob/main/src/main/java/com/example/SupportDesk/shared/error/GlobalExceptionHandler.java): `src/main/java/com/example/SupportDesk/shared/error/GlobalExceptionHandler.java`

### Other components

- **Desk user**

## Connections

- Desk user → React app routes: uses (evidence: `frontend/src/App.jsx`)
- React app routes → Ticket list: routes to (evidence: `frontend/src/App.jsx`)
- React app routes → Ticket creation: routes to (evidence: `frontend/src/App.jsx`)
- React app routes → Ticket detail: routes to (evidence: `frontend/src/App.jsx`)
- React app routes → Report page: routes to (evidence: `frontend/src/App.jsx`)
- Ticket list → Ticket filters: renders (evidence: `frontend/src/pages/TicketListPage.jsx`)
- Ticket list → Ticket table: renders (evidence: `frontend/src/pages/TicketListPage.jsx`)
- Ticket list → HTTP API client: loads tickets (evidence: `frontend/src/pages/TicketListPage.jsx`)
- Ticket creation → HTTP API client: creates ticket (evidence: `frontend/src/pages/TicketCreatePage.jsx`)
- Ticket detail → HTTP API client: loads and updates (evidence: `frontend/src/pages/TicketDetailPage.jsx`)
- Report page → HTTP API client: loads report (evidence: `frontend/src/pages/ReportPage.jsx`)
- Ticket table → Status and priority badges: renders (evidence: `frontend/src/components/TicketTable.jsx`)
- Ticket table → Date formatting: formats dates (evidence: `frontend/src/components/TicketTable.jsx`)
- Ticket detail → Status and priority badges: renders (evidence: `frontend/src/pages/TicketDetailPage.jsx`)
- Ticket detail → Date formatting: formats dates (evidence: `frontend/src/pages/TicketDetailPage.jsx`)
- Report page → Status and priority badges: uses labels (evidence: `frontend/src/pages/ReportPage.jsx`)
- HTTP API client → Ticket API: HTTP requests
- HTTP API client → Client API: HTTP requests
- HTTP API client → Report API: HTTP requests
- Ticket API → Ticket rules and workflow: delegates
- Ticket rules and workflow → Ticket filtering: filters tickets
- Ticket rules and workflow → Ticket persistence: persists tickets
- Ticket rules and workflow → Comment persistence: stores comments
- Ticket rules and workflow → Ticket comments: manages comments
- Client API → Client management: delegates
- Client management → Client persistence: reads clients
- Report API → Report aggregation: delegates
- Report aggregation → Monthly calculations: calculates metrics
- Ticket persistence → PostgreSQL database: reads and writes
- Comment persistence → PostgreSQL database: reads and writes
- Client persistence → PostgreSQL database: reads and writes
- Database schema migration → PostgreSQL database: defines schema
