# hananahmed07/customer-support-project architecture

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

- Interactive diagram: https://gitdiagram.com/hananahmed07/customer-support-project
- Repository: https://github.com/hananahmed07/customer-support-project

## Overview

TicketSense classifies customer-support text into intents, then presents intent, confidence, and category-based SLA routing information. The primary workflow runs from an agent’s live or batch triage interface through the frontend API client to FastAPI, which cleans text and uses the saved model for inference. The UI also exposes an overview, benchmark metrics, an intent catalog, and SLA guidance. Edges reflect excerpted calls or README statements; unsampled model-loading details are not expanded beyond documented connections.

Main entry points: [`TicketSense/frontend/app/page.jsx`](https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/frontend/app/page.jsx) (App workspace), [`TicketSense/backend/api/index.py`](https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/backend/api/index.py) (FastAPI service), [`TicketSense/frontend/lib/intents-data.js`](https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/frontend/lib/intents-data.js) (Intent data), [`TicketSense/frontend/lib/api-client.js`](https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/frontend/lib/api-client.js) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Support workspace"]
  node_workspace["App workspace<br/>[page.jsx]"]
  node_live["Live classifier<br/>[LiveClassifier.jsx]"]
  node_batch["Batch triage<br/>[BatchTriage.jsx]"]
  node_overview["Dashboard overview"]
  node_benchmarks["Benchmark metrics"]
  node_catalog["Intent catalog<br/>[IntentCatalog.jsx]"]
  node_sla["SLA matrix<br/>[SlaMatrix.jsx]"]
  node_api_client["API client<br/>[api-client.js]"]
end

subgraph group_backend["Inference service"]
  node_api["FastAPI service<br/>[index.py]"]
  node_cleaning["Text cleaning<br/>[preprocessing.py]"]
end

subgraph group_model["Classifier assets"]
  node_model_file["Trained pipeline<br/>[bestmodel.pkl]"]
  node_metadata["Intent metadata"]
  node_vectorizer["Word2Vec transformer<br/>[vectorizers.py]"]
end

subgraph group_reference["Routing reference"]
  node_intent_data["Intent data<br/>[intents-data.js]"]
end

node_agent(("Support agent"))
node_support(("Classification result"))

node_agent -->|"uses"| node_workspace
node_workspace -->|"renders"| node_live
node_workspace -->|"renders"| node_batch
node_workspace -->|"renders"| node_overview
node_workspace -->|"renders"| node_catalog
node_workspace -->|"renders"| node_sla
node_live -->|"classifies via"| node_api_client
node_batch -->|"submits batch"| node_api_client
node_api_client -->|"HTTP requests"| node_api
node_api -->|"cleans text"| node_cleaning
node_api -->|"loads pipeline"| node_model_file
node_model_file -->|"uses transformer"| node_vectorizer
node_api -->|"loads metadata"| node_metadata
node_api -->|"returns predictions"| node_support
node_overview -->|"reads metrics"| node_intent_data
node_benchmarks -->|"reads benchmarks"| node_intent_data
node_catalog -->|"reads catalog"| node_intent_data
node_sla -->|"reads routing"| node_intent_data
node_support -.->|"shows result"| node_agent

