A full-stack support ticket application with LLM-assisted ticket classification.
git clone https://github.com/shubh100802/Support-Ticket-System.git
cd Support-Ticket-SystemCreate .env in project root:
LLM_API_KEY=your_api_key
LLM_MODEL=Run with Docker:
docker compose up --buildOr follow the local setup steps in the Run Locally (Without Docker) section below.
- Create support tickets
- Auto-suggest
categoryandpriorityfrom description using an LLM - Override suggested values before submission
- List tickets with combined filters and search
- Update ticket status
- View aggregated ticket statistics
- Backend: Django + Django REST Framework
- Database: PostgreSQL
- Frontend: React (Vite)
- LLM: OpenAI Chat Completions API
- Containers: Docker + Docker Compose
backend/ Django API
frontend/ React app
docker-compose.yml Multi-service setup
- Docker Desktop (or Docker Engine + Compose plugin)
- Optional for local non-Docker run:
- Python 3.11+
- Node.js 20+
- npm 10+
- PostgreSQL 14+
- Build and start services:
docker compose up --build- Open:
- Frontend:
http://localhost:5173 - Backend API:
http://localhost:8000/api - Django admin:
http://localhost:8000/admin
To stop services:
docker compose downTo stop and remove DB volume:
docker compose down -vFrom the project root:
cd backend
python -m venv .venvActivate virtual environment:
- macOS/Linux:
source .venv/bin/activate- Windows PowerShell:
.venv\Scripts\Activate.ps1Install dependencies and run migrations:
pip install -r requirements.txt
python manage.py migrate
python manage.py runserverIn a new terminal:
cd frontend
npm install
npm run devBackend reads PostgreSQL from environment variables in backend/.env.example.
If those variables are not set, it falls back to SQLite for quick local testing.
POST /api/tickets/GET /api/tickets/- Query params:
category,priority,status,search
- Query params:
PATCH /api/tickets/<id>/GET /api/tickets/stats/POST /api/tickets/classify/
Classify request:
{
"description": "Card charged twice this month"
}Classify response:
{
"suggested_category": "billing",
"suggested_priority": "high"
}Fallback response when LLM is unavailable:
{
"suggested_category": null,
"suggested_priority": null
}- Stats endpoint uses database-level aggregation.
- Ticket field constraints are enforced at DB level.
- CORS is configured for local frontend development on
localhost:5173.