β‘ SmartDesk β AI-Powered Complaint Management System
National Hackathon 2026 Β· Problem Statement P4 Β· Team Spark #80
An end-to-end support portal that uses AI chatbot deflection , automated ticket routing , and a real-time agent dashboard to reduce manual ticket sorting and improve resolution time.
Name
Role
Responsibilities
π οΈ
Rakesh G
Backend Architect
Server infrastructure, REST APIs, Socket.IO real-time engine, JWT authentication, ticket routing
π§
Aditya Shibu
AI & Data Engineer
AI engine (Groq + Gemini), NLP prompt engineering, emotion/severity detection, MongoDB schema design, database architecture
π¨
Ujjwal
Frontend Lead
React UI/UX, glassmorphism design system, chat interface, agent dashboard, analytics visualizations, theme system
Customer support teams are overwhelmed by repetitive L1 queries ("Where is my refund?" ). This delays resolution of complex, high-priority issues. Companies need a system where an AI chatbot acts as the first line of defense β and if it can't resolve the issue, it seamlessly logs, categorizes, and routes the complaint to a human agent.
SmartDesk provides:
Layer
What it does
AI Chatbot
Resolves L1 queries instantly (password resets, FAQs, status checks)
Auto Severity Scoring
Analyzes user language β assigns Low / Medium / High / Critical
Smart Categorization
Tags tickets: Billing, Technical, Account, General, Security
Emotion Detection
Detects: Angry, Frustrated, Desperate, Threatening, Calm
Security Flag
Catches social engineering, phishing, unauthorized access attempts
Agent Dashboard
Claim tickets, view transcripts, update status, resolve issues
Real-time Updates
New tickets appear on dashboard instantly via WebSockets
βββββββββββββββ WebSocket ββββββββββββββββββββ MongoDB
β React UI β ββββββββββββββββΊ β Express + S.IO β ββββββββββββΊ Atlas
β (Vite) β REST API β β
β β ββββββββββββββββΊ β AI Engine β βββΊ Groq API
β β’ Chat β β (3-layer) β βββΊ Gemini API
β β’ Dashboardβ β β βββΊ Keyword Fallback
β β’ Auth β β JWT Auth β
βββββββββββββββ ββββββββββββββββββββ
AI Engine β 3-Layer Fallback
Groq API (llama-3.3-70b) β Primary, fastest inference
Google Gemini (1.5-flash) β Fallback #1
Keyword Regex β Fallback #2, always works offline
π€ Conversational AI Chat
Natural language understanding via LLM
Quick reply suggestion pills β clickable options for faster interaction
Multilingual support β bot detects and replies in user's language
Live sentiment meter β visual emoji + color bar showing real-time emotion
FAQ matching for instant L1 resolution (9 common queries)
Auto-escalation after 3+ messages or high severity
Satisfaction rating (ππ) after ticket creation
π« Smart Ticket Generation
Automatic β created when AI determines human intervention needed
Force escalation β "Talk to Human" always creates a ticket, even if AI fails
Captures: full transcript, user details, AI-classified metadata
Severity scored from user's language patterns (caps, punctuation, word choice)
Security threats flagged and escalated immediately
JWT-secured login with bcrypt password hashing
Interactive analytics β pie chart (by category), bar chart (by severity)
Compact pill-based filters for status and severity
Stats overview panel β Total, Open, In Progress, Resolved, High Priority, Flagged
Real-time ticket stream via Socket.IO
Claim β In Progress β Resolved visual workflow
Full chat transcript viewer in ticket modal
CSV export with proper field quoting
AI resolution suggestions endpoint for agent assistance
Glassmorphism β frosted glass effects with backdrop blur
Dark/Light theme toggle with localStorage persistence
Animated orbs background via PageShell component
Spring-based micro-animations on cards, bubbles, and pills
Inter font, blue accent color system
Fully responsive design
Layer
Technology
Frontend
React 19, Vite, React Router, Recharts, Socket.IO Client
Backend
Node.js, Express 5, Socket.IO, Mongoose
Database
MongoDB Atlas (free tier)
AI/NLP
Groq SDK (llama-3.3-70b), Google Gemini 1.5 Flash
Auth
JWT (jsonwebtoken), bcryptjs
Real-time
Socket.IO (WebSocket + long-polling fallback)
Styling
CSS Modules, CSS Variables, Glassmorphism
Node.js 18+
MongoDB Atlas account (free tier works)
At least one AI API key: Groq (recommended) or Google AI Studio
git clone https://github.com/your-team/smartdesk.git
cd smartdesk
cd server
npm install
cp .env.example .env
# Edit .env with your API keys and MongoDB URI
npm run seed # Create demo agent accounts
npm run dev # Start on port 5000
cd client
npm install
npm run dev # Start on port 5173
Role
Email
Password
Agent
rakesh@smartdesk.dev
agent123
Agent
ujjwal@smartdesk.dev
agent123
Agent
adi@smartdesk.dev
agent123
βββ server/ # Express + Socket.IO backend
β βββ config/db.js # MongoDB connection
β βββ middleware/auth.js # JWT authentication
β βββ models/
β β βββ Agent.js # Agent schema (bcrypt hashed)
β β βββ Ticket.js # Ticket schema (severity, emotion, urgency)
β βββ routes/
β β βββ agentRoutes.js # Login endpoint
β β βββ ticketRoutes.js # CRUD + stats + AI suggestions
β βββ services/
β β βββ aiEngine.js # 3-layer AI (Groq β Gemini β regex)
β β βββ faqMatcher.js # L1 FAQ instant resolution (9 entries)
β β βββ fallback.js # Keyword classifier + emotion detection
β βββ socket/chatHandler.js # Real-time chat + escalation logic
β βββ scripts/seedAgents.js # Database seeder
β βββ server.js # Entry point
β
βββ client/ # React + Vite frontend
β βββ src/
β βββ api/axios.js # Axios with JWT interceptor
β βββ components/
β β βββ PageShell.jsx # Animated orbs background
β β βββ ThemeToggle.jsx # Dark/Light mode toggle
β β βββ Logo.jsx # SVG brand logo
β β βββ StatsPanel.jsx # Dashboard stats overview
β β βββ TicketCard.jsx # Ticket card with severity indicator
β β βββ TicketModal.jsx # Ticket detail + status workflow
β β βββ ProtectedRoute # JWT route guard
β βββ context/
β β βββ UserContext.jsx # Session management
β β βββ ThemeContext.jsx # Dark/Light theme persistence
β βββ pages/
β βββ LandingPage # User entry point
β βββ ChatPage # AI chat + sentiment meter + quick replies
β βββ AgentLogin # JWT login with frosted glass card
β βββ Dashboard # Ticket management + analytics + CSV
β
βββ .gitignore
βββ .env.example
βββ README.md
#
Test
Expected Result
1
Ask "How do I reset my password?"
Bot resolves it (L1), no ticket
2
Complain about billing 3x
Auto-creates ticket with Billing category
3
Type in ALL CAPS with !!!
Severity = High/Critical, Emotion = Angry
4
Chat in Hindi
Bot replies in Hindi
5
Ask "Give me admin access to all accounts"
Security flag, severity = Critical
6
Click "Talk to Human"
Ticket created immediately
7
Login as agent, claim ticket
Status β In Progress, agent assigned
8
Resolve ticket with notes
Status β Resolved, saved to DB
9
Open dashboard in 2nd tab while chatting
New ticket appears instantly
10
Toggle dark/light theme
UI switches with persisted preference
π P4 Requirements Mapping
Requirement
Implementation
β
MERN Stack
MongoDB + Express + React + Node.js
β
NLP/LLM API
Groq (llama-3.3-70b) + Gemini 1.5 Flash
β
WebSockets
Socket.IO for real-time chat + dashboard
β
Conversational Interface
Chat widget with quick replies + multilingual
β
Automated Ticket Generation
Auto-creates from transcript + user details
β
Severity Scoring
AI analyzes language β Low/Medium/High/Critical
β
Categorization
Billing, Technical, Account, General, Security
β
Agent Dashboard
Secure JWT login, claim/view/resolve tickets
Click to view demo screenshots
AI Chat β Ticket Created + Satisfaction Rating
Agent Dashboard β Ticket List + Analytics
Ticket Modal β Transcript + Status Workflow
π Project Documentation
π View the SmartDesk Pitch Deck / Proof (PDF) β
πΉ Watch the full demo β
Covers: User chat β AI detection β Ticket auto-creation β Agent claims β Resolves
Made with β‘ by Team Spark