Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Ticket Workspace

A lightweight AI-powered ticket management system that receives operational requests, classifies them using OpenAI, and tracks their status.

Architecture

┌─────────────┐     ┌─────────────┐     ┌──────────────┐
│  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)

AI Usage

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.

Quick Start

Prerequisites

  • Docker & Docker Compose
  • An OpenAI API key

Setup

  1. Clone the repository:
git clone <repo-url>
cd ai-ticket-workspace
  1. Create your .env file:
cp .env.example .env
# Edit .env and add your OpenAI API key
  1. Run the application:
docker compose up --build
  1. Open http://localhost:3000 in your browser.

Features

  • ✅ 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

API Endpoints

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

Tech Stack

  • 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages