An intelligent, end-to-end support ticket classification and routing platform. SmartDesk Router leverages Natural Language Processing (NLP) to parse employee requests, automatically categorize their priority, and route technical issues to the appropriate internal teams, complete with a closed-loop feedback mechanism for model corrections.
A clean, streamlined employee ticket entry form built with a premium Ocean Cyan theme.

Once submitted, the query is analyzed in real time. The platform displays the predicted priority, assigns a routing team (or skips for awareness tickets), and presents options to accept or correct the output.

If the model's prediction is inaccurate, employees can submit corrected tags. The dropdown fields implement dynamic conditional validation so team selection is only required for technical routing paths.

The diagram below details the components of the SmartDesk Router and how they interact:
graph TD
subgraph Client [React Frontend - Port 3000]
UI[Interactive UI App]
Theme[Ocean Cyan Styles]
Feed[Feedback Form]
end
subgraph Server [Flask API - Port 5000]
API[runner.py Controller]
P_Vec[Priority TF-IDF Vectorizer]
P_Clf[Priority Logistic Regression Classifier]
T_Vec[Team TF-IDF Vectorizer]
T_Clf[Team Logistic Regression Classifier]
end
subgraph Database [Flat-File Storage]
T_CSV[(sr_tickets.csv - Training Data)]
S_CSV[(submissions.csv - Query Logs)]
C_CSV[(corrections.csv - Feedback Logs)]
end
UI -->|POST /classify| API
Feed -->|POST /correction| API
API -->|Predict Priority| P_Clf
API -->|Predict Team| T_Clf
P_Clf -->|Read Binary| P_Vec
T_Clf -->|Read Binary| T_Vec
API -->|Write log| S_CSV
API -->|Write correction| C_CSV
Here is the request-response lifecycle for a support query classification and correction:
sequenceDiagram
autonumber
actor Employee
participant UI as React Frontend
participant API as Flask Backend
participant ML as ML Engine (scikit-learn)
participant CSV as CSV Logs
Employee->>UI: Input query and click 'Classify SR'
UI->>API: POST /classify { name, empId, query, file }
API->>ML: Run text through Priority & Team Vectorizers
ML-->>API: Return standardized predictions
API->>CSV: Append transaction to submissions.csv
API-->>UI: Respond with predictions - JSON
UI-->>Employee: Display Priority & Team routing output
alt Classification is Incorrect
Employee->>UI: Click 'Yes, Correct It' & select true values
UI->>API: POST /correction { name, empId, query, correctedPriority, correctedTeam }
API->>CSV: Append record to corrections.csv
API-->>UI: Respond with 200 OK - Success
UI-->>Employee: Show confirmation toast
end
SmartDesk-Support-Router/
├── classifiers/ # Machine Learning Engine & Backend API
│ ├── runner.py # Flask API entry point and CLI prediction tool
│ ├── sr_classification.py # ML Model training and evaluation script
│ └── text_utils.py # Preprocessing utilities (stopwords, parsing)
├── data/ # Data storage directory
│ ├── sr_tickets.csv # Primary baseline training dataset
│ ├── submissions.csv # Log of all incoming query classifications
│ └── corrections.csv # Closed-loop user feedback correction log
├── diagrams/ # High-level architecture visual assets
│ └── diagram.png
├── frontend/ # Interactive web application
│ ├── src/
│ │ ├── App.js # Main React dashboard and form validation logic
│ │ ├── App.css # View layout, shadows, and glow animations
│ │ ├── index.js # React bootstrapping index
│ │ └── index.css # Core CSS variables (Ocean Cyan theme)
│ └── package.json
├── models/ # Serialized ML model storage (generated during training)
│ ├── priority_classifier.joblib
│ ├── priority_vectorizer.joblib
│ ├── team_classifier.joblib
│ └── team_vectorizer.joblib
├── screenshots/ # Dashboard walkthrough images
│ ├── dashboard_clean.png
│ ├── classification_result.png
│ └── correction_form.png
└── requirements.txt # Python backend dependencies
- Python:
3.8+ - Node.js:
16.x+(withnpm)
First, navigate to the root directory of the repository and set up a virtual environment:
# Create virtual environment
python -m venv venv
# Activate virtual environment
# On Windows:
.\venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txtNavigate to the frontend directory and install client packages:
cd frontend
npm installIf you want to train the models from scratch or retrain them after merging feedback, run the training pipeline:
cd classifiers
python sr_classification.pyThis script reads data/sr_tickets.csv, normalizes the categories, filters missing labels, fits tf-idf vectorizers, trains Logistic Regression models, and saves the binary assets into the models/ directory.
Start the Flask backend server on http://127.0.0.1:5000:
cd classifiers
python runner.py apiStart the React development server:
cd frontend
npm startThis automatically compiles and opens the browser to http://localhost:3000.
As support requests are routed, employees submit corrections for misclassified tickets. These corrections are recorded in data/corrections.csv. To close the loop:
- Merge the rows from
data/corrections.csvback into the primary training datasetdata/sr_tickets.csv. - Clean or drop duplicates.
- Run
python sr_classification.pyto retrain and update your models. - Restart the API server to apply the updated classifier logic seamlessly..