# maithehao/iuh-fall2026-ptud architecture

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

- Interactive diagram: https://gitdiagram.com/maithehao/iuh-fall2026-ptud
- Repository: https://github.com/maithehao/iuh-fall2026-ptud

## Overview

This is a Java Swing shop-management application backed by SQL Server. Staff sign in, then use registered pages for customer/vehicle intake, service and parts administration, repair scheduling and diagnosis, invoicing, inventory purchasing, complaints, reporting, and staff/shop operations. Pages invoke domain services, which mediate business validation and DAO persistence. The tree and README establish the product context, while excerpts and the source index only support selected wiring; unsampled domain links are therefore omitted rather than inferred.

Main entry points: [`src/iuh/fit/gui/page`](https://github.com/maithehao/iuh-fall2026-ptud/tree/master/src/iuh/fit/gui/page) (Operation pages), [`src/iuh/fit/gui/GUI.java`](https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/gui/GUI.java) (Window shell), [`src/iuh/fit/gui/layout/LayoutHeader.java`](https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/gui/layout/LayoutHeader.java) (Navigation layout), [`src/iuh/fit/service/AuthService.java`](https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/service/AuthService.java) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_gui["Window shell<br/>[GUI.java]"]
  node_layout["Navigation layout<br/>[LayoutHeader.java]"]
  node_pages["Operation pages"]
  node_management["Management controls"]
  node_authpage["Sign-in page<br/>[LoginPage.java]"]
end

subgraph group_domain["Shop operations"]
  node_auth["Authentication<br/>[AuthService.java]"]
  node_staffsvc["Staff management"]
  node_customers["Customer management"]
  node_vehicles["Vehicle management<br/>[XeService.java]"]
  node_services["Service catalog<br/>[DichVuService.java]"]
  node_parts["Parts management"]
  node_vouchers["Voucher management"]
  node_workflow["Repair and shop workflows"]
  node_reports["Reports and schedules"]
end

subgraph group_data["Persistence"]
  node_staffdao["Staff records<br/>[NhanVienDAO.java]"]
  node_customerdao["Customer records<br/>[KhachHangDAO.java]"]
  node_otherdao["Domain records"]
end

subgraph group_runtime["Application runtime"]
  node_main["Application startup<br/>[Main.java]"]
  node_dbconfig["Connection configuration"]
  node_context["Session context<br/>[AppContext.java]"]
  node_i18n["Localization"]
  node_pagination["Pagination result"]
  node_models["Shop entities"]
end

node_staff(("Shop staff"))
node_database[("SQL Server")]

node_staff -->|"signs in"| node_authpage
node_main -->|"starts"| node_gui
node_main -->|"applies theme"| node_gui
node_gui -->|"opens"| node_authpage
node_gui -->|"uses session"| node_context
node_gui -->|"creates"| node_layout
node_layout -->|"routes pages"| node_pages
node_layout -->|"reads session"| node_context
node_layout -->|"localizes menu"| node_i18n
node_authpage -->|"authenticates"| node_auth
node_auth -->|"queries staff"| node_staffdao
node_auth -->|"sets session"| node_context
node_auth -->|"persists registration"| node_staffdao
node_management -->|"loads labels"| node_i18n
node_staffsvc -->|"reads and writes"| node_staffdao
node_customers -->|"reads and writes"| node_customerdao
node_vehicles -->|"uses vehicle DAO"| node_otherdao
node_services -->|"uses service DAO"| node_otherdao
node_parts -->|"uses parts DAO"| node_otherdao
node_vouchers -->|"uses voucher DAO"| node_otherdao
node_staffdao -->|"opens connection"| node_dbconfig
node_customerdao -->|"opens connection"| node_dbconfig
node_dbconfig -->|"connects"| node_database
node_staffsvc -->|"returns pages"| node_pagination
node_vouchers -->|"returns pages"| node_pagination
node_staffsvc -->|"manages staff entity"| node_models
node_vouchers -->|"manages voucher entity"| node_models
node_pages -->|"manages staff"| node_staffsvc
node_pages -->|"manages vouchers"| node_vouchers
node_pages -->|"uses controls"| node_management
node_pages -->|"loads translations"| node_i18n
node_workflow -.->|"supports operations"| node_reports

click node_main "https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/Main.java"
click node_gui "https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/gui/GUI.java"
click node_layout "https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/gui/layout/LayoutHeader.java"
click node_pages "https://github.com/maithehao/iuh-fall2026-ptud/tree/master/src/iuh/fit/gui/page"
click node_management "https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/gui/component/ManagementPanel.java"
click node_authpage "https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/gui/page/LoginPage.java"
click node_auth "https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/service/AuthService.java"
click node_staffsvc "https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/service/NhanVienService.java"
click node_customers "https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/service/KhachHangService.java"
click node_vehicles "https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/service/XeService.java"
click node_services "https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/service/DichVuService.java"
click node_parts "https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/service/PhuTungService.java"
click node_vouchers "https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/service/VoucherService.java"
click node_workflow "https://github.com/maithehao/iuh-fall2026-ptud/tree/master/src/iuh/fit/gui/page"
click node_reports "https://github.com/maithehao/iuh-fall2026-ptud/tree/master/src/iuh/fit/gui/page"
click node_staffdao "https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/dao/NhanVienDAO.java"
click node_customerdao "https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/dao/KhachHangDAO.java"
click node_otherdao "https://github.com/maithehao/iuh-fall2026-ptud/tree/master/src/iuh/fit/dao"
click node_dbconfig "https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/core/config/DatabaseConfig.java"
click node_context "https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/core/context/AppContext.java"
click node_i18n "https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/util/I18nReaderUtil.java"
click node_pagination "https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/dto/PaginatedResult.java"
click node_models "https://github.com/maithehao/iuh-fall2026-ptud/tree/master/src/iuh/fit/entity"

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_gui,node_layout,node_pages,node_management,node_authpage toneBlue
class node_auth,node_staffsvc,node_customers,node_vehicles,node_services,node_parts,node_vouchers,node_workflow,node_reports,node_database toneAmber
class node_staffdao,node_customerdao,node_otherdao toneMint
class node_main,node_dbconfig,node_context,node_i18n,node_pagination,node_models toneRose
class node_staff toneIndigo
```

## Components

### Desktop interface

- [Window shell](https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/gui/GUI.java): `src/iuh/fit/gui/GUI.java`
- [Navigation layout](https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/gui/layout/LayoutHeader.java): `src/iuh/fit/gui/layout/LayoutHeader.java`
- [Operation pages](https://github.com/maithehao/iuh-fall2026-ptud/tree/master/src/iuh/fit/gui/page): `src/iuh/fit/gui/page`
- [Management controls](https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/gui/component/ManagementPanel.java): `src/iuh/fit/gui/component/ManagementPanel.java`
- [Sign-in page](https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/gui/page/LoginPage.java): `src/iuh/fit/gui/page/LoginPage.java`

### Shop operations

- [Authentication](https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/service/AuthService.java): `src/iuh/fit/service/AuthService.java`
- [Staff management](https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/service/NhanVienService.java): `src/iuh/fit/service/NhanVienService.java`
- [Customer management](https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/service/KhachHangService.java): `src/iuh/fit/service/KhachHangService.java`
- [Vehicle management](https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/service/XeService.java): `src/iuh/fit/service/XeService.java`
- [Service catalog](https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/service/DichVuService.java): `src/iuh/fit/service/DichVuService.java`
- [Parts management](https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/service/PhuTungService.java): `src/iuh/fit/service/PhuTungService.java`
- [Voucher management](https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/service/VoucherService.java): `src/iuh/fit/service/VoucherService.java`
- [Repair and shop workflows](https://github.com/maithehao/iuh-fall2026-ptud/tree/master/src/iuh/fit/gui/page): `src/iuh/fit/gui/page`
- [Reports and schedules](https://github.com/maithehao/iuh-fall2026-ptud/tree/master/src/iuh/fit/gui/page): `src/iuh/fit/gui/page`

### Persistence

- [Staff records](https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/dao/NhanVienDAO.java): `src/iuh/fit/dao/NhanVienDAO.java`
- [Customer records](https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/dao/KhachHangDAO.java): `src/iuh/fit/dao/KhachHangDAO.java`
- [Domain records](https://github.com/maithehao/iuh-fall2026-ptud/tree/master/src/iuh/fit/dao): `src/iuh/fit/dao`

### Application runtime

- [Application startup](https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/Main.java): `src/iuh/fit/Main.java`
- [Connection configuration](https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/core/config/DatabaseConfig.java): `src/iuh/fit/core/config/DatabaseConfig.java`
- [Session context](https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/core/context/AppContext.java): `src/iuh/fit/core/context/AppContext.java`
- [Localization](https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/util/I18nReaderUtil.java): `src/iuh/fit/util/I18nReaderUtil.java`
- [Pagination result](https://github.com/maithehao/iuh-fall2026-ptud/blob/master/src/iuh/fit/dto/PaginatedResult.java): `src/iuh/fit/dto/PaginatedResult.java`
- [Shop entities](https://github.com/maithehao/iuh-fall2026-ptud/tree/master/src/iuh/fit/entity): `src/iuh/fit/entity`

### Other components

- **Shop staff**
- **SQL Server**

## Connections

- Shop staff → Sign-in page: signs in
- Application startup → Window shell: starts (evidence: `src/iuh/fit/Main.java`)
- Application startup → Window shell: applies theme (evidence: `src/iuh/fit/Main.java`)
- Window shell → Sign-in page: opens (evidence: `src/iuh/fit/gui/GUI.java`)
- Window shell → Session context: uses session (evidence: `src/iuh/fit/gui/GUI.java`)
- Window shell → Navigation layout: creates (evidence: `src/iuh/fit/gui/GUI.java`)
- Navigation layout → Operation pages: routes pages (evidence: `src/iuh/fit/gui/layout/LayoutHeader.java`)
- Navigation layout → Session context: reads session (evidence: `src/iuh/fit/gui/layout/LayoutHeader.java`)
- Navigation layout → Localization: localizes menu (evidence: `src/iuh/fit/gui/layout/LayoutHeader.java`)
- Sign-in page → Authentication: authenticates (evidence: `src/iuh/fit/service/AuthService.java`)
- Authentication → Staff records: queries staff (evidence: `src/iuh/fit/service/AuthService.java`)
- Authentication → Session context: sets session (evidence: `src/iuh/fit/service/AuthService.java`)
- Authentication → Staff records: persists registration (evidence: `src/iuh/fit/service/AuthService.java`)
- Management controls → Localization: loads labels (evidence: `src/iuh/fit/gui/component/ManagementPanel.java`)
- Staff management → Staff records: reads and writes (evidence: `src/iuh/fit/service/NhanVienService.java`)
- Customer management → Customer records: reads and writes (evidence: `src/iuh/fit/service/KhachHangService.java`)
- Vehicle management → Domain records: uses vehicle DAO (evidence: `src/iuh/fit/service/XeService.java`)
- Service catalog → Domain records: uses service DAO (evidence: `src/iuh/fit/service/DichVuService.java`)
- Parts management → Domain records: uses parts DAO (evidence: `src/iuh/fit/service/PhuTungService.java`)
- Voucher management → Domain records: uses voucher DAO (evidence: `src/iuh/fit/service/VoucherService.java`)
- Staff records → Connection configuration: opens connection (evidence: `src/iuh/fit/dao/NhanVienDAO.java`)
- Customer records → Connection configuration: opens connection (evidence: `src/iuh/fit/dao/KhachHangDAO.java`)
- Connection configuration → SQL Server: connects (evidence: `src/iuh/fit/core/config/DatabaseConfig.java`)
- Staff management → Pagination result: returns pages (evidence: `src/iuh/fit/service/NhanVienService.java`)
- Voucher management → Pagination result: returns pages (evidence: `src/iuh/fit/service/VoucherService.java`)
- Staff management → Shop entities: manages staff entity (evidence: `src/iuh/fit/service/NhanVienService.java`)
- Voucher management → Shop entities: manages voucher entity (evidence: `src/iuh/fit/service/VoucherService.java`)
- Operation pages → Staff management: manages staff (evidence: `src/iuh/fit/gui/page/NhanVienPage.java`)
- Operation pages → Voucher management: manages vouchers (evidence: `src/iuh/fit/gui/page/VoucherPage.java`)
- Operation pages → Management controls: uses controls (evidence: `src/iuh/fit/gui/page/NhanVienPage.java`)
- Operation pages → Localization: loads translations (evidence: `src/iuh/fit/gui/page/VoucherPage.java`)
- Repair and shop workflows → Reports and schedules: supports operations
