A lightweight AI-powered ticket management system that receives operational requests, classifies them using OpenAI, and tracks their status.
┌─────────────┐ ┌─────────────┐ ┌──────────────┐
│ React SPA │────▶│ Express API │────▶│ PostgreSQL │
│ (Vite/TS) │ │ (Node/TS) │ │ │
└─────────────┘ └──────┬───────┘ └──────────────┘
│
┌──────▼───────┐
│ OpenAI API │
│ (GPT-3.5) │
└──────────────┘
- Frontend: React 18 + TypeScript + Vite, served via Nginx in production
- Backend: Express + TypeScript, Prisma ORM
- Database: PostgreSQL 16
- AI: OpenAI GPT-3.5-turbo for ticket classification (category, priority, summary)
- Containerization: Docker Compose (3 services)
When a ticket is created, the backend sends the request text to OpenAI's GPT-3.5-turbo API. The model classifies the ticket into:
- Category: Finance, Legal, Procurement, or Operations
- Priority: High, Medium, or Low
- Summary: A one-sentence summary of the request
This happens automatically on ticket creation. If the API key is missing or the call fails, the ticket is still created without classification.
- Docker & Docker Compose
- An OpenAI API key
- Clone the repository:
git clone <repo-url>
cd ai-ticket-workspace- Create your
.envfile:
cp .env.example .env
# Edit .env and add your OpenAI API key- Run the application:
docker compose up --build- Open http://localhost:3000 in your browser.
- ✅ Create tickets with customer name, request text, and optional attachment URL
- ✅ Automatic AI classification (category, priority, summary) via OpenAI
- ✅ Dashboard with all tickets, status, category, priority, timestamps
- ✅ Ticket detail view with status update, owner assignment, and comments
- ✅ Fully containerized with Docker Compose
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/tickets | List all tickets |
| GET | /api/tickets/:id | Get ticket detail |
| POST | /api/tickets | Create ticket (triggers AI) |
| PATCH | /api/tickets/:id | Update status/owner |
| POST | /api/tickets/:id/comments | Add comment |
- Frontend: React 18, TypeScript, Vite, React Router
- Backend: Node.js, Express, TypeScript, Prisma
- Database: PostgreSQL 16
- AI: OpenAI API (GPT-3.5-turbo)
- Infrastructure: Docker, Docker Compose, Nginx