# sprabudh/npstx-helpdesk-app architecture

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

- Interactive diagram: https://gitdiagram.com/sprabudh/npstx-helpdesk-app
- Repository: https://github.com/sprabudh/npstx-helpdesk-app

## Overview

NPSTX is an integrated, role-aware helpdesk for HR, L&D, IT, Admin Desk, and selected Salesforce cases. A user signs in, sees a persona- and permission-shaped dashboard, raises or finds a ticket, and follows its actions, approvals, SLA state, and history; administrators configure categories, fields, and service rules. The graph preserves the documented AI, FAQ, analytics, performance, notification, and Salesforce capabilities. Relationships are limited to README feature mappings and source-index references; unsampled implementation details are not asserted.

Main entry points: [`frontend/src/App.tsx`](https://github.com/sprabudh/npstx-helpdesk-app/blob/main/frontend/src/App.tsx) (Web app routing), [`frontend/src/api`](https://github.com/sprabudh/npstx-helpdesk-app/tree/main/frontend/src/api) (API client and hooks), [`frontend/src/pages/DashboardPage.tsx`](https://github.com/sprabudh/npstx-helpdesk-app/blob/main/frontend/src/pages/DashboardPage.tsx) (Dashboard), [`frontend/src/pages/AdminPage.tsx`](https://github.com/sprabudh/npstx-helpdesk-app/blob/main/frontend/src/pages/AdminPage.tsx) (Admin console)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_webapp["Web app routing<br/>[App.tsx]"]
  node_api["API client and hooks"]
  node_dashboard["Dashboard<br/>[DashboardPage.tsx]"]
  node_ticketpages["Ticket views"]
  node_raisedrawer["Ticket raise form<br/>[RaiseDrawer.tsx]"]
  node_adminui["Admin console<br/>[AdminPage.tsx]"]
end

subgraph group_ticketing["Ticket lifecycle"]
  node_ticketapi["Ticket endpoints"]
  node_ticketquery["Ticket queries"]
  node_ticketcreate["Ticket creation"]
  node_ticketactions["Ticket actions"]
  node_sla["SLA and escalation<br/>[sla.ts]"]
end

subgraph group_policy["Access and configuration"]
  node_policy["Access policy<br/>[policy.ts]"]
  node_config["Helpdesk configuration<br/>[config.service.ts]"]
  node_admin["Admin services<br/>[admin.service.ts]"]
end

subgraph group_insights["AI and insights"]
  node_ai["AI assistance<br/>[ai.service.ts]"]
  node_analytics["Analytics"]
  node_performance["Performance reports"]
  node_faq["FAQs<br/>[faq.service.ts]"]
end

subgraph group_platform["Identity and integrations"]
  node_store[("Helpdesk database<br/>[entities.ts]")]
  node_auth["Authentication"]
  node_notifications["Notifications"]
  node_salesforce["Salesforce adapter"]
end

node_user(("Helpdesk user"))
node_external_sf{{"Salesforce"}}

node_user -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_dashboard
node_webapp -->|"routes to"| node_ticketpages
node_webapp -->|"routes to"| node_adminui
node_dashboard -.->|"requests data"| node_api
node_ticketpages -.->|"requests data"| node_api
node_raisedrawer -->|"submits ticket"| node_api
node_adminui -.->|"requests config"| node_api
node_api -.->|"calls API"| node_auth
node_api -->|"calls API"| node_ticketapi
node_ticketapi -->|"queries"| node_ticketquery
node_ticketapi -->|"creates"| node_ticketcreate
node_ticketapi -->|"dispatches actions"| node_ticketactions
node_ticketquery -->|"reads tickets"| node_store
node_ticketquery -->|"checks visibility"| node_policy
node_ticketquery -->|"calculates SLA"| node_sla
node_ticketcreate -->|"uses form rules"| node_config
node_ticketcreate -->|"offers AI assist"| node_ai
node_ticketactions -->|"handles cases"| node_salesforce
node_salesforce -.->|"integrates"| node_external_sf
node_adminui -->|"configures"| node_admin
node_adminui -->|"edits settings"| node_config
node_dashboard -->|"uses assistance"| node_ai
node_dashboard -->|"shows analytics"| node_analytics
node_webapp -->|"opens reports"| node_performance
node_webapp -->|"opens FAQs"| node_faq
node_webapp -->|"shows notifications"| node_notifications
node_config -->|"loads configuration"| node_store

click node_webapp "https://github.com/sprabudh/npstx-helpdesk-app/blob/main/frontend/src/App.tsx"
click node_api "https://github.com/sprabudh/npstx-helpdesk-app/tree/main/frontend/src/api"
click node_dashboard "https://github.com/sprabudh/npstx-helpdesk-app/blob/main/frontend/src/pages/DashboardPage.tsx"
click node_ticketpages "https://github.com/sprabudh/npstx-helpdesk-app/tree/main/frontend/src/pages"
click node_raisedrawer "https://github.com/sprabudh/npstx-helpdesk-app/blob/main/frontend/src/components/drawer/RaiseDrawer.tsx"
click node_adminui "https://github.com/sprabudh/npstx-helpdesk-app/blob/main/frontend/src/pages/AdminPage.tsx"
click node_ticketapi "https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/tickets/tickets.controller.ts"
click node_ticketquery "https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/tickets/ticket-query.service.ts"
click node_ticketcreate "https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/tickets/ticket-create.service.ts"
click node_ticketactions "https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/tickets/ticket-actions.service.ts"
click node_sla "https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/domain/sla.ts"
click node_store "https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/database/entities.ts"
click node_auth "https://github.com/sprabudh/npstx-helpdesk-app/tree/main/backend/src/auth"
click node_policy "https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/domain/policy.ts"
click node_config "https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/helpdesk-config/config.service.ts"
click node_admin "https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/admin/admin.service.ts"
click node_ai "https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/ai/ai.service.ts"
click node_analytics "https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/analytics/analytics.service.ts"
click node_performance "https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/performance/performance.service.ts"
click node_faq "https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/faq/faq.service.ts"
click node_notifications "https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/notifications/notifications.service.ts"
click node_salesforce "https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/providers/salesforce/salesforce.provider.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_webapp,node_api,node_dashboard,node_ticketpages,node_raisedrawer,node_adminui,node_user toneBlue
class node_ticketapi,node_ticketquery,node_ticketcreate,node_ticketactions,node_sla toneAmber
class node_policy,node_config,node_admin toneMint
class node_ai,node_analytics,node_performance,node_faq toneRose
class node_store,node_auth,node_notifications,node_salesforce,node_external_sf toneIndigo
```

## Components

### User experience

- [Web app routing](https://github.com/sprabudh/npstx-helpdesk-app/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [API client and hooks](https://github.com/sprabudh/npstx-helpdesk-app/tree/main/frontend/src/api): `frontend/src/api`
- [Dashboard](https://github.com/sprabudh/npstx-helpdesk-app/blob/main/frontend/src/pages/DashboardPage.tsx): `frontend/src/pages/DashboardPage.tsx`
- [Ticket views](https://github.com/sprabudh/npstx-helpdesk-app/tree/main/frontend/src/pages): `frontend/src/pages`
- [Ticket raise form](https://github.com/sprabudh/npstx-helpdesk-app/blob/main/frontend/src/components/drawer/RaiseDrawer.tsx): `frontend/src/components/drawer/RaiseDrawer.tsx`
- [Admin console](https://github.com/sprabudh/npstx-helpdesk-app/blob/main/frontend/src/pages/AdminPage.tsx): `frontend/src/pages/AdminPage.tsx`

### Ticket lifecycle

- [Ticket endpoints](https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/tickets/tickets.controller.ts): `backend/src/tickets/tickets.controller.ts`
- [Ticket queries](https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/tickets/ticket-query.service.ts): `backend/src/tickets/ticket-query.service.ts`
- [Ticket creation](https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/tickets/ticket-create.service.ts): `backend/src/tickets/ticket-create.service.ts`
- [Ticket actions](https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/tickets/ticket-actions.service.ts): `backend/src/tickets/ticket-actions.service.ts`
- [SLA and escalation](https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/domain/sla.ts): `backend/src/domain/sla.ts`

### Access and configuration

- [Access policy](https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/domain/policy.ts): `backend/src/domain/policy.ts`
- [Helpdesk configuration](https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/helpdesk-config/config.service.ts): `backend/src/helpdesk-config/config.service.ts`
- [Admin services](https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/admin/admin.service.ts): `backend/src/admin/admin.service.ts`

### AI and insights

- [AI assistance](https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/ai/ai.service.ts): `backend/src/ai/ai.service.ts`
- [Analytics](https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/analytics/analytics.service.ts): `backend/src/analytics/analytics.service.ts`
- [Performance reports](https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/performance/performance.service.ts): `backend/src/performance/performance.service.ts`
- [FAQs](https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/faq/faq.service.ts): `backend/src/faq/faq.service.ts`

### Identity and integrations

- [Helpdesk database](https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/database/entities.ts): `backend/src/database/entities.ts`
- [Authentication](https://github.com/sprabudh/npstx-helpdesk-app/tree/main/backend/src/auth): `backend/src/auth`
- [Notifications](https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/notifications/notifications.service.ts): `backend/src/notifications/notifications.service.ts`
- [Salesforce adapter](https://github.com/sprabudh/npstx-helpdesk-app/blob/main/backend/src/providers/salesforce/salesforce.provider.ts): `backend/src/providers/salesforce/salesforce.provider.ts`

### Other components

- **Helpdesk user**
- **Salesforce**

## Connections

- Helpdesk user → Web app routing: uses
- Web app routing → Dashboard: routes to (evidence: `frontend/src/App.tsx`)
- Web app routing → Ticket views: routes to (evidence: `frontend/src/App.tsx`)
- Web app routing → Admin console: routes to (evidence: `frontend/src/App.tsx`)
- Dashboard → API client and hooks: requests data
- Ticket views → API client and hooks: requests data (evidence: `frontend/src/pages/AdminPage.tsx`)
- Ticket raise form → API client and hooks: submits ticket (evidence: `frontend/src/components/drawer/RaiseDrawer.tsx`)
- Admin console → API client and hooks: requests config (evidence: `frontend/src/pages/AdminPage.tsx`)
- API client and hooks → Authentication: calls API
- API client and hooks → Ticket endpoints: calls API
- Ticket endpoints → Ticket queries: queries (evidence: `backend/src/tickets/tickets.controller.ts`)
- Ticket endpoints → Ticket creation: creates (evidence: `backend/src/tickets/tickets.controller.ts`)
- Ticket endpoints → Ticket actions: dispatches actions (evidence: `backend/src/tickets/tickets.controller.ts`)
- Ticket queries → Helpdesk database: reads tickets (evidence: `backend/src/tickets/ticket-query.service.ts`)
- Ticket queries → Access policy: checks visibility (evidence: `backend/src/tickets/ticket-query.service.ts`)
- Ticket queries → SLA and escalation: calculates SLA (evidence: `backend/src/tickets/ticket-query.service.ts`)
- Ticket creation → Helpdesk configuration: uses form rules (evidence: `backend/src/helpdesk-config/config.controller.ts`)
- Ticket creation → AI assistance: offers AI assist
- Ticket actions → Salesforce adapter: handles cases
- Salesforce adapter → Salesforce: integrates
- Admin console → Admin services: configures
- Admin console → Helpdesk configuration: edits settings
- Dashboard → AI assistance: uses assistance
- Dashboard → Analytics: shows analytics
- Web app routing → Performance reports: opens reports
- Web app routing → FAQs: opens FAQs
- Web app routing → Notifications: shows notifications
- Helpdesk configuration → Helpdesk database: loads configuration (evidence: `backend/src/helpdesk-config/config.service.ts`)
