# strategic-information-department-cidrz/yathu-help-desk-api architecture

> Architecture diagram of the GitHub repository strategic-information-department-cidrz/yathu-help-desk-api, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/strategic-information-department-cidrz/yathu-help-desk-api
- Repository: https://github.com/strategic-information-department-cidrz/yathu-help-desk-api

## Overview

Yathu Help Desk API lets platform users report and track issues while scoped support staff manage ticket ownership, escalation, and resolution; decision-makers use aggregated support analytics. The principal flow is an authenticated request through an API controller into an application service, which coordinates persistence and optional integrations. Separate branches cover identity and account administration, geographic locations, notifications, attachments, and analytics. The graph reflects the README and tree; where service implementations were not sampled, links show only clearly indicated responsibilities, not detailed internal call sequences.

Main entry points: [`yathu-help-desk-api.Infrastructure/Services/AuthService.cs`](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Services/AuthService.cs) (Authentication), [`yathu-help-desk-api.Infrastructure/Services/TicketService.cs`](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Services/TicketService.cs) (Ticket Workflow), [`yathu-help-desk-api.Infrastructure/Persistence/AppDbContext.cs`](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Persistence/AppDbContext.cs) (SQL Server), [`yathu-help-desk-api.Api/Controllers/TicketsController.cs`](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Api/Controllers/TicketsController.cs) (Tickets API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_tickets_api["Tickets API"]
  node_auth_api["Auth API<br/>[AuthController.cs]"]
  node_users_api["Users API<br/>[UsersController.cs]"]
  node_analytics_api["Analytics API"]
  node_locations_api["Locations API"]
  node_notifications_api["Notifications API"]
end

subgraph group_services["Application Services"]
  node_ticket_service["Ticket Workflow<br/>[TicketService.cs]"]
  node_auth_service["Authentication<br/>[AuthService.cs]"]
  node_user_service["Account Management<br/>[UserService.cs]"]
  node_analytics_service["Analytics"]
  node_location_service["Geographic Data<br/>[LocationService.cs]"]
  node_notification_service["Notifications"]
  node_auto_close["Auto-close Worker"]
end

subgraph group_data["Persistence"]
  node_ticket_repo["Ticket Repository"]
  node_user_repo["User Repository<br/>[UserRepository.cs]"]
  node_location_repo["Location Repository"]
  node_notification_repo["Notification Repository"]
  node_database[("SQL Server<br/>[AppDbContext.cs]")]
end

subgraph group_integrations["External Integrations"]
  node_token_service["JWT Tokens<br/>[TokenService.cs]"]
  node_email_sender["SMTP Email<br/>[SmtpEmailSender.cs]"]
  node_file_storage["Attachment Storage"]
  node_backblaze["Backblaze B2"]
end

node_reporter(("Reporter"))
node_support(("Support Staff"))
node_decision(("Decision-makers"))

node_reporter -->|"registers / signs in"| node_auth_api
node_reporter -->|"reports / tracks"| node_tickets_api
node_support -->|"works tickets"| node_tickets_api
node_decision -->|"requests metrics"| node_analytics_api
node_tickets_api -->|"invokes"| node_ticket_service
node_auth_api -->|"invokes"| node_auth_service
node_users_api -->|"invokes"| node_user_service
node_analytics_api -->|"invokes"| node_analytics_service
node_locations_api -->|"invokes"| node_location_service
node_notifications_api -->|"invokes"| node_notification_service
node_ticket_service -->|"reads / writes"| node_ticket_repo
node_ticket_service -->|"triggers events"| node_notification_service
node_ticket_service -.->|"stores / reads files"| node_file_storage
node_auth_service -->|"checks / updates users"| node_user_repo
node_auth_service -->|"validates geography"| node_location_repo
node_auth_service -->|"issues token"| node_token_service
node_auth_service -->|"sends reset code"| node_email_sender
node_user_service -->|"manages accounts"| node_user_repo
node_analytics_service -->|"aggregates tickets"| node_ticket_repo
node_location_service -->|"reads locations"| node_location_repo
node_notification_service -->|"reads / writes"| node_notification_repo
node_auto_close -->|"closes stale tickets"| node_ticket_service
node_ticket_repo -->|"persists ticket data"| node_database
node_user_repo -->|"persists account data"| node_database
node_location_repo -->|"reads location data"| node_database
node_notification_repo -->|"persists notifications"| node_database
node_file_storage -.->|"stores objects"| node_backblaze

click node_tickets_api "https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Api/Controllers/TicketsController.cs"
click node_auth_api "https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Api/Controllers/AuthController.cs"
click node_users_api "https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Api/Controllers/UsersController.cs"
click node_analytics_api "https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Api/Controllers/AnalyticsController.cs"
click node_locations_api "https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Api/Controllers/LocationsController.cs"
click node_notifications_api "https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Api/Controllers/NotificationsController.cs"
click node_ticket_service "https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Services/TicketService.cs"
click node_auth_service "https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Services/AuthService.cs"
click node_user_service "https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Services/UserService.cs"
click node_analytics_service "https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Services/AnalyticsService.cs"
click node_location_service "https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Services/LocationService.cs"
click node_notification_service "https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Services/NotificationService.cs"
click node_auto_close "https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Services/AutoCloseHostedService.cs"
click node_ticket_repo "https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Repositories/TicketRepository.cs"
click node_user_repo "https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Repositories/UserRepository.cs"
click node_location_repo "https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Repositories/LocationRepository.cs"
click node_notification_repo "https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Repositories/NotificationRepository.cs"
click node_database "https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Persistence/AppDbContext.cs"
click node_token_service "https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Services/TokenService.cs"
click node_email_sender "https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Services/SmtpEmailSender.cs"
click node_file_storage "https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Services/BackblazeStorageService.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_tickets_api,node_auth_api,node_users_api,node_analytics_api,node_locations_api,node_notifications_api toneBlue
class node_ticket_service,node_auth_service,node_user_service,node_analytics_service,node_location_service,node_notification_service,node_auto_close toneAmber
class node_ticket_repo,node_user_repo,node_location_repo,node_notification_repo,node_database toneMint
class node_token_service,node_email_sender,node_file_storage,node_backblaze toneRose
class node_reporter,node_support,node_decision toneIndigo
```

## Components

### HTTP API

- [Tickets API](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Api/Controllers/TicketsController.cs): `yathu-help-desk-api.Api/Controllers/TicketsController.cs`
- [Auth API](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Api/Controllers/AuthController.cs): `yathu-help-desk-api.Api/Controllers/AuthController.cs`
- [Users API](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Api/Controllers/UsersController.cs): `yathu-help-desk-api.Api/Controllers/UsersController.cs`
- [Analytics API](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Api/Controllers/AnalyticsController.cs): `yathu-help-desk-api.Api/Controllers/AnalyticsController.cs`
- [Locations API](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Api/Controllers/LocationsController.cs): `yathu-help-desk-api.Api/Controllers/LocationsController.cs`
- [Notifications API](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Api/Controllers/NotificationsController.cs): `yathu-help-desk-api.Api/Controllers/NotificationsController.cs`

### Application Services

- [Ticket Workflow](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Services/TicketService.cs): `yathu-help-desk-api.Infrastructure/Services/TicketService.cs`
- [Authentication](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Services/AuthService.cs): `yathu-help-desk-api.Infrastructure/Services/AuthService.cs`
- [Account Management](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Services/UserService.cs): `yathu-help-desk-api.Infrastructure/Services/UserService.cs`
- [Analytics](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Services/AnalyticsService.cs): `yathu-help-desk-api.Infrastructure/Services/AnalyticsService.cs`
- [Geographic Data](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Services/LocationService.cs): `yathu-help-desk-api.Infrastructure/Services/LocationService.cs`
- [Notifications](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Services/NotificationService.cs): `yathu-help-desk-api.Infrastructure/Services/NotificationService.cs`
- [Auto-close Worker](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Services/AutoCloseHostedService.cs): `yathu-help-desk-api.Infrastructure/Services/AutoCloseHostedService.cs`

### Persistence

- [Ticket Repository](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Repositories/TicketRepository.cs): `yathu-help-desk-api.Infrastructure/Repositories/TicketRepository.cs`
- [User Repository](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Repositories/UserRepository.cs): `yathu-help-desk-api.Infrastructure/Repositories/UserRepository.cs`
- [Location Repository](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Repositories/LocationRepository.cs): `yathu-help-desk-api.Infrastructure/Repositories/LocationRepository.cs`
- [Notification Repository](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Repositories/NotificationRepository.cs): `yathu-help-desk-api.Infrastructure/Repositories/NotificationRepository.cs`
- [SQL Server](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Persistence/AppDbContext.cs): `yathu-help-desk-api.Infrastructure/Persistence/AppDbContext.cs`

### External Integrations

- [JWT Tokens](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Services/TokenService.cs): `yathu-help-desk-api.Infrastructure/Services/TokenService.cs`
- [SMTP Email](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Services/SmtpEmailSender.cs): `yathu-help-desk-api.Infrastructure/Services/SmtpEmailSender.cs`
- [Attachment Storage](https://github.com/strategic-information-department-cidrz/yathu-help-desk-api/blob/main/yathu-help-desk-api.Infrastructure/Services/BackblazeStorageService.cs): `yathu-help-desk-api.Infrastructure/Services/BackblazeStorageService.cs`
- **Backblaze B2**

### Other components

- **Reporter**
- **Support Staff**
- **Decision-makers**

## Connections

- Reporter → Auth API: registers / signs in
- Reporter → Tickets API: reports / tracks
- Support Staff → Tickets API: works tickets
- Decision-makers → Analytics API: requests metrics
- Tickets API → Ticket Workflow: invokes
- Auth API → Authentication: invokes
- Users API → Account Management: invokes
- Analytics API → Analytics: invokes
- Locations API → Geographic Data: invokes
- Notifications API → Notifications: invokes
- Ticket Workflow → Ticket Repository: reads / writes
- Ticket Workflow → Notifications: triggers events
- Ticket Workflow → Attachment Storage: stores / reads files
- Authentication → User Repository: checks / updates users
- Authentication → Location Repository: validates geography
- Authentication → JWT Tokens: issues token
- Authentication → SMTP Email: sends reset code
- Account Management → User Repository: manages accounts
- Analytics → Ticket Repository: aggregates tickets
- Geographic Data → Location Repository: reads locations
- Notifications → Notification Repository: reads / writes
- Auto-close Worker → Ticket Workflow: closes stale tickets
- Ticket Repository → SQL Server: persists ticket data
- User Repository → SQL Server: persists account data
- Location Repository → SQL Server: reads location data
- Notification Repository → SQL Server: persists notifications
- Attachment Storage → Backblaze B2: stores objects
