# hansx64/ticketingdashboard architecture

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

- Interactive diagram: https://gitdiagram.com/hansx64/ticketingdashboard
- Repository: https://github.com/hansx64/ticketingdashboard

## Overview

This Windows desktop helpdesk app lets Front Office staff register ICT concerns, generate the official form, maintain ticket statuses and records, review dashboard and date-filtered reports, and manage settings and backups. The principal workflow runs from the desktop shell to ticket entry, ticket persistence, and form generation; staff later update and preview tickets in Records. Database-backed dashboard, Excel/PDF reporting, configurable reference lists, and backup/restore are separate capabilities. Edges use shown calls or README statements; unsampled implementation details are omitted.

Main entry points: [`main.py`](https://github.com/hansx64/ticketingdashboard/blob/main/main.py) (Application Shell), [`database.py`](https://github.com/hansx64/ticketingdashboard/blob/main/database.py) (Ticket Database), [`services/document_service.py`](https://github.com/hansx64/ticketingdashboard/blob/main/services/document_service.py) (Form Generation), [`modules/reports.py`](https://github.com/hansx64/ticketingdashboard/blob/main/modules/reports.py) (Reports)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop UI"]
  node_shell["Application Shell<br/>[main.py]"]
  node_entry["Ticket Entry<br/>[ticket_entry.py]"]
  node_records["Ticket Records<br/>[ticket_records.py]"]
  node_dashboard["Dashboard<br/>[dashboard.py]"]
  node_reports["Reports<br/>[reports.py]"]
  node_settings["Settings<br/>[settings.py]"]
end

subgraph group_tickets["Ticket Workflow"]
  node_ticket_service["Ticket Service<br/>[ticket_service.py]"]
end

subgraph group_data["Data and Documents"]
  node_database[("Ticket Database<br/>[database.py]")]
  node_storage["Storage Paths<br/>[storage.py]"]
  node_document["Form Generation"]
end

subgraph group_operations["Oversight and Admin"]
  node_backup["Backup Service<br/>[backup_service.py]"]
end

node_staff(("Front Office Staff"))
node_word["Microsoft Word"]
node_libreoffice["LibreOffice"]
node_excel["Excel Export"]

node_staff -->|"uses"| node_shell
node_shell -->|"initializes"| node_database
node_shell -->|"hosts"| node_entry
node_shell -->|"hosts"| node_records
node_shell -->|"hosts"| node_dashboard
node_shell -->|"hosts"| node_reports
node_shell -->|"hosts"| node_settings
node_entry -->|"creates ticket"| node_ticket_service
node_entry -->|"generates form"| node_document
node_ticket_service -->|"writes tickets"| node_database
node_records -->|"updates tickets"| node_ticket_service
node_records -->|"previews form"| node_document
node_document -->|"gets paths"| node_storage
node_database -->|"gets paths"| node_storage
node_dashboard -->|"queries metrics"| node_database
node_reports -->|"queries tickets"| node_database
node_reports -->|"exports workbook"| node_excel
node_reports -->|"exports PDF"| node_word
node_document -.->|"converts PDF"| node_word
node_document -.->|"converts PDF"| node_libreoffice
node_settings -->|"manages backups"| node_backup
node_backup -->|"backs up database"| node_database
node_settings -.->|"manages settings"| node_database

click node_shell "https://github.com/hansx64/ticketingdashboard/blob/main/main.py"
click node_entry "https://github.com/hansx64/ticketingdashboard/blob/main/modules/ticket_entry.py"
click node_records "https://github.com/hansx64/ticketingdashboard/blob/main/modules/ticket_records.py"
click node_dashboard "https://github.com/hansx64/ticketingdashboard/blob/main/modules/dashboard.py"
click node_reports "https://github.com/hansx64/ticketingdashboard/blob/main/modules/reports.py"
click node_settings "https://github.com/hansx64/ticketingdashboard/blob/main/modules/settings.py"
click node_ticket_service "https://github.com/hansx64/ticketingdashboard/blob/main/services/ticket_service.py"
click node_database "https://github.com/hansx64/ticketingdashboard/blob/main/database.py"
click node_storage "https://github.com/hansx64/ticketingdashboard/blob/main/services/storage.py"
click node_document "https://github.com/hansx64/ticketingdashboard/blob/main/services/document_service.py"
click node_backup "https://github.com/hansx64/ticketingdashboard/blob/main/services/backup_service.py"

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_shell,node_entry,node_records,node_dashboard,node_reports,node_settings toneBlue
class node_ticket_service toneAmber
class node_database,node_storage,node_document toneMint
class node_backup toneRose
class node_staff,node_word,node_libreoffice,node_excel toneIndigo
```

## Components

### Desktop UI

- [Application Shell](https://github.com/hansx64/ticketingdashboard/blob/main/main.py): `main.py`
- [Ticket Entry](https://github.com/hansx64/ticketingdashboard/blob/main/modules/ticket_entry.py): `modules/ticket_entry.py`
- [Ticket Records](https://github.com/hansx64/ticketingdashboard/blob/main/modules/ticket_records.py): `modules/ticket_records.py`
- [Dashboard](https://github.com/hansx64/ticketingdashboard/blob/main/modules/dashboard.py): `modules/dashboard.py`
- [Reports](https://github.com/hansx64/ticketingdashboard/blob/main/modules/reports.py): `modules/reports.py`
- [Settings](https://github.com/hansx64/ticketingdashboard/blob/main/modules/settings.py): `modules/settings.py`

### Ticket Workflow

- [Ticket Service](https://github.com/hansx64/ticketingdashboard/blob/main/services/ticket_service.py): `services/ticket_service.py`

### Data and Documents

- [Ticket Database](https://github.com/hansx64/ticketingdashboard/blob/main/database.py): `database.py`
- [Storage Paths](https://github.com/hansx64/ticketingdashboard/blob/main/services/storage.py): `services/storage.py`
- [Form Generation](https://github.com/hansx64/ticketingdashboard/blob/main/services/document_service.py): `services/document_service.py`

### Oversight and Admin

- [Backup Service](https://github.com/hansx64/ticketingdashboard/blob/main/services/backup_service.py): `services/backup_service.py`

### Other components

- **Front Office Staff**
- **Microsoft Word**
- **LibreOffice**
- **Excel Export**

## Connections

- Front Office Staff → Application Shell: uses (evidence: `README.md`)
- Application Shell → Ticket Database: initializes (evidence: `main.py`)
- Application Shell → Ticket Entry: hosts (evidence: `main.py`)
- Application Shell → Ticket Records: hosts (evidence: `main.py`)
- Application Shell → Dashboard: hosts (evidence: `main.py`)
- Application Shell → Reports: hosts (evidence: `main.py`)
- Application Shell → Settings: hosts (evidence: `main.py`)
- Ticket Entry → Ticket Service: creates ticket (evidence: `modules/ticket_entry.py`)
- Ticket Entry → Form Generation: generates form (evidence: `modules/ticket_entry.py`)
- Ticket Service → Ticket Database: writes tickets (evidence: `services/ticket_service.py`)
- Ticket Records → Ticket Service: updates tickets (evidence: `modules/ticket_records.py`)
- Ticket Records → Form Generation: previews form (evidence: `modules/ticket_records.py`)
- Form Generation → Storage Paths: gets paths (evidence: `services/document_service.py`)
- Ticket Database → Storage Paths: gets paths (evidence: `database.py`)
- Dashboard → Ticket Database: queries metrics (evidence: `modules/dashboard.py`)
- Reports → Ticket Database: queries tickets (evidence: `modules/reports.py`)
- Reports → Excel Export: exports workbook (evidence: `modules/reports.py`)
- Reports → Microsoft Word: exports PDF (evidence: `modules/reports.py`)
- Form Generation → Microsoft Word: converts PDF (evidence: `README.md`)
- Form Generation → LibreOffice: converts PDF (evidence: `README.md`)
- Settings → Backup Service: manages backups (evidence: `modules/settings.py`)
- Backup Service → Ticket Database: backs up database (evidence: `services/backup_service.py`)
- Settings → Ticket Database: manages settings