click node_workspace "https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/frontend/app/page.jsx"
click node_live "https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/frontend/components/LiveClassifier.jsx"
click node_batch "https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/frontend/components/BatchTriage.jsx"
click node_overview "https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/frontend/components/DashboardOverview.jsx"
click node_benchmarks "https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/frontend/components/BenchmarkMetrics.jsx"
click node_catalog "https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/frontend/components/IntentCatalog.jsx"
click node_sla "https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/frontend/components/SlaMatrix.jsx"
click node_api_client "https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/frontend/lib/api-client.js"
click node_intent_data "https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/frontend/lib/intents-data.js"
click node_api "https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/backend/api/index.py"
click node_cleaning "https://github.com/hananahmed07/customer-support-project/blob/main/preprocessing.py"
click node_model_file "https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/backend/artifacts/bestmodel.pkl"
click node_metadata "https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/backend/artifacts/intent_metadata.json"
click node_vectorizer "https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/backend/vectorizers.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_workspace,node_live,node_batch,node_overview,node_benchmarks,node_catalog,node_sla,node_api_client toneBlue
class node_api,node_cleaning toneAmber
class node_model_file,node_metadata,node_vectorizer toneMint
class node_intent_data toneRose
class node_agent,node_support toneIndigo
```

## Components

### Support workspace

- [App workspace](https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/frontend/app/page.jsx): `TicketSense/frontend/app/page.jsx`
- [Live classifier](https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/frontend/components/LiveClassifier.jsx): `TicketSense/frontend/components/LiveClassifier.jsx`
- [Batch triage](https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/frontend/components/BatchTriage.jsx): `TicketSense/frontend/components/BatchTriage.jsx`
- [Dashboard overview](https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/frontend/components/DashboardOverview.jsx): `TicketSense/frontend/components/DashboardOverview.jsx`
- [Benchmark metrics](https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/frontend/components/BenchmarkMetrics.jsx): `TicketSense/frontend/components/BenchmarkMetrics.jsx`
- [Intent catalog](https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/frontend/components/IntentCatalog.jsx): `TicketSense/frontend/components/IntentCatalog.jsx`
- [SLA matrix](https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/frontend/components/SlaMatrix.jsx): `TicketSense/frontend/components/SlaMatrix.jsx`
- [API client](https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/frontend/lib/api-client.js): `TicketSense/frontend/lib/api-client.js`

### Inference service

- [FastAPI service](https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/backend/api/index.py): `TicketSense/backend/api/index.py`
- [Text cleaning](https://github.com/hananahmed07/customer-support-project/blob/main/preprocessing.py): `preprocessing.py`

### Classifier assets

- [Trained pipeline](https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/backend/artifacts/bestmodel.pkl): `TicketSense/backend/artifacts/bestmodel.pkl`
- [Intent metadata](https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/backend/artifacts/intent_metadata.json): `TicketSense/backend/artifacts/intent_metadata.json`
- [Word2Vec transformer](https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/backend/vectorizers.py): `TicketSense/backend/vectorizers.py`

### Routing reference

- [Intent data](https://github.com/hananahmed07/customer-support-project/blob/main/TicketSense/frontend/lib/intents-data.js): `TicketSense/frontend/lib/intents-data.js`

### Other components

- **Support agent**
- **Classification result**

## Connections

- Support agent → App workspace: uses (evidence: `TicketSense/frontend/app/page.jsx`)
- App workspace → Live classifier: renders (evidence: `TicketSense/frontend/app/page.jsx`)
- App workspace → Batch triage: renders (evidence: `TicketSense/frontend/app/page.jsx`)
- App workspace → Dashboard overview: renders (evidence: `TicketSense/frontend/app/page.jsx`)
- App workspace → Intent catalog: renders (evidence: `TicketSense/frontend/app/page.jsx`)
- App workspace → SLA matrix: renders (evidence: `TicketSense/frontend/app/page.jsx`)
- Live classifier → API client: classifies via (evidence: `TicketSense/frontend/components/LiveClassifier.jsx`)
- Batch triage → API client: submits batch (evidence: `TicketSense/frontend/components/BatchTriage.jsx`)
- API client → FastAPI service: HTTP requests (evidence: `TicketSense/frontend/lib/api-client.js`)
- FastAPI service → Text cleaning: cleans text (evidence: `TicketSense/backend/api/index.py`)
- FastAPI service → Trained pipeline: loads pipeline (evidence: `README.md`)
- Trained pipeline → Word2Vec transformer: uses transformer (evidence: `README.md`)
- FastAPI service → Intent metadata: loads metadata (evidence: `README.md`)
- FastAPI service → Classification result: returns predictions (evidence: `TicketSense/backend/api/index.py`)
- Dashboard overview → Intent data: reads metrics (evidence: `TicketSense/frontend/components/DashboardOverview.jsx`)
- Benchmark metrics → Intent data: reads benchmarks (evidence: `TicketSense/frontend/components/BenchmarkMetrics.jsx`)
- Intent catalog → Intent data: reads catalog (evidence: `TicketSense/frontend/components/IntentCatalog.jsx`)
- SLA matrix → Intent data: reads routing (evidence: `TicketSense/frontend/components/SlaMatrix.jsx`)
- Classification result → Support agent: shows result
