This is a full-stack application that provides an intelligent, automated solution for managing technical support tickets. It uses an AI agent to analyze, prioritize, and assign new tickets to the most suitable support agent based on required skills.
- User Authentication: Secure JWT-based signup and login for users and agents/admins.
- Role-Based Access Control:
- Users: Can create, view, and track their own support tickets.
- Admins/Agents: Can view and manage all tickets in the system via a central dashboard.
- AI-Powered Ticket Analysis:
- When a ticket is created, an automated background workflow is triggered using Inngest.
- A Gemini AI agent analyzes the ticket to generate a summary, priority level, helpful technical notes, and a list of required skills.
- Intelligent Agent Assignment: The system automatically assigns tickets to an agent whose skills match the ticket's needs.
- Email Notifications: Agents receive an email notification (tested via Mailtrap) when a new ticket is assigned to them.
- Ticket Management: View ticket details, including AI analysis, and update ticket status.
- Frontend: React, Vite, Tailwind CSS, react-router-dom, react-toastify
- Backend: Node.js, Express.js, Mongoose
- Database: MongoDB
- Authentication: JWT, bcrypt
- Background Workflows: Inngest
- AI: Google Gemini (
@inngest/agent-kit) - Email: Nodemailer, Mailtrap (for development)
- Node.js and npm
- MongoDB Atlas account (or a local MongoDB instance)
- Mailtrap account (for email testing)
- Google AI Studio API Key (for Gemini)
-
Clone the repository and navigate to the
backenddirectory:cd backend -
Install dependencies:
npm install
-
Create a
.envfile in thebackendroot and add the following variables:# Server PORT=5001 # MongoDB MONGO_URI=your_mongodb_connection_string # JWT JWT_SECRET=your_jwt_secret_key # Inngest (optional, for connecting to Inngest Cloud) INNGEST_EVENT_KEY= INNGEST_SIGNING_KEY= # Mailtrap MAIL_HOST=sandbox.smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=your_mailtrap_username MAIL_PASSWORD=your_mailtrap_password # Google Gemini GEMINI_API_KEY=your_gemini_api_key
-
Navigate to the
frontenddirectory:cd ../frontend -
Install dependencies:
npm install
-
Create a
.envfile in thefrontendroot and add your backend server URL:VITE_SERVER_URL=http://localhost:5001
You need to run three processes simultaneously in separate terminals.
-
Start the Backend Server: (From the
backenddirectory)npm run dev
-
Start the Frontend Server: (From the
frontenddirectory)npm run dev
-
Start the Inngest Dev Server: (From the
backenddirectory) This command explicitly connects the dev server to your backend API.npx inngest-cli dev -u http://localhost:5001/api/inngest
- Your application will be running at
http://localhost:5173(or your Vite port). - The Inngest Dev Server dashboard will be at
http://localhost:8288.