Skip to content

Repository files navigation

🤖 ResolvBot

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


🧩 The Problem

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.

💡 The Solution

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.

✨ Key Features

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

🏗️ Tech Stack

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)

🏛️ Architecture

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 }

📁 Project Structure

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

🚀 Running Locally

# 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

🔑 Environment Variables

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.

📊 Live API Endpoints

Method Endpoint Description
POST /api/chat Send a complaint message, receive AI analysis
GET /api/analytics Get live aggregate stats across all interactions

👥 Team

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages