AI-powered complaint resolution bot that detects customer emotion, classifies urgency, and resolves or escalates support tickets in real time.
Built for the FlowZint AI Hackathon 2026 — Customer Care / Support Chat Bot category.
🔗 Live Demo: complaint-resolution-bot-production-0f06.up.railway.app 📦 Repo: github.com/ruhelamahi7-code/complaint-resolution-bot
Customer support today is slow and impersonal. Customers wait hours for a reply, repeat the same issue to multiple agents, and have no visibility into whether their complaint is being taken seriously. Support teams have no easy way to prioritise tickets until an agent manually reads each one — by which time frustrated customers have already churned.
ResolvBot reads every incoming complaint, classifies the customer's emotional state (Calm / Frustrated / Angry) and urgency (Low / Medium / High / Critical) using Google Gemini, and either:
- Auto-resolves routine issues with a clear, empathetic, step-by-step response, or
- Escalates high-urgency / angry complaints immediately to a human agent, with full conversation context so the customer never repeats themselves.
Every interaction feeds a live analytics dashboard — resolution rate, escalation trends, and sentiment breakdown update in real time after every single chat message.
| Feature | Description |
|---|---|
| 💬 Real-time AI chat | Sentiment + urgency tags shown inline on every bot response |
| 🚨 Automatic escalation | Critical/angry complaints flagged and routed to human agents instantly |
| 🎫 Ticket system | Every conversation saved as a ticket, filterable by All / Pending / Escalated / Resolved |
| 📊 Live analytics | Total complaints, resolution rate, urgency chart, sentiment breakdown — all live, not mock data |
| 🛡️ Graceful fallback | If AI provider is rate-limited, bot responds with a friendly message instead of breaking |
| Layer | Technology |
|---|---|
| Frontend | React (Vite), Tailwind CSS |
| Backend | Node.js, Express |
| AI | Google Gemini (via OpenRouter API) |
| Analytics persistence | JSON-backed stats store (server-side) |
| Ticket persistence | localStorage (client-side) |
| Deployment | Railway — single combined service (Express serves API + built frontend from same origin) |
ResolvBot runs as a single Express service — no CORS needed, one URL for everything:
Browser
│
├── GET / → serves built React app (frontend/dist)
├── POST /api/chat → Gemini analysis → { botResponse, sentiment, urgency, escalate }
│ (also records interaction to statsStore)
└── GET /api/analytics → { total, resolved, escalated, pending,
resolutionRate, urgencyCounts, sentimentCounts }
complaint-resolution-bot/
├── frontend/ # React + Vite app
│ └── src/
│ ├── components/ # MessageBubble, EscalationAlert, ChatBox
│ └── pages/ # ChatPage, DashboardPage
├── src/
│ ├── routes/ # chatRoutes.js, analyticsRoutes.js
│ └── services/ # geminiService.js, statsStore.js
├── server.js # Express entry point
└── .env.example # environment variable template
# 1. Clone
git clone https://github.com/ruhelamahi7-code/complaint-resolution-bot.git
cd complaint-resolution-bot
# 2. Install dependencies
npm install
cd frontend && npm install && cd ..
# 3. Set environment variables
cp .env.example .env
# Edit .env — add your OpenRouter API key as GEMINI_API_KEY
# 4. Start
npm start
# App runs at http://localhost:5000| Variable | Description |
|---|---|
PORT |
Port Express listens on (default: 5000) |
GEMINI_API_KEY |
OpenRouter API key (routes to Google Gemini models) |
Get a free OpenRouter key at openrouter.ai. No credit card required for free-tier models.
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/chat |
Send a complaint message, receive AI analysis |
GET |
/api/analytics |
Get live aggregate stats across all interactions |
- Mahi Ruhela — Frontend (React UI, ticket system, dashboard design)
- Ity Shree — Backend (Express API, Gemini integration, analytics engine)
Built with ❤️ for FlowZint AI Hackathon 2026.