Skip to content

MorettiGS/SupportTicketCategorization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SupportTicketCategorization

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.


Table of contents


Purpose

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.


Features

  • 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 from frontend/public/,
    • sends tickets to backend API route /analyze,
    • shows results below input,
    • filters by category and priority,
    • sorting (subject, category, requester, priority).
  • Dockerfile for backend & frontend + docker-compose.yml to run everything.

Architecture

  • 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 → backend http://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.


Prerequisites

  • 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).

Running locally

Docker-compose (project root)

  docker-compose up --build

Usage

  1. Start both the backend and frontend as described above.
  2. Open the frontend in your browser at http://localhost:3000 or http://localhost:5173.
  3. Ensure the backend (http://localhost:5000) is running before analyzing tickets.
  4. Place your test data in the frontend/src/tickets.json file. A sample is already provided.
  5. 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published