How hasiniravula/ticket-triage-backend works
SmartDesk AI is a customer-support ticket triage service. A customer submits a subject and body to the API; the predictor assigns a queue and priority, estimates whether human review is needed, and the API saves the open ticket. Staff can list or retrieve tickets, record a final reviewed decision, and view ticket analytics through the dashboard/API. The source excerpts show the API-to-predictor and API-to-database calls; the model artifact files are present in the tree, but their internals and the frontend behavior were not inspected.
Main entry points: main.py FastAPI endpoints · predictor.py Ticket prediction · index.html Dashboard UI · database.py Database sessions
Components 15
API and dashboard
- Dashboard UI
index.html - FastAPI endpoints
main.py - Request schemas
schemas.py
Ticket triage
- Ticket prediction
predictor.py - Queue classifier
models/queue_model.joblib - Queue vectorizer
models/queue_tfidf_vectorizer.joblib - Priority classifier
models/priority_model.joblib - Priority vectorizer
models/priority_tfidf_vectorizer.joblib
Ticket records
- Ticket ORM model
models.py - Database sessions
database.py - SQLite ticket store
smartdesk.db
Review and analytics
- Ticket review
main.py - Ticket analytics
main.py
Other components
- Customer
- Support staff
Connections 15
- Customer → Dashboard UI: opens
- Customer → FastAPI endpoints: submits ticket
main.py - Support staff → FastAPI endpoints: reviews or queries
main.py - Dashboard UI → FastAPI endpoints: uses API
- FastAPI endpoints → Request schemas: validates input
main.py - FastAPI endpoints → Ticket prediction: predicts ticket
main.py - Ticket prediction → Queue vectorizer: vectorizes text
predictor.py - Ticket prediction → Queue classifier: classifies queue
predictor.py - Ticket prediction → Priority vectorizer: vectorizes text
predictor.py - Ticket prediction → Priority classifier: classifies priority
predictor.py - FastAPI endpoints → Ticket ORM model: creates and queries
main.py - FastAPI endpoints → Database sessions: uses session
main.py - Database sessions → SQLite ticket store: connects to
database.py - FastAPI endpoints → Ticket review: routes review
main.py - FastAPI endpoints → Ticket analytics: routes analytics
main.py