# purnatejeshwarareddyb/infradesk architecture

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

- Interactive diagram: https://gitdiagram.com/purnatejeshwarareddyb/infradesk
- Repository: https://github.com/purnatejeshwarareddyb/infradesk

## Overview

InfraDesk is a local-first IT asset and support-ticket application for administrators and workers. Users sign in, manage or report tickets, collaborate through assignments and comments, and follow resolution; administrators also manage assets and users and review reports and activity. The React client routes role-specific pages through a shared API client to the FastAPI service, which applies business rules and stores application state in SQLite. The tree supplied does not include the separately documented DevOps tooling. Some API-to-service wiring is unsampled, so those links are omitted.

Main entry points: [`frontend/src/App.tsx`](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/frontend/src/App.tsx) (Application routes), [`backend/app/main.py`](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/main.py) (FastAPI entry), [`backend/app/services/ticket_service.py`](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/services/ticket_service.py) (Ticket rules), [`backend/app/services/auth_service.py`](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/services/auth_service.py) (Credential checks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Application routes<br/>[App.tsx]"]
  node_login["Sign-in<br/>[Login.tsx]"]
  node_ticket_pages["Ticket workspace<br/>[TicketList.tsx]"]
  node_ticket_detail["Ticket collaboration<br/>[TicketDetail.tsx]"]
  node_admin_pages["Admin tools<br/>[Users.tsx]"]
  node_api_client["HTTP client<br/>[client.ts]"]
  node_api_endpoints["API operations<br/>[endpoints.ts]"]
  node_auth_state["Session state<br/>[AuthProvider.tsx]"]
end

subgraph group_api["API boundary"]
  node_api_entry["FastAPI entry<br/>[main.py]"]
  node_api_routes["Versioned API routes<br/>[router.py]"]
  node_auth_route["Authentication route<br/>[auth.py]"]
  node_errors["API error handling<br/>[exceptions.py]"]
  node_health["Health endpoint<br/>[health.py]"]
end

subgraph group_domain["Support workflows"]
  node_ticket_service["Ticket rules<br/>[ticket_service.py]"]
  node_asset_service["Asset management<br/>[asset_service.py]"]
  node_user_service["User management<br/>[user_service.py]"]
  node_report_service["Reporting<br/>[report_service.py]"]
  node_audit_service["Audit history<br/>[audit_service.py]"]
  node_notification_service["Notifications"]
  node_auth_service["Credential checks<br/>[auth_service.py]"]
end

subgraph group_data["Domain data"]
  node_models["Domain records<br/>[ticket.py]"]
  node_user_model["User records<br/>[user.py]"]
  node_sqlite[("Local SQLite<br/>[session.py]")]
end

node_users(("Administrators and workers"))

node_users -->|"uses"| node_app
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_ticket_pages
node_app -->|"routes to"| node_ticket_detail
node_app -->|"routes to"| node_admin_pages
node_auth_state -->|"uses"| node_api_endpoints
node_api_endpoints -->|"calls"| node_api_client
node_login -->|"requests"| node_api_client
node_api_client -->|"sends requests"| node_api_entry
node_api_entry -->|"mounts"| node_api_routes
node_api_entry -->|"mounts"| node_health
node_api_routes -->|"registers"| node_auth_route
node_auth_route -->|"calls"| node_auth_service
node_auth_service -->|"loads user"| node_user_model
node_auth_service -.->|"queries"| node_sqlite
node_ticket_service -->|"records events"| node_audit_service
node_ticket_service -->|"sends notices"| node_notification_service
node_ticket_service -->|"reads and writes"| node_models
node_asset_service -->|"records events"| node_audit_service
node_report_service -->|"queries"| node_models
node_models -.->|"persists"| node_sqlite
node_user_model -.->|"persists"| node_sqlite
node_api_entry -->|"registers handlers"| node_errors

click node_app "https://github.com/purnatejeshwarareddyb/infradesk/blob/main/frontend/src/App.tsx"
click node_login "https://github.com/purnatejeshwarareddyb/infradesk/blob/main/frontend/src/pages/Login.tsx"
click node_ticket_pages "https://github.com/purnatejeshwarareddyb/infradesk/blob/main/frontend/src/pages/shared/TicketList.tsx"
click node_ticket_detail "https://github.com/purnatejeshwarareddyb/infradesk/blob/main/frontend/src/pages/shared/TicketDetail.tsx"
click node_admin_pages "https://github.com/purnatejeshwarareddyb/infradesk/blob/main/frontend/src/pages/admin/Users.tsx"
click node_api_client "https://github.com/purnatejeshwarareddyb/infradesk/blob/main/frontend/src/api/client.ts"
click node_api_endpoints "https://github.com/purnatejeshwarareddyb/infradesk/blob/main/frontend/src/api/endpoints.ts"
click node_auth_state "https://github.com/purnatejeshwarareddyb/infradesk/blob/main/frontend/src/auth/AuthProvider.tsx"
click node_api_entry "https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/main.py"
click node_api_routes "https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/api/v1/router.py"
click node_auth_route "https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/api/v1/auth.py"
click node_ticket_service "https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/services/ticket_service.py"
click node_asset_service "https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/services/asset_service.py"
click node_user_service "https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/services/user_service.py"
click node_report_service "https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/services/report_service.py"
click node_audit_service "https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/services/audit_service.py"
click node_notification_service "https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/services/notification_service.py"
click node_auth_service "https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/services/auth_service.py"
click node_models "https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/models/ticket.py"
click node_user_model "https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/models/user.py"
click node_sqlite "https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/db/session.py"
click node_errors "https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/core/exceptions.py"
click node_health "https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/api/v1/health.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_app,node_login,node_ticket_pages,node_ticket_detail,node_admin_pages,node_api_client,node_api_endpoints,node_auth_state toneBlue
class node_api_entry,node_api_routes,node_auth_route,node_errors,node_health toneAmber
class node_ticket_service,node_asset_service,node_user_service,node_report_service,node_audit_service,node_notification_service,node_auth_service toneMint
class node_models,node_user_model,node_sqlite,node_users toneRose
```

## Components

### Web client

- [Application routes](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Sign-in](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/frontend/src/pages/Login.tsx): `frontend/src/pages/Login.tsx`
- [Ticket workspace](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/frontend/src/pages/shared/TicketList.tsx): `frontend/src/pages/shared/TicketList.tsx`
- [Ticket collaboration](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/frontend/src/pages/shared/TicketDetail.tsx): `frontend/src/pages/shared/TicketDetail.tsx`
- [Admin tools](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/frontend/src/pages/admin/Users.tsx): `frontend/src/pages/admin/Users.tsx`
- [HTTP client](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/frontend/src/api/client.ts): `frontend/src/api/client.ts`
- [API operations](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/frontend/src/api/endpoints.ts): `frontend/src/api/endpoints.ts`
- [Session state](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/frontend/src/auth/AuthProvider.tsx): `frontend/src/auth/AuthProvider.tsx`

### API boundary

- [FastAPI entry](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/main.py): `backend/app/main.py`
- [Versioned API routes](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/api/v1/router.py): `backend/app/api/v1/router.py`
- [Authentication route](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/api/v1/auth.py): `backend/app/api/v1/auth.py`
- [API error handling](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/core/exceptions.py): `backend/app/core/exceptions.py`
- [Health endpoint](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/api/v1/health.py): `backend/app/api/v1/health.py`

### Support workflows

- [Ticket rules](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/services/ticket_service.py): `backend/app/services/ticket_service.py`
- [Asset management](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/services/asset_service.py): `backend/app/services/asset_service.py`
- [User management](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/services/user_service.py): `backend/app/services/user_service.py`
- [Reporting](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/services/report_service.py): `backend/app/services/report_service.py`
- [Audit history](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/services/audit_service.py): `backend/app/services/audit_service.py`
- [Notifications](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/services/notification_service.py): `backend/app/services/notification_service.py`
- [Credential checks](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/services/auth_service.py): `backend/app/services/auth_service.py`

### Domain data

- [Domain records](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/models/ticket.py): `backend/app/models/ticket.py`
- [User records](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/models/user.py): `backend/app/models/user.py`
- [Local SQLite](https://github.com/purnatejeshwarareddyb/infradesk/blob/main/backend/app/db/session.py): `backend/app/db/session.py`

### Other components

- **Administrators and workers**

## Connections

- Administrators and workers → Application routes: uses (evidence: `README.md`)
- Application routes → Sign-in: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → Ticket workspace: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → Ticket collaboration: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → Admin tools: routes to (evidence: `frontend/src/App.tsx`)
- Session state → API operations: uses (evidence: `frontend/src/auth/AuthProvider.tsx`)
- API operations → HTTP client: calls (evidence: `frontend/src/api/endpoints.ts`)
- Sign-in → HTTP client: requests (evidence: `frontend/src/pages/Login.tsx`)
- HTTP client → FastAPI entry: sends requests (evidence: `README.md`)
- FastAPI entry → Versioned API routes: mounts (evidence: `backend/app/main.py`)
- FastAPI entry → Health endpoint: mounts (evidence: `backend/app/main.py`)
- Versioned API routes → Authentication route: registers (evidence: `backend/app/api/v1/router.py`)
- Authentication route → Credential checks: calls (evidence: `backend/app/api/v1/auth.py`)
- Credential checks → User records: loads user (evidence: `backend/app/services/auth_service.py`)
- Credential checks → Local SQLite: queries
- Ticket rules → Audit history: records events (evidence: `backend/app/services/ticket_service.py`)
- Ticket rules → Notifications: sends notices (evidence: `backend/app/services/ticket_service.py`)
- Ticket rules → Domain records: reads and writes (evidence: `backend/app/services/ticket_service.py`)
- Asset management → Audit history: records events (evidence: `backend/app/services/asset_service.py`)
- Reporting → Domain records: queries (evidence: `backend/app/services/report_service.py`)
- Domain records → Local SQLite: persists
- User records → Local SQLite: persists
- FastAPI entry → API error handling: registers handlers (evidence: `backend/app/main.py`)
