# frappe/helpdesk architecture

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

- Interactive diagram: https://gitdiagram.com/frappe/helpdesk
- Repository: https://github.com/frappe/helpdesk

## Overview

Frappe Helpdesk is a customer-support system with an agent desk and customer portal. The main workflow is submitting or finding a ticket, agent handling and communication, then tracking response and resolution against policy. The repository also documents knowledge-base search, assignment rules, saved replies, and analytics. The graph preserves these product stages and major capabilities; many backend feature files are listed but unsampled, so their internal call relationships are not asserted.

Main entry points: [`helpdesk/helpdesk/doctype/hd_ticket/hd_ticket.py`](https://github.com/frappe/helpdesk/blob/develop/helpdesk/helpdesk/doctype/hd_ticket/hd_ticket.py) (Ticket Records), [`desk/src/pages/ticket/TicketAgent.vue`](https://github.com/frappe/helpdesk/blob/develop/desk/src/pages/ticket/TicketAgent.vue) (Ticket Workspace), [`studio/helpdesk/router.ts`](https://github.com/frappe/helpdesk/blob/develop/studio/helpdesk/router.ts) (Customer Portal), [`desk/src/App.vue`](https://github.com/frappe/helpdesk/blob/develop/desk/src/App.vue) (Agent Desk)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Portals"]
  node_desk["Agent Desk<br/>[App.vue]"]
  node_desk_start["Desk Bootstrap<br/>[main.js]"]
  node_portal["Customer Portal<br/>[router.ts]"]
end

subgraph group_ticketing["Ticket Handling"]
  node_tickets[("Ticket Records<br/>[hd_ticket.py]")]
  node_ticket_portal_rules["Customer Ticket Rules"]
  node_ticket_ui["Ticket Workspace<br/>[TicketAgent.vue]"]
  node_contacts[("Customer Records<br/>[hd_customer.py]")]
end

subgraph group_automation["Support Automation"]
  node_assignment["Assignment Rules<br/>[assignment_rule.py]"]
  node_sla["SLA Tracking"]
  node_saved_replies["Saved Replies<br/>[saved_replies.py]"]
end

subgraph group_knowledge["Knowledge and Search"]
  node_knowledge_base["Knowledge Base<br/>[knowledge_base.py]"]
  node_article["Article Service<br/>[article.py]"]
  node_search["Search Service<br/>[search.py]"]
  node_palette["Command Palette"]
end

subgraph group_platform["Backend Services"]
  node_analytics["Ticket Analytics"]
  node_auth["Agent Identity<br/>[auth.py]"]
  node_telephony["Telephony Integration<br/>[CallUI.vue]"]
  node_realtime["Realtime Events<br/>[handlers.js]"]
end

node_agent(("Support Agent"))
node_customer(("Customer"))

node_agent -->|"uses"| node_desk
node_customer -->|"uses"| node_portal
node_desk_start -->|"mounts"| node_desk
node_desk_start -->|"installs router"| node_desk
node_portal -.->|"submits tickets"| node_tickets
node_portal -.->|"browses articles"| node_knowledge_base
node_portal -.->|"searches articles"| node_search
node_desk -.->|"renders workspace"| node_ticket_ui
node_ticket_ui -.->|"handles tickets"| node_tickets
node_ticket_portal_rules -->|"guards edits"| node_tickets
node_tickets -.->|"tracks targets"| node_sla
node_ticket_ui -.->|"assigns tickets"| node_assignment
node_ticket_ui -.->|"uses replies"| node_saved_replies
node_knowledge_base -.->|"manages articles"| node_article
node_palette -.->|"finds ticket actions"| node_tickets
node_tickets -.->|"supplies metrics"| node_analytics
node_ticket_ui -.->|"supports calls"| node_telephony

click node_desk "https://github.com/frappe/helpdesk/blob/develop/desk/src/App.vue"
click node_desk_start "https://github.com/frappe/helpdesk/blob/develop/desk/src/main.js"
click node_portal "https://github.com/frappe/helpdesk/blob/develop/studio/helpdesk/router.ts"
click node_tickets "https://github.com/frappe/helpdesk/blob/develop/helpdesk/helpdesk/doctype/hd_ticket/hd_ticket.py"
click node_ticket_portal_rules "https://github.com/frappe/helpdesk/blob/develop/helpdesk/helpdesk/doctype/hd_ticket/customer_edit_controller.py"
click node_ticket_ui "https://github.com/frappe/helpdesk/blob/develop/desk/src/pages/ticket/TicketAgent.vue"
click node_contacts "https://github.com/frappe/helpdesk/blob/develop/helpdesk/helpdesk/doctype/hd_customer/hd_customer.py"
click node_assignment "https://github.com/frappe/helpdesk/blob/develop/helpdesk/api/assignment_rule.py"
click node_sla "https://github.com/frappe/helpdesk/blob/develop/helpdesk/helpdesk/doctype/hd_service_level_agreement/hd_service_level_agreement.py"
click node_saved_replies "https://github.com/frappe/helpdesk/blob/develop/helpdesk/api/saved_replies.py"
click node_knowledge_base "https://github.com/frappe/helpdesk/blob/develop/helpdesk/api/knowledge_base.py"
click node_article "https://github.com/frappe/helpdesk/blob/develop/helpdesk/api/article.py"
click node_search "https://github.com/frappe/helpdesk/blob/develop/helpdesk/api/search.py"
click node_palette "https://github.com/frappe/helpdesk/blob/develop/desk/src/components/command-palette/useCommandPalette.ts"
click node_analytics "https://github.com/frappe/helpdesk/blob/develop/helpdesk/api/ticket_analytics.py"
click node_auth "https://github.com/frappe/helpdesk/blob/develop/helpdesk/api/auth.py"
click node_telephony "https://github.com/frappe/helpdesk/blob/develop/desk/src/components/telephony/CallUI.vue"
click node_realtime "https://github.com/frappe/helpdesk/blob/develop/realtime/handlers.js"

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_desk,node_desk_start,node_portal toneBlue
class node_tickets,node_ticket_portal_rules,node_ticket_ui,node_contacts toneAmber
class node_assignment,node_sla,node_saved_replies toneMint
class node_knowledge_base,node_article,node_search,node_palette toneRose
class node_analytics,node_auth,node_telephony,node_realtime,node_agent,node_customer toneIndigo
```

## Components

### Portals

- [Agent Desk](https://github.com/frappe/helpdesk/blob/develop/desk/src/App.vue): `desk/src/App.vue`
- [Desk Bootstrap](https://github.com/frappe/helpdesk/blob/develop/desk/src/main.js): `desk/src/main.js`
- [Customer Portal](https://github.com/frappe/helpdesk/blob/develop/studio/helpdesk/router.ts): `studio/helpdesk/router.ts`

### Ticket Handling

- [Ticket Records](https://github.com/frappe/helpdesk/blob/develop/helpdesk/helpdesk/doctype/hd_ticket/hd_ticket.py): `helpdesk/helpdesk/doctype/hd_ticket/hd_ticket.py`
- [Customer Ticket Rules](https://github.com/frappe/helpdesk/blob/develop/helpdesk/helpdesk/doctype/hd_ticket/customer_edit_controller.py): `helpdesk/helpdesk/doctype/hd_ticket/customer_edit_controller.py`
- [Ticket Workspace](https://github.com/frappe/helpdesk/blob/develop/desk/src/pages/ticket/TicketAgent.vue): `desk/src/pages/ticket/TicketAgent.vue`
- [Customer Records](https://github.com/frappe/helpdesk/blob/develop/helpdesk/helpdesk/doctype/hd_customer/hd_customer.py): `helpdesk/helpdesk/doctype/hd_customer/hd_customer.py`

### Support Automation

- [Assignment Rules](https://github.com/frappe/helpdesk/blob/develop/helpdesk/api/assignment_rule.py): `helpdesk/api/assignment_rule.py`
- [SLA Tracking](https://github.com/frappe/helpdesk/blob/develop/helpdesk/helpdesk/doctype/hd_service_level_agreement/hd_service_level_agreement.py): `helpdesk/helpdesk/doctype/hd_service_level_agreement/hd_service_level_agreement.py`
- [Saved Replies](https://github.com/frappe/helpdesk/blob/develop/helpdesk/api/saved_replies.py): `helpdesk/api/saved_replies.py`

### Knowledge and Search

- [Knowledge Base](https://github.com/frappe/helpdesk/blob/develop/helpdesk/api/knowledge_base.py): `helpdesk/api/knowledge_base.py`
- [Article Service](https://github.com/frappe/helpdesk/blob/develop/helpdesk/api/article.py): `helpdesk/api/article.py`
- [Search Service](https://github.com/frappe/helpdesk/blob/develop/helpdesk/api/search.py): `helpdesk/api/search.py`
- [Command Palette](https://github.com/frappe/helpdesk/blob/develop/desk/src/components/command-palette/useCommandPalette.ts): `desk/src/components/command-palette/useCommandPalette.ts`

### Backend Services

- [Ticket Analytics](https://github.com/frappe/helpdesk/blob/develop/helpdesk/api/ticket_analytics.py): `helpdesk/api/ticket_analytics.py`
- [Agent Identity](https://github.com/frappe/helpdesk/blob/develop/helpdesk/api/auth.py): `helpdesk/api/auth.py`
- [Telephony Integration](https://github.com/frappe/helpdesk/blob/develop/desk/src/components/telephony/CallUI.vue): `desk/src/components/telephony/CallUI.vue`
- [Realtime Events](https://github.com/frappe/helpdesk/blob/develop/realtime/handlers.js): `realtime/handlers.js`

### Other components

- **Support Agent**
- **Customer**

## Connections

- Support Agent → Agent Desk: uses (evidence: `README.md`)
- Customer → Customer Portal: uses (evidence: `README.md`)
- Desk Bootstrap → Agent Desk: mounts (evidence: `desk/src/main.js`)
- Desk Bootstrap → Agent Desk: installs router (evidence: `desk/src/main.js`)
- Customer Portal → Ticket Records: submits tickets
- Customer Portal → Knowledge Base: browses articles
- Customer Portal → Search Service: searches articles
- Agent Desk → Ticket Workspace: renders workspace
- Ticket Workspace → Ticket Records: handles tickets
- Customer Ticket Rules → Ticket Records: guards edits (evidence: `helpdesk/helpdesk/doctype/hd_ticket/customer_edit_controller.py`)
- Ticket Records → SLA Tracking: tracks targets
- Ticket Workspace → Assignment Rules: assigns tickets
- Ticket Workspace → Saved Replies: uses replies
- Knowledge Base → Article Service: manages articles
- Command Palette → Ticket Records: finds ticket actions
- Ticket Records → Ticket Analytics: supplies metrics
- Ticket Workspace → Telephony Integration: supports calls
