# ashishlukka1/sales-ticket architecture

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

- Interactive diagram: https://gitdiagram.com/ashishlukka1/sales-ticket
- Repository: https://github.com/ashishlukka1/sales-ticket

## Overview

Sales Ticket converts support conversations into role-routed revenue intelligence, then exposes ticket, account, memory, graph, voice, and chat workflows through a React dashboard. The principal documented path is Zendesk ticket ingestion → signal classification and draft generation → persistence and retrieval/analytics → team review. Controller excerpts confirm ticket classification, drafts, embeddings, and audio handling; README capabilities fill in unsampled dashboard and service branches, so those links are documented architecture rather than source-verified call chains.

Main entry points: [`server/index.js`](https://github.com/ashishlukka1/sales-ticket/blob/main/server/index.js) (HTTP application), [`server/controllers/ticketController.js`](https://github.com/ashishlukka1/sales-ticket/blob/main/server/controllers/ticketController.js) (Ticket intake), [`client/src/components/dashboard/Dashboard.jsx`](https://github.com/ashishlukka1/sales-ticket/blob/main/client/src/components/dashboard/Dashboard.jsx) (Dashboard shell), [`client/src/App.jsx`](https://github.com/ashishlukka1/sales-ticket/blob/main/client/src/App.jsx) (App routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Team workspace"]
  node_landing["Landing page<br/>[LandingPage.jsx]"]
  node_authui["Login and register<br/>[AuthPage.jsx]"]
  node_dashboard["Dashboard shell<br/>[Dashboard.jsx]"]
  node_ticketviews["Ticket views<br/>[AllTickets.jsx]"]
  node_healthmemory["Health and memory"]
  node_graphview["Graph views"]
  node_voiceview["Voice tickets<br/>[VoiceView.jsx]"]
  node_chatui["AI copilot<br/>[ChatbotWidget.jsx]"]
  node_app["App routes<br/>[App.jsx]"]
end

subgraph group_api["Express API"]
  node_server["HTTP application<br/>[index.js]"]
  node_auth["Identity and roles<br/>[userController.js]"]
  node_tickets["Ticket intake"]
  node_chat["Chat retrieval<br/>[chatController.js]"]
  node_memory["Account memory"]
  node_graph["Graph analytics<br/>[graphController.js]"]
end

subgraph group_intelligence["Signal intelligence"]
  node_classifier["Signal classifier<br/>[groqClassifier.js]"]
  node_drafts["Reply drafting"]
  node_embedding["Embedding model<br/>[embedding.js]"]
end

subgraph group_data["Persistence and retrieval"]
  node_mysql[("MySQL records<br/>[database.js]")]
  node_neo4j[("Account graph<br/>[neo4j.js]")]
end

subgraph group_integrations["External services"]
  node_zendesk["Zendesk tickets"]
  node_groq["Groq AI"]
  node_zendeskdelivery["Zendesk reply delivery<br/>[zendeskSender.js]"]
end

node_team(("Team member"))

node_team -->|"uses"| node_app
node_app -->|"routes"| node_landing
node_app -->|"routes"| node_authui
node_app -->|"protects"| node_dashboard
node_team -.->|"submits tickets"| node_zendesk
node_zendesk -.->|"sends payload"| node_server
node_app -->|"API requests"| node_server
node_authui -->|"auth requests"| node_server
node_dashboard -->|"shows"| node_ticketviews
node_dashboard -->|"shows"| node_healthmemory
node_dashboard -->|"shows"| node_graphview
node_dashboard -->|"shows"| node_voiceview
node_dashboard -->|"shows"| node_chatui
node_server -->|"dispatches"| node_auth
node_server -->|"dispatches"| node_tickets
node_server -->|"dispatches"| node_chat
node_server -->|"dispatches"| node_memory
node_server -->|"dispatches"| node_graph
node_tickets -->|"reads and writes"| node_mysql
node_tickets -->|"classifies"| node_classifier
node_classifier -->|"requests inference"| node_groq
node_tickets -->|"generates replies"| node_drafts
node_drafts -->|"requests inference"| node_groq
node_tickets -->|"embeds tickets"| node_embedding
node_tickets -->|"sends approved reply"| node_zendeskdelivery
node_zendeskdelivery -.->|"delivers reply"| node_zendesk
node_tickets -->|"stores embeddings"| node_mysql
node_chat -->|"loads context and saves sessions"| node_mysql
node_chat -->|"embeds query"| node_embedding
node_chat -->|"requests response"| node_groq
node_memory -->|"queries account graph"| node_neo4j
node_graph -->|"queries analytics"| node_neo4j
node_graphview -->|"requests graph data"| node_server
node_healthmemory -->|"requests account data"| node_server
node_ticketviews -->|"requests tickets"| node_server
node_voiceview -->|"requests audio"| node_server
node_chatui -->|"sends chat"| node_server

click node_landing "https://github.com/ashishlukka1/sales-ticket/blob/main/client/src/LandingPage.jsx"
click node_authui "https://github.com/ashishlukka1/sales-ticket/blob/main/client/src/components/LoginRegister/AuthPage.jsx"
click node_dashboard "https://github.com/ashishlukka1/sales-ticket/blob/main/client/src/components/dashboard/Dashboard.jsx"
click node_ticketviews "https://github.com/ashishlukka1/sales-ticket/blob/main/client/src/components/dashboard/views/AllTickets.jsx"
click node_healthmemory "https://github.com/ashishlukka1/sales-ticket/blob/main/client/src/components/dashboard/views/AccountHealthView.jsx"
click node_graphview "https://github.com/ashishlukka1/sales-ticket/blob/main/client/src/components/dashboard/views/SignalsFeedView.jsx"
click node_voiceview "https://github.com/ashishlukka1/sales-ticket/blob/main/client/src/components/dashboard/views/VoiceView.jsx"
click node_chatui "https://github.com/ashishlukka1/sales-ticket/blob/main/client/src/components/dashboard/ChatbotWidget.jsx"
click node_app "https://github.com/ashishlukka1/sales-ticket/blob/main/client/src/App.jsx"
click node_server "https://github.com/ashishlukka1/sales-ticket/blob/main/server/index.js"
click node_auth "https://github.com/ashishlukka1/sales-ticket/blob/main/server/controllers/userController.js"
click node_tickets "https://github.com/ashishlukka1/sales-ticket/blob/main/server/controllers/ticketController.js"
click node_chat "https://github.com/ashishlukka1/sales-ticket/blob/main/server/controllers/chatController.js"
click node_memory "https://github.com/ashishlukka1/sales-ticket/blob/main/server/controllers/memoryController.js"
click node_graph "https://github.com/ashishlukka1/sales-ticket/blob/main/server/controllers/graphController.js"
click node_classifier "https://github.com/ashishlukka1/sales-ticket/blob/main/server/utils/groqClassifier.js"
click node_drafts "https://github.com/ashishlukka1/sales-ticket/blob/main/server/utils/aiDraftGenerator.js"
click node_embedding "https://github.com/ashishlukka1/sales-ticket/blob/main/server/utils/embedding.js"
click node_mysql "https://github.com/ashishlukka1/sales-ticket/blob/main/server/config/database.js"
click node_neo4j "https://github.com/ashishlukka1/sales-ticket/blob/main/server/config/neo4j.js"
click node_zendeskdelivery "https://github.com/ashishlukka1/sales-ticket/blob/main/server/utils/zendeskSender.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_landing,node_authui,node_dashboard,node_ticketviews,node_healthmemory,node_graphview,node_voiceview,node_chatui,node_app toneBlue
class node_server,node_auth,node_tickets,node_chat,node_memory,node_graph toneAmber
class node_classifier,node_drafts,node_embedding toneMint
class node_mysql,node_neo4j toneRose
class node_zendesk,node_groq,node_zendeskdelivery,node_team toneIndigo
```

## Components

### Team workspace

- [Landing page](https://github.com/ashishlukka1/sales-ticket/blob/main/client/src/LandingPage.jsx): `client/src/LandingPage.jsx`
- [Login and register](https://github.com/ashishlukka1/sales-ticket/blob/main/client/src/components/LoginRegister/AuthPage.jsx): `client/src/components/LoginRegister/AuthPage.jsx`
- [Dashboard shell](https://github.com/ashishlukka1/sales-ticket/blob/main/client/src/components/dashboard/Dashboard.jsx): `client/src/components/dashboard/Dashboard.jsx`
- [Ticket views](https://github.com/ashishlukka1/sales-ticket/blob/main/client/src/components/dashboard/views/AllTickets.jsx): `client/src/components/dashboard/views/AllTickets.jsx`
- [Health and memory](https://github.com/ashishlukka1/sales-ticket/blob/main/client/src/components/dashboard/views/AccountHealthView.jsx): `client/src/components/dashboard/views/AccountHealthView.jsx`
- [Graph views](https://github.com/ashishlukka1/sales-ticket/blob/main/client/src/components/dashboard/views/SignalsFeedView.jsx): `client/src/components/dashboard/views/SignalsFeedView.jsx`
- [Voice tickets](https://github.com/ashishlukka1/sales-ticket/blob/main/client/src/components/dashboard/views/VoiceView.jsx): `client/src/components/dashboard/views/VoiceView.jsx`
- [AI copilot](https://github.com/ashishlukka1/sales-ticket/blob/main/client/src/components/dashboard/ChatbotWidget.jsx): `client/src/components/dashboard/ChatbotWidget.jsx`
- [App routes](https://github.com/ashishlukka1/sales-ticket/blob/main/client/src/App.jsx): `client/src/App.jsx`

### Express API

- [HTTP application](https://github.com/ashishlukka1/sales-ticket/blob/main/server/index.js): `server/index.js`
- [Identity and roles](https://github.com/ashishlukka1/sales-ticket/blob/main/server/controllers/userController.js): `server/controllers/userController.js`
- [Ticket intake](https://github.com/ashishlukka1/sales-ticket/blob/main/server/controllers/ticketController.js): `server/controllers/ticketController.js`
- [Chat retrieval](https://github.com/ashishlukka1/sales-ticket/blob/main/server/controllers/chatController.js): `server/controllers/chatController.js`
- [Account memory](https://github.com/ashishlukka1/sales-ticket/blob/main/server/controllers/memoryController.js): `server/controllers/memoryController.js`
- [Graph analytics](https://github.com/ashishlukka1/sales-ticket/blob/main/server/controllers/graphController.js): `server/controllers/graphController.js`

### Signal intelligence

- [Signal classifier](https://github.com/ashishlukka1/sales-ticket/blob/main/server/utils/groqClassifier.js): `server/utils/groqClassifier.js`
- [Reply drafting](https://github.com/ashishlukka1/sales-ticket/blob/main/server/utils/aiDraftGenerator.js): `server/utils/aiDraftGenerator.js`
- [Embedding model](https://github.com/ashishlukka1/sales-ticket/blob/main/server/utils/embedding.js): `server/utils/embedding.js`

### Persistence and retrieval

- [MySQL records](https://github.com/ashishlukka1/sales-ticket/blob/main/server/config/database.js): `server/config/database.js`
- [Account graph](https://github.com/ashishlukka1/sales-ticket/blob/main/server/config/neo4j.js): `server/config/neo4j.js`

### External services

- **Zendesk tickets**
- **Groq AI**
- [Zendesk reply delivery](https://github.com/ashishlukka1/sales-ticket/blob/main/server/utils/zendeskSender.js): `server/utils/zendeskSender.js`

### Other components

- **Team member**

## Connections

- Team member → App routes: uses
- App routes → Landing page: routes
- App routes → Login and register: routes
- App routes → Dashboard shell: protects
- Team member → Zendesk tickets: submits tickets
- Zendesk tickets → HTTP application: sends payload
- App routes → HTTP application: API requests
- Login and register → HTTP application: auth requests
- Dashboard shell → Ticket views: shows
- Dashboard shell → Health and memory: shows
- Dashboard shell → Graph views: shows
- Dashboard shell → Voice tickets: shows
- Dashboard shell → AI copilot: shows
- HTTP application → Identity and roles: dispatches
- HTTP application → Ticket intake: dispatches
- HTTP application → Chat retrieval: dispatches
- HTTP application → Account memory: dispatches
- HTTP application → Graph analytics: dispatches
- Ticket intake → MySQL records: reads and writes
- Ticket intake → Signal classifier: classifies
- Signal classifier → Groq AI: requests inference
- Ticket intake → Reply drafting: generates replies
- Reply drafting → Groq AI: requests inference
- Ticket intake → Embedding model: embeds tickets
- Ticket intake → Zendesk reply delivery: sends approved reply
- Zendesk reply delivery → Zendesk tickets: delivers reply
- Ticket intake → MySQL records: stores embeddings
- Chat retrieval → MySQL records: loads context and saves sessions
- Chat retrieval → Embedding model: embeds query
- Chat retrieval → Groq AI: requests response
- Account memory → Account graph: queries account graph
- Graph analytics → Account graph: queries analytics
- Graph views → HTTP application: requests graph data
- Health and memory → HTTP application: requests account data
- Ticket views → HTTP application: requests tickets
- Voice tickets → HTTP application: requests audio
- AI copilot → HTTP application: sends chat
