Prototype: React + TypeScript frontend + Flask Python backend that categorizes support tickets into frequent categories and assigns simple priority scores. The backend uses a local transformers
pipeline (with configurable MODEL_NAME
) and includes batching + caching to speed up inference. The frontend loads tickets.json
from frontend/public/
, sends it to the backend, and shows results with filters & sorting. The file is the initial state for the categorization, but can be altered in the frontend directly via an input field.
Help a support manager quickly understand recurring issues in a small batch (e.g., 50) of support tickets by:
- assigning a human-readable category from a fixed set,
- assigning a simple priority level (Low / Medium / High),
- providing a minimal web UI to inspect, filter, sort and explore results.
This repo is a prototype — intended to be simple to run locally and easy to extend.
- Zero-shot classification of tickets into categories (local
transformers
pipeline). - Priority detection based on keywords, internal flags and requester frequency.
- Batching and caching to improve throughput.
- React + TypeScript frontend:
- loads
tickets.json
fromfrontend/public/
, - sends tickets to backend API route
/analyze
, - shows results below input,
- filters by category and priority,
- sorting (subject, category, requester, priority).
- loads
- Dockerfile for backend & frontend +
docker-compose.yml
to run everything.
backend/
— Flask app exposing/analyze
and/health
. Loads model once at startup and performs batched classification.frontend/
— Vite + React TypeScript app. UI for payload editing, filters, sorting, results table.- Communication: frontend
POST /analyze
→ backendhttp://localhost:5000/analyze
.
Note: This project does not use the Hugging Face Inference API. Classification is performed locally via
transformers.pipeline
or could be replaced with a rules-based classifier if you prefer no external model.
- Python 3.10+ (for backend)
- Node.js 16+ and npm (for frontend)
- Docker & docker-compose (optional for containers)
- Enough disk/ram to download + run the chosen
transformers
model (CPU inference is possible but model weights can be large).
docker-compose up --build
- Start both the backend and frontend as described above.
- Open the frontend in your browser at
http://localhost:3000
orhttp://localhost:5173
. - Ensure the backend (
http://localhost:5000
) is running before analyzing tickets. - Place your test data in the
frontend/src/tickets.json
file. A sample is already provided. - In the frontend UI:
- Use the input/upload area to load tickets.
- Click Analyze to send tickets to the backend.
- The categorized and prioritized results will appear in a table below the input.
- Use the filters (priority & category) above the results to refine which tickets are shown.
- Sort the table columns (subject, category, priority) to quickly find important tickets.
Example table view:
Subject | Category | Priority |
---|---|---|
"Payment not going through" | Payment Issues | High |
"Need refund ASAP" | Returns/Exchanges | High |
"Delivery is late" | Shipping Issues | Medium |