An intelligent support ticket platform leveraging Google's Gemini AI to analyze tickets, determine priority levels, identify required skills, and streamline support workflows.
-
π User Authentication & Security
- Secure signup and login with JWT-based authorization
- Password encryption with bcrypt
- Protected API endpoints and route guards
-
π€ Role-Based Access Control
- Custom permissions for users, support agents, and administrators
- Resource-level access restrictions
- Conditional UI rendering based on permissions
-
π€ AI-Powered Analysis
- Automatic ticket categorization and summarization
- Smart priority assignment (Low, Medium, High)
- Technical skill identification for better routing
- Context-aware ticket insights
-
π« Complete Ticket Management
- Create, view, and track support tickets
- Real-time status updates
- Detailed ticket history
- Markdown support for rich formatting
-
π¬ Smart Notifications
- Automated email alerts for account creation
- Assignment notifications for support agents
- Status change updates
- Configurable notification preferences
-
β‘ Event-Driven Architecture
- Background processing with Inngest
- Reliable job execution
- Scalable event handling
- Non-blocking operations
| Component | Technologies |
|---|---|
| Backend | Node.js, Express.js |
| Frontend | React, React Router, TailwindCSS, DaisyUI |
| Database | MongoDB, Mongoose ODM |
| Authentication | JWT, bcrypt |
| AI Engine | Google Gemini 1.5 via @inngest/agent-kit |
| Email Service | Nodemailer, Mailtrap |
| Job Processing | Inngest |
- Node.js 16+ and npm
- MongoDB database
- Google AI API key for Gemini
-
Clone the repository
git clone https://github.com/yourusername/ai-ticket-assistance.git cd ai-ticket-assistance -
Install dependencies for both backend and frontend
# Install backend dependencies cd ai-ticket-backend npm install # Install frontend dependencies cd ../ai-ticket-frontend npm install
-
Create environment files
# Backend .env file (in ai-ticket-backend folder) MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_secure_jwt_secret MAILTRAP_SMTP_HOST=your_smtp_host MAILTRAP_SMTP_PORT=your_smtp_port MAILTRAP_SMTP_USER=your_smtp_user MAILTRAP_SMTP_PASS=your_smtp_password # Frontend .env file (in ai-ticket-frontend folder) VITE_SERVER_URL=http://localhost:5000/api
-
Start the services
# Run backend server (in ai-ticket-backend folder) npm run dev # Run Inngest for background jobs (in a new terminal, ai-ticket-backend folder) npm run inngest-dev # Run frontend dev server (in a new terminal, ai-ticket-frontend folder) npm run dev
-
Access the application
- Frontend: http://localhost:5173
- Backend API: http://localhost:5000/api
- Inngest Dashboard: http://localhost:8288
| Variable | Description |
|---|---|
MONGODB_URI |
MongoDB connection string |
JWT_SECRET |
Secret key for JWT token generation |
MAILTRAP_SMTP_HOST |
SMTP host for email delivery |
MAILTRAP_SMTP_PORT |
SMTP port |
MAILTRAP_SMTP_USER |
SMTP username |
MAILTRAP_SMTP_PASS |
SMTP password |
| Variable | Description |
|---|---|
VITE_SERVER_URL |
Backend API URL (e.g., http://localhost:5000/api) |
βββββββββββββββββββ βββββββββββββββββ ββββββββββββββββββ
β β β β β β
β React Frontend βββββββΊβ Express API βββββββΊβ MongoDB β
β β β β β β
βββββββββββββββββββ βββββββββ¬ββββββββ ββββββββββββββββββ
β²
β
βΌ
βββββββββββββββββββ βββββββββββββββββ ββββββββββββββββββ
β β β β β β
β Inngest βββββββΊβ Gemini AI β β Email Service β
β β β βββββββΊβ β
βββββββββββββββββββ βββββββββββββββββ ββββββββββββββββββ
POST /api/auth/signup- Register a new userPOST /api/auth/login- User loginPOST /api/auth/logout- User logoutGET /api/auth/users- Get all users (admin only)POST /api/auth/update-user- Update user details (admin only)
GET /api/tickets- Get all ticketsPOST /api/tickets- Create a new ticketGET /api/tickets/:id- Get ticket by IDPUT /api/tickets/:id- Update a ticketDELETE /api/tickets/:id- Delete a ticket
| Role | Permissions |
|---|---|
| User | Create and view own tickets |
| Moderator | View and update assigned tickets |
| Admin | Full access to all tickets and user management |
- User creates a support ticket
- Inngest triggers an AI analysis function
- Gemini AI analyzes the ticket content to determine:
- Priority level
- Required technical skills
- Summary and key points
- System assigns ticket to the most appropriate moderator based on skills
- Email notifications sent to both user and assigned moderator
- Moderator addresses the ticket and updates status
- User receives notification on ticket resolution
- Add real-time chat functionality
- Implement service level agreement (SLA) tracking
- Create a comprehensive dashboard for analytics
- Add support for file attachments on tickets
- Implement a knowledge base integration
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini AI for powering the intelligent ticket analysis
- Inngest for event-driven background processing
- React and TailwindCSS for the frontend
- Express.js for the backend API
- MongoDB for the database
| Variable | Description |
|---|---|
MONGODB_URI |
MongoDB connection string |
JWT_SECRET |
Secret key for JWT token generation |
MAILTRAP_SMTP_HOST |
SMTP host for email delivery |
MAILTRAP_SMTP_PORT |
SMTP port |
MAILTRAP_SMTP_USER |
SMTP username |
MAILTRAP_SMTP_PASS |
SMTP password |
| Variable | Description |
|---|---|
VITE_SERVER_URL |
Backend API URL (e.g., http://localhost:5000/api) |
βββββββββββββββββββ βββββββββββββββββ ββββββββββββββββββ
β β β β β β
β React Frontend βββββββΊβ Express API βββββββΊβ MongoDB β
β β β β β β
βββββββββββββββββββ βββββββββ¬ββββββββ ββββββββββββββββββ
β²
β
βΌ
βββββββββββββββββββ βββββββββββββββββ ββββββββββββββββββ
β β β β β β
β Inngest βββββββΊβ Gemini AI β β Email Service β
β β β βββββββΊβ β
βββββββββββββββββββ βββββββββββββββββ ββββββββββββββββββ
POST /api/auth/signup- Register a new userPOST /api/auth/login- User loginPOST /api/auth/logout- User logoutGET /api/auth/users- Get all users (admin only)POST /api/auth/update-user- Update user details (admin only)
GET /api/tickets- Get all ticketsPOST /api/tickets- Create a new ticketGET /api/tickets/:id- Get ticket by IDPUT /api/tickets/:id- Update a ticketDELETE /api/tickets/:id- Delete a ticket
| Role | Permissions |
|---|---|
| User | Create and view own tickets |
| Moderator | View and update assigned tickets |
| Admin | Full access to all tickets and user management |
- User creates a support ticket
- Inngest triggers an AI analysis function
- Gemini AI analyzes the ticket content to determine:
- Priority level
- Required technical skills
- Summary and key points
- System assigns ticket to the most appropriate moderator based on skills
- Email notifications sent to both user and assigned moderator
- Moderator addresses the ticket and updates status
- User receives notification on ticket resolution
- Add real-time chat functionality
- Implement service level agreement (SLA) tracking
- Create a comprehensive dashboard for analytics
- Add support for file attachments on tickets
- Implement a knowledge base integration
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini AI for powering the intelligent ticket analysis
- Inngest for event-driven background processing
- React and TailwindCSS for the frontend
- Express.js for the backend API
- MongoDB for the database
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
MAILTRAP_SMTP_HOST=sandbox.smtp.mailtrap.io
MAILTRAP_SMTP_PORT=2525
MAILTRAP_SMTP_USER=your_mailtrap_username
MAILTRAP_SMTP_PASSWORD=your_mailtrap_password
APP_URL=http://localhost:3000
GEMINI_API_KEY=your_gemini_api_key
POST /api/auth/signup- Create a new user accountPOST /api/auth/login- Authenticate a userPOST /api/auth/logout- Logout a user
GET /api/auth/users- Get all users (admin only)POST /api/auth/update-user- Update user details (admin only)
POST /api/tickets- Create a new ticketGET /api/tickets- Get all ticketsGET /api/tickets/:id- Get a specific ticket
ISC