# raghavendra348/support-ticket-system architecture

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

- Interactive diagram: https://gitdiagram.com/raghavendra348/support-ticket-system
- Repository: https://github.com/raghavendra348/support-ticket-system

## Overview

SupportDesk is a full-stack support-ticket system. Customers register or log in, create and track their tickets, and exchange comments with agents; agents search and manage the shared ticket queue, update status and priority, assign tickets, and reply. The React client calls a Django REST API, whose account and ticket views validate requests and work with user, ticket, and comment data. The README documents JWT authentication, role separation, analytics, and MySQL/SQLite support. Some frontend and backend excerpts are partial, so uncertain internal links are omitted.

Main entry points: [`frontend/src/pages/CustomerDashboard.jsx`](https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/pages/CustomerDashboard.jsx) (Customer dashboard), [`frontend/src/api/client.js`](https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/api/client.js) (HTTP API client), [`frontend/src/pages/AgentDashboard.jsx`](https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/pages/AgentDashboard.jsx) (Agent dashboard), [`frontend/src/context/AuthContext.jsx`](https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/context/AuthContext.jsx) (Session context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["React client"]
  node_app["Route application<br/>[App.jsx]"]
  node_auth_ui["Auth pages<br/>[Login.jsx]"]
  node_register_ui["Registration page<br/>[Register.jsx]"]
  node_auth_state["Session context<br/>[AuthContext.jsx]"]
  node_customer_dash["Customer dashboard"]
  node_agent_dash["Agent dashboard<br/>[AgentDashboard.jsx]"]
  node_create_modal["Ticket creation"]
  node_detail_modal["Ticket details"]
  node_ticket_badge["Status and priority badges<br/>[TicketBadge.jsx]"]
  node_navbar["Navigation bar<br/>[Navbar.jsx]"]
  node_api_client["HTTP API client<br/>[client.js]"]
end

subgraph group_identity["Identity and access"]
  node_account_routes["Account routes<br/>[urls.py]"]
  node_account_views["Account endpoints<br/>[views.py]"]
  node_account_serializers["User serializers<br/>[serializers.py]"]
  node_permissions["Agent permissions<br/>[permissions.py]"]
end

subgraph group_ticketing["Ticket operations"]
  node_ticket_routes["Ticket routes<br/>[urls.py]"]
  node_ticket_views["Ticket endpoints<br/>[views.py]"]
  node_ticket_serializers["Ticket serializers<br/>[serializers.py]"]
end

subgraph group_data["Domain data"]
  node_user_model[("User model<br/>[models.py]")]
  node_ticket_model[("Ticket and comments<br/>[models.py]")]
end

node_customer(("Customer"))
node_agent(("Support agent"))
node_sql_store[("MySQL or SQLite")]

node_customer -->|"signs in"| node_auth_ui
node_customer -->|"registers"| node_register_ui
node_customer -->|"manages tickets"| node_customer_dash
node_agent -->|"works queue"| node_agent_dash
node_app -->|"uses session"| node_auth_state
node_app -->|"routes to"| node_auth_ui
node_app -->|"routes to"| node_register_ui
node_app -->|"routes to"| node_customer_dash
node_app -->|"routes to"| node_agent_dash
node_auth_ui -->|"uses session"| node_auth_state
node_register_ui -->|"uses session"| node_auth_state
node_auth_state -->|"requests auth"| node_api_client
node_customer_dash -->|"loads tickets and stats"| node_api_client
node_agent_dash -->|"loads queue and stats"| node_api_client
node_customer_dash -->|"opens"| node_create_modal
node_customer_dash -->|"opens"| node_detail_modal
node_agent_dash -->|"opens"| node_detail_modal
node_customer_dash -->|"renders"| node_ticket_badge
node_agent_dash -->|"renders"| node_ticket_badge
node_customer_dash -->|"renders"| node_navbar
node_agent_dash -->|"renders"| node_navbar
node_create_modal -->|"submits ticket"| node_api_client
node_detail_modal -->|"loads and updates"| node_api_client
node_detail_modal -->|"renders"| node_ticket_badge
node_detail_modal -->|"checks role"| node_auth_state
node_navbar -->|"uses session"| node_auth_state
node_api_client -->|"calls API"| node_account_routes
node_api_client -->|"calls API"| node_ticket_routes
node_account_routes -->|"routes requests"| node_account_views
node_account_views -->|"validates and serializes"| node_account_serializers
node_account_views -->|"reads user"| node_user_model
node_account_views -->|"requires agent access"| node_permissions
node_account_serializers -->|"validates and creates"| node_user_model
node_ticket_routes -->|"routes requests"| node_ticket_views
node_ticket_views -->|"validates and serializes"| node_ticket_serializers
node_ticket_views -->|"queries and changes"| node_ticket_model
node_ticket_serializers -->|"serializes ticket data"| node_ticket_model
node_ticket_model -.->|"persists records"| node_sql_store
node_user_model -.->|"persists accounts"| node_sql_store

click node_app "https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/App.jsx"
click node_auth_ui "https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/pages/Login.jsx"
click node_register_ui "https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/pages/Register.jsx"
click node_auth_state "https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/context/AuthContext.jsx"
click node_customer_dash "https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/pages/CustomerDashboard.jsx"
click node_agent_dash "https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/pages/AgentDashboard.jsx"
click node_create_modal "https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/components/CreateTicketModal.jsx"
click node_detail_modal "https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/components/TicketDetailModal.jsx"
click node_ticket_badge "https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/components/TicketBadge.jsx"
click node_navbar "https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/components/Navbar.jsx"
click node_api_client "https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/api/client.js"
click node_account_routes "https://github.com/raghavendra348/support-ticket-system/blob/main/backend/accounts/urls.py"
click node_account_views "https://github.com/raghavendra348/support-ticket-system/blob/main/backend/accounts/views.py"
click node_account_serializers "https://github.com/raghavendra348/support-ticket-system/blob/main/backend/accounts/serializers.py"
click node_permissions "https://github.com/raghavendra348/support-ticket-system/blob/main/backend/accounts/permissions.py"
click node_user_model "https://github.com/raghavendra348/support-ticket-system/blob/main/backend/accounts/models.py"
click node_ticket_routes "https://github.com/raghavendra348/support-ticket-system/blob/main/backend/tickets/urls.py"
click node_ticket_views "https://github.com/raghavendra348/support-ticket-system/blob/main/backend/tickets/views.py"
click node_ticket_serializers "https://github.com/raghavendra348/support-ticket-system/blob/main/backend/tickets/serializers.py"
click node_ticket_model "https://github.com/raghavendra348/support-ticket-system/blob/main/backend/tickets/models.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_auth_ui,node_register_ui,node_auth_state,node_customer_dash,node_agent_dash,node_create_modal,node_detail_modal,node_ticket_badge,node_navbar,node_api_client toneBlue
class node_account_routes,node_account_views,node_account_serializers,node_permissions,node_sql_store toneAmber
class node_ticket_routes,node_ticket_views,node_ticket_serializers toneMint
class node_user_model,node_ticket_model toneRose
class node_customer,node_agent toneIndigo
```

## Components

### React client

- [Route application](https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Auth pages](https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [Registration page](https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/pages/Register.jsx): `frontend/src/pages/Register.jsx`
- [Session context](https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Customer dashboard](https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/pages/CustomerDashboard.jsx): `frontend/src/pages/CustomerDashboard.jsx`
- [Agent dashboard](https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/pages/AgentDashboard.jsx): `frontend/src/pages/AgentDashboard.jsx`
- [Ticket creation](https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/components/CreateTicketModal.jsx): `frontend/src/components/CreateTicketModal.jsx`
- [Ticket details](https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/components/TicketDetailModal.jsx): `frontend/src/components/TicketDetailModal.jsx`
- [Status and priority badges](https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/components/TicketBadge.jsx): `frontend/src/components/TicketBadge.jsx`
- [Navigation bar](https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/components/Navbar.jsx): `frontend/src/components/Navbar.jsx`
- [HTTP API client](https://github.com/raghavendra348/support-ticket-system/blob/main/frontend/src/api/client.js): `frontend/src/api/client.js`

### Identity and access

- [Account routes](https://github.com/raghavendra348/support-ticket-system/blob/main/backend/accounts/urls.py): `backend/accounts/urls.py`
- [Account endpoints](https://github.com/raghavendra348/support-ticket-system/blob/main/backend/accounts/views.py): `backend/accounts/views.py`
- [User serializers](https://github.com/raghavendra348/support-ticket-system/blob/main/backend/accounts/serializers.py): `backend/accounts/serializers.py`
- [Agent permissions](https://github.com/raghavendra348/support-ticket-system/blob/main/backend/accounts/permissions.py): `backend/accounts/permissions.py`

### Ticket operations

- [Ticket routes](https://github.com/raghavendra348/support-ticket-system/blob/main/backend/tickets/urls.py): `backend/tickets/urls.py`
- [Ticket endpoints](https://github.com/raghavendra348/support-ticket-system/blob/main/backend/tickets/views.py): `backend/tickets/views.py`
- [Ticket serializers](https://github.com/raghavendra348/support-ticket-system/blob/main/backend/tickets/serializers.py): `backend/tickets/serializers.py`

### Domain data

- [User model](https://github.com/raghavendra348/support-ticket-system/blob/main/backend/accounts/models.py): `backend/accounts/models.py`
- [Ticket and comments](https://github.com/raghavendra348/support-ticket-system/blob/main/backend/tickets/models.py): `backend/tickets/models.py`

### Other components

- **Customer**
- **Support agent**
- **MySQL or SQLite**

## Connections

- Customer → Auth pages: signs in (evidence: `README.md`)
- Customer → Registration page: registers (evidence: `README.md`)
- Customer → Customer dashboard: manages tickets (evidence: `README.md`)
- Support agent → Agent dashboard: works queue (evidence: `README.md`)
- Route application → Session context: uses session (evidence: `frontend/src/App.jsx`)
- Route application → Auth pages: routes to (evidence: `frontend/src/App.jsx`)
- Route application → Registration page: routes to (evidence: `frontend/src/App.jsx`)
- Route application → Customer dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Route application → Agent dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Auth pages → Session context: uses session (evidence: `frontend/src/pages/Login.jsx`)
- Registration page → Session context: uses session (evidence: `frontend/src/pages/Register.jsx`)
- Session context → HTTP API client: requests auth (evidence: `frontend/src/context/AuthContext.jsx`)
- Customer dashboard → HTTP API client: loads tickets and stats (evidence: `frontend/src/pages/CustomerDashboard.jsx`)
- Agent dashboard → HTTP API client: loads queue and stats (evidence: `frontend/src/pages/AgentDashboard.jsx`)
- Customer dashboard → Ticket creation: opens (evidence: `frontend/src/pages/CustomerDashboard.jsx`)
- Customer dashboard → Ticket details: opens (evidence: `frontend/src/pages/CustomerDashboard.jsx`)
- Agent dashboard → Ticket details: opens (evidence: `frontend/src/pages/AgentDashboard.jsx`)
- Customer dashboard → Status and priority badges: renders (evidence: `frontend/src/pages/CustomerDashboard.jsx`)
- Agent dashboard → Status and priority badges: renders (evidence: `frontend/src/pages/AgentDashboard.jsx`)
- Customer dashboard → Navigation bar: renders (evidence: `frontend/src/pages/CustomerDashboard.jsx`)
- Agent dashboard → Navigation bar: renders (evidence: `frontend/src/pages/AgentDashboard.jsx`)
- Ticket creation → HTTP API client: submits ticket (evidence: `frontend/src/components/CreateTicketModal.jsx`)
- Ticket details → HTTP API client: loads and updates (evidence: `frontend/src/components/TicketDetailModal.jsx`)
- Ticket details → Status and priority badges: renders (evidence: `frontend/src/components/TicketDetailModal.jsx`)
- Ticket details → Session context: checks role (evidence: `frontend/src/components/TicketDetailModal.jsx`)
- Navigation bar → Session context: uses session (evidence: `frontend/src/components/Navbar.jsx`)
- HTTP API client → Account routes: calls API (evidence: `README.md`)
- HTTP API client → Ticket routes: calls API (evidence: `README.md`)
- Account routes → Account endpoints: routes requests (evidence: `backend/accounts/urls.py`)
- Account endpoints → User serializers: validates and serializes (evidence: `backend/accounts/views.py`)
- Account endpoints → User model: reads user (evidence: `backend/accounts/views.py`)
- Account endpoints → Agent permissions: requires agent access (evidence: `backend/accounts/views.py`)
- User serializers → User model: validates and creates (evidence: `backend/accounts/serializers.py`)
- Ticket routes → Ticket endpoints: routes requests (evidence: `backend/tickets/urls.py`)
- Ticket endpoints → Ticket serializers: validates and serializes (evidence: `backend/tickets/views.py`)
- Ticket endpoints → Ticket and comments: queries and changes (evidence: `backend/tickets/views.py`)
- Ticket serializers → Ticket and comments: serializes ticket data (evidence: `backend/tickets/serializers.py`)
- Ticket and comments → MySQL or SQLite: persists records
- User model → MySQL or SQLite: persists accounts
