# senudafernando01-tech/it-help-desk-ticket-app architecture

> Architecture diagram of the GitHub repository senudafernando01-tech/it-help-desk-ticket-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/senudafernando01-tech/it-help-desk-ticket-app
- Repository: https://github.com/senudafernando01-tech/it-help-desk-ticket-app

## Overview

TicketApp is a role-aware IT help-desk application for ticketing, asset and user administration, self-service password resets, and help content. Users enter through the routed web app, sign in or open a reset portal, and use workspace pages whose shared context handles API requests and session state; the server handles requests and persistence. Admin and reporting capabilities form distinct branches. The README is empty, and server excerpts are partial, so some backend workflow details are not verified.

Main entry points: [`TicketApp/src/App.tsx`](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/App.tsx) (Route application), [`TicketApp/src/context/DeskContext.tsx`](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/context/DeskContext.tsx) (Desk context), [`TicketApp/src/components/GlobalSearch.tsx`](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/components/GlobalSearch.tsx) (Global search), [`TicketApp/src/pages/TicketsPage.tsx`](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/TicketsPage.tsx) (Ticket management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client application"]
  node_app["Route application<br/>[App.tsx]"]
  node_shell["Workspace shell<br/>[AppShell.tsx]"]
  node_context["Desk context<br/>[DeskContext.tsx]"]
  node_global_search["Global search<br/>[GlobalSearch.tsx]"]
end

subgraph group_desk["Desk operations"]
  node_tickets["Ticket management<br/>[TicketsPage.tsx]"]
  node_dashboard["Dashboard<br/>[DashboardPage.tsx]"]
  node_inventory["Asset inventory<br/>[InventoryPage.tsx]"]
  node_categories["Categories<br/>[CategoriesPage.tsx]"]
  node_users["User administration<br/>[UsersPage.tsx]"]
  node_admin["Admin console"]
  node_control["Control center"]
  node_reports["Reports<br/>[ReportsPage.tsx]"]
  node_notifications["Notifications"]
  node_profile["User profile<br/>[ProfilePage.tsx]"]
  node_sla["SLA calculations<br/>[sla.ts]"]
end

subgraph group_self_service["Self-service and search"]
  node_login["Sign-in portals<br/>[LoginPage.tsx]"]
  node_help["Help center<br/>[HelpCenterPage.tsx]"]
  node_reset["Reset portal"]
  node_search["Search page<br/>[SearchPage.tsx]"]
  node_search_logic["Search utilities<br/>[search.ts]"]
  node_reset_logic["Reset utilities<br/>[resetPortal.ts]"]
end

subgraph group_backend["Server and persistence"]
  node_rbac["Role access rules<br/>[rbac.ts]"]
  node_types["Desk data types<br/>[desk.ts]"]
  node_server["HTTP server<br/>[server.ts]"]
  node_db[("Database access<br/>[db.ts]")]
  node_mailer["Email delivery<br/>[mailer.ts]"]
end

node_user(("User"))
node_smtp["SMTP service"]

node_user -->|"uses"| node_app
node_app -->|"renders"| node_shell
node_app -->|"provides state"| node_context
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_tickets
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_inventory
node_app -->|"routes to"| node_categories
node_app -->|"routes to"| node_users
node_app -->|"routes to"| node_admin
node_app -->|"routes to"| node_control
node_app -->|"routes to"| node_reports
node_app -->|"routes to"| node_notifications
node_app -->|"routes to"| node_profile
node_app -->|"routes to"| node_help
node_app -->|"routes to"| node_reset
node_app -->|"routes to"| node_search
node_shell -->|"renders"| node_global_search
node_tickets -->|"uses state"| node_context
node_inventory -->|"uses state"| node_context
node_admin -->|"uses state"| node_context
node_control -->|"uses state"| node_context
node_help -->|"uses state"| node_context
node_reset -->|"uses state"| node_context
node_search -->|"uses state"| node_context
node_global_search -->|"uses state"| node_context
node_search -->|"normalizes query"| node_search_logic
node_global_search -->|"uses matching"| node_search_logic
node_reset -->|"uses reset rules"| node_reset_logic
node_help -->|"uses guidance"| node_reset_logic
node_reports -->|"calculates SLA"| node_sla
node_tickets -->|"uses SLA"| node_sla
node_reset_logic -->|"checks URL safety"| node_rbac
node_server -->|"reads and writes"| node_db
node_server -->|"calls email"| node_mailer
node_mailer -.->|"sends mail"| node_smtp
node_context -.->|"requests API"| node_server

click node_app "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/App.tsx"
click node_shell "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/components/AppShell.tsx"
click node_context "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/context/DeskContext.tsx"
click node_login "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/LoginPage.tsx"
click node_tickets "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/TicketsPage.tsx"
click node_dashboard "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/DashboardPage.tsx"
click node_inventory "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/InventoryPage.tsx"
click node_categories "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/CategoriesPage.tsx"
click node_users "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/UsersPage.tsx"
click node_admin "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/AdminConsolePage.tsx"
click node_control "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/ControlCenterPage.tsx"
click node_reports "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/ReportsPage.tsx"
click node_notifications "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/NotificationsPage.tsx"
click node_profile "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/ProfilePage.tsx"
click node_help "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/HelpCenterPage.tsx"
click node_reset "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/ResetPortalPage.tsx"
click node_search "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/SearchPage.tsx"
click node_global_search "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/components/GlobalSearch.tsx"
click node_search_logic "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/utils/search.ts"
click node_reset_logic "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/utils/resetPortal.ts"
click node_rbac "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/utils/rbac.ts"
click node_sla "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/utils/sla.ts"
click node_types "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/types/desk.ts"
click node_server "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/server.ts"
click node_db "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/server/db.ts"
click node_mailer "https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/server/mailer.ts"

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_app,node_shell,node_context,node_global_search,node_user toneBlue
class node_tickets,node_dashboard,node_inventory,node_categories,node_users,node_admin,node_control,node_reports,node_notifications,node_profile,node_sla toneAmber
class node_login,node_help,node_reset,node_search,node_search_logic,node_reset_logic toneMint
class node_rbac,node_types,node_server,node_db,node_mailer toneRose
class node_smtp toneIndigo
```

## Components

### Client application

- [Route application](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/App.tsx): `TicketApp/src/App.tsx`
- [Workspace shell](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/components/AppShell.tsx): `TicketApp/src/components/AppShell.tsx`
- [Desk context](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/context/DeskContext.tsx): `TicketApp/src/context/DeskContext.tsx`
- [Global search](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/components/GlobalSearch.tsx): `TicketApp/src/components/GlobalSearch.tsx`

### Desk operations

- [Ticket management](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/TicketsPage.tsx): `TicketApp/src/pages/TicketsPage.tsx`
- [Dashboard](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/DashboardPage.tsx): `TicketApp/src/pages/DashboardPage.tsx`
- [Asset inventory](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/InventoryPage.tsx): `TicketApp/src/pages/InventoryPage.tsx`
- [Categories](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/CategoriesPage.tsx): `TicketApp/src/pages/CategoriesPage.tsx`
- [User administration](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/UsersPage.tsx): `TicketApp/src/pages/UsersPage.tsx`
- [Admin console](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/AdminConsolePage.tsx): `TicketApp/src/pages/AdminConsolePage.tsx`
- [Control center](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/ControlCenterPage.tsx): `TicketApp/src/pages/ControlCenterPage.tsx`
- [Reports](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/ReportsPage.tsx): `TicketApp/src/pages/ReportsPage.tsx`
- [Notifications](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/NotificationsPage.tsx): `TicketApp/src/pages/NotificationsPage.tsx`
- [User profile](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/ProfilePage.tsx): `TicketApp/src/pages/ProfilePage.tsx`
- [SLA calculations](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/utils/sla.ts): `TicketApp/src/utils/sla.ts`

### Self-service and search

- [Sign-in portals](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/LoginPage.tsx): `TicketApp/src/pages/LoginPage.tsx`
- [Help center](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/HelpCenterPage.tsx): `TicketApp/src/pages/HelpCenterPage.tsx`
- [Reset portal](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/ResetPortalPage.tsx): `TicketApp/src/pages/ResetPortalPage.tsx`
- [Search page](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/pages/SearchPage.tsx): `TicketApp/src/pages/SearchPage.tsx`
- [Search utilities](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/utils/search.ts): `TicketApp/src/utils/search.ts`
- [Reset utilities](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/utils/resetPortal.ts): `TicketApp/src/utils/resetPortal.ts`

### Server and persistence

- [Role access rules](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/utils/rbac.ts): `TicketApp/src/utils/rbac.ts`
- [Desk data types](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/src/types/desk.ts): `TicketApp/src/types/desk.ts`
- [HTTP server](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/server.ts): `TicketApp/server.ts`
- [Database access](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/server/db.ts): `TicketApp/server/db.ts`
- [Email delivery](https://github.com/senudafernando01-tech/it-help-desk-ticket-app/blob/main/TicketApp/server/mailer.ts): `TicketApp/server/mailer.ts`

### Other components

- **User**
- **SMTP service**

## Connections

- User → Route application: uses (evidence: `TicketApp/src/App.tsx`)
- Route application → Workspace shell: renders (evidence: `TicketApp/src/App.tsx`)
- Route application → Desk context: provides state (evidence: `TicketApp/src/App.tsx`)
- Route application → Sign-in portals: routes to (evidence: `TicketApp/src/App.tsx`)
- Route application → Ticket management: routes to (evidence: `TicketApp/src/App.tsx`)
- Route application → Dashboard: routes to (evidence: `TicketApp/src/App.tsx`)
- Route application → Asset inventory: routes to (evidence: `TicketApp/src/App.tsx`)
- Route application → Categories: routes to (evidence: `TicketApp/src/App.tsx`)
- Route application → User administration: routes to (evidence: `TicketApp/src/App.tsx`)
- Route application → Admin console: routes to (evidence: `TicketApp/src/App.tsx`)
- Route application → Control center: routes to (evidence: `TicketApp/src/App.tsx`)
- Route application → Reports: routes to (evidence: `TicketApp/src/App.tsx`)
- Route application → Notifications: routes to (evidence: `TicketApp/src/App.tsx`)
- Route application → User profile: routes to (evidence: `TicketApp/src/App.tsx`)
- Route application → Help center: routes to (evidence: `TicketApp/src/App.tsx`)
- Route application → Reset portal: routes to (evidence: `TicketApp/src/App.tsx`)
- Route application → Search page: routes to (evidence: `TicketApp/src/App.tsx`)
- Workspace shell → Global search: renders (evidence: `TicketApp/src/components/AppShell.tsx`)
- Ticket management → Desk context: uses state (evidence: `TicketApp/src/pages/TicketsPage.tsx`)
- Asset inventory → Desk context: uses state (evidence: `TicketApp/src/pages/InventoryPage.tsx`)
- Admin console → Desk context: uses state (evidence: `TicketApp/src/pages/AdminConsolePage.tsx`)
- Control center → Desk context: uses state (evidence: `TicketApp/src/pages/ControlCenterPage.tsx`)
- Help center → Desk context: uses state (evidence: `TicketApp/src/pages/HelpCenterPage.tsx`)
- Reset portal → Desk context: uses state (evidence: `TicketApp/src/pages/ResetPortalPage.tsx`)
- Search page → Desk context: uses state (evidence: `TicketApp/src/pages/SearchPage.tsx`)
- Global search → Desk context: uses state (evidence: `TicketApp/src/components/GlobalSearch.tsx`)
- Search page → Search utilities: normalizes query (evidence: `TicketApp/src/pages/SearchPage.tsx`)
- Global search → Search utilities: uses matching (evidence: `TicketApp/src/components/GlobalSearch.tsx`)
- Reset portal → Reset utilities: uses reset rules (evidence: `TicketApp/src/pages/ResetPortalPage.tsx`)
- Help center → Reset utilities: uses guidance (evidence: `TicketApp/src/pages/HelpCenterPage.tsx`)
- Reports → SLA calculations: calculates SLA (evidence: `TicketApp/src/pages/ReportsPage.tsx`)
- Ticket management → SLA calculations: uses SLA (evidence: `TicketApp/src/pages/TicketsPage.tsx`)
- Reset utilities → Role access rules: checks URL safety (evidence: `TicketApp/src/utils/resetPortal.ts`)
- HTTP server → Database access: reads and writes (evidence: `TicketApp/server.ts`)
- HTTP server → Email delivery: calls email (evidence: `TicketApp/server.ts`)
- Email delivery → SMTP service: sends mail (evidence: `TicketApp/server/mailer.ts`)
- Desk context → HTTP server: requests API
