Welcome to the Complaint Management System! ๐ This is a comprehensive full-stack application designed to streamline customer complaint handling, featuring real-time chat, sentiment analysis, automatic prioritization, and powerful analytics. Built with modern technologies for efficiency and scalability. ๐ช
- โจ Features
- ๐ ๏ธ Tech Stack
- ๐๏ธ Architecture
- ๐ Installation
- โ๏ธ Configuration
- ๐ฏ Usage
- ๐ API Endpoints
- ๐ Analytics & Insights
- ๐ค Contributing
- ๐ License
- ๐ฅ Authors
- ๐ Acknowledgments
- ๐ User Authentication: Secure login and registration with JWT tokens ๐
- ๐ Query Management: Create, update, and track customer complaints/queries ๐
- ๐ฌ Real-Time Chat: Instant messaging between customers and support agents ๐ฌ
- ๐ท๏ธ Auto-Tagging: Intelligent categorization of complaints using NLP ๐ค
- โก Auto-Priority: Smart prioritization based on content analysis ๐
- ๐ Duplicate Detection: Prevent redundant ticket creation ๐ต๏ธโโ๏ธ
- ๐ Sentiment Analysis: Gauge customer emotions and satisfaction levels โค๏ธ
- ๐ Analytics Dashboard: Comprehensive insights and reporting ๐
- ๐ฅ Multi-Tenant Support: Handle multiple companies/organizations ๐ข
- ๐ Role-Based Access: Different permissions for admins, agents, and customers ๐ค
- ๐ฑ Responsive Design: Works seamlessly on desktop, tablet, and mobile ๐ฑ
- ๐ Modern UI: Beautiful interface built with React and Tailwind CSS ๐จ
- โก Fast Performance: Optimized with Vite for lightning-fast development ๐
- ๐ญ Interactive Components: Smooth animations with Framer Motion โจ
- ๐ Data Visualization: Charts and graphs using Recharts ๐
- ๐ง AI-Powered Summarization: Automatic complaint summarization ๐ค
- ๐๏ธ Voice Input: Support for voice-based complaint submission ๐ค
- ๐ Real-Time Updates: Live status updates and notifications ๐
- ๐ Ticket History: Complete audit trail for all changes ๐
- ๐ฏ Smart Assignment: Intelligent agent assignment based on expertise ๐ฏ
- Node.js - Runtime environment ๐
- Express.js - Web framework ๐
- MongoDB - NoSQL database ๐
- Mongoose - ODM for MongoDB ๐
- Socket.io - Real-time communication โก
- JWT - Authentication ๐
- bcryptjs - Password hashing ๐ก๏ธ
- Natural - Natural language processing ๐ง
- Sentiment - Sentiment analysis ๐
- @xenova/transformers - AI/ML models ๐ค
- React - UI library โ๏ธ
- Vite - Build tool and dev server โก
- Tailwind CSS - Utility-first CSS framework ๐จ
- React Router - Client-side routing ๐ฃ๏ธ
- Axios - HTTP client ๐ก
- Socket.io-client - Real-time client ๐
- Recharts - Data visualization ๐
- Framer Motion - Animation library ๐ญ
- React Hot Toast - Notification system ๐
- Heroicons - Beautiful icons ๐ฏ
- ESLint - Code linting ๐
- Nodemon - Auto-restart for development ๐
- Vercel - Deployment platform โ๏ธ
๐ ComplaintManagement/
โโโ ๐ backend/ # Node.js/Express server
โ โโโ ๐ app.js # Main application file
โ โโโ ๐ controllers/ # Business logic
โ โโโ ๐ models/ # MongoDB schemas
โ โโโ ๐ routes/ # API endpoints
โ โโโ ๐ middleware/ # Custom middleware
โ โโโ ๐ utils/ # Utility functions
โ โโโ ๐ socket/ # Real-time chat logic
โโโ ๐ client1/ # React frontend
โ โโโ ๐ index.html # Entry point
โ โโโ ๐ src/
โ โ โโโ ๐ components/ # Reusable UI components
โ โ โโโ ๐ pages/ # Page components
โ โ โโโ ๐ context/ # React context providers
โ โ โโโ ๐ api/ # API service functions
โ โ โโโ ๐ socket/ # Socket client setup
โ โโโ ๐ vite.config.js # Vite configuration
โโโ ๐ README.md # Project documentation ๐
- Node.js (v16 or higher) ๐ข
- MongoDB (local or cloud instance) ๐
- npm or yarn ๐ฆ
-
Clone the repository ๐ฅ
git clone https://github.com/SHIVAM1422000/ComplaintManagment.git cd ComplaintManagment -
Navigate to backend directory ๐
cd backend -
Install dependencies ๐ฆ
npm install
-
Set up environment variables ๐ง Create a
.envfile in the backend directory:PORT=8000 MONGODB_URI=mongodb://localhost:27017/complaint_management JWT_SECRET=your_super_secret_jwt_key_here NODE_ENV=development
-
Start MongoDB ๐ Make sure MongoDB is running on your system.
-
Run the backend server ๐
npm run dev
The server will start on
http://localhost:8000๐
-
Open a new terminal and navigate to client directory ๐
cd ../client1 -
Install dependencies ๐ฆ
npm install
-
Start the development server โก
npm run dev
The app will be available at
http://localhost:5173๐
Configure the following environment variables in backend/.env:
| Variable | Description | Example |
|---|---|---|
PORT |
Server port | 8000 |
MONGODB_URI |
MongoDB connection string | mongodb://localhost:27017/complaint_management |
JWT_SECRET |
JWT signing secret | your_secret_key |
NODE_ENV |
Environment mode | development |
The application uses MongoDB. Make sure to:
- Install MongoDB locally or use a cloud service like MongoDB Atlas โ๏ธ
- Update the
MONGODB_URIin your.envfile - The app will automatically create collections as needed โจ
- Register/Login ๐
- Submit a Complaint ๐
- Fill out the complaint form
- Add details, priority, and attachments if needed
- Chat with Support ๐ฌ
- Use the real-time chat feature
- Get instant responses from support agents
- Track Progress ๐
- Monitor complaint status
- View history and updates
- Login to Dashboard ๐
- View Inbox ๐ฌ
- See all assigned complaints
- Filter by status, priority, or tags
- Manage Tickets ๐ซ
- Update status and priority
- Assign to team members
- Add internal notes
- Chat with Customers ๐ฌ
- Respond to customer messages
- Provide solutions and updates
- Analyze Performance ๐
- View analytics and reports
- Track resolution times and satisfaction
- User Management ๐ฅ
- Add/remove users
- Assign roles and permissions
- System Configuration โ๏ธ
- Configure auto-tagging rules
- Set up priority algorithms
- Analytics & Reporting ๐
- Comprehensive dashboards
- Export reports and insights
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/profile- Get user profile
GET /api/queries- Get all queriesPOST /api/queries- Create new queryGET /api/queries/:id- Get specific queryPUT /api/queries/:id- Update queryDELETE /api/queries/:id- Delete query
GET /api/analytics/sentiment- Sentiment analysis dataGET /api/analytics/trends- Trend analysisGET /api/analytics/summary- General summary
- WebSocket events handled via Socket.io
- Real-time messaging between users
The system provides comprehensive analytics including:
- ๐ Sentiment Trends: Track customer satisfaction over time
- ๐ฏ Resolution Metrics: Average resolution times and success rates
- ๐ท๏ธ Category Analysis: Most common complaint types
- ๐ฅ Agent Performance: Individual and team productivity metrics
- ๐ Dashboard Widgets: Customizable visual insights
We love contributions! ๐ Here's how you can help:
- Fork the repository ๐ด
- Create a feature branch ๐ฟ
git checkout -b feature/amazing-feature
- Commit your changes ๐พ
git commit -m 'Add amazing feature โจ' - Push to the branch ๐
git push origin feature/amazing-feature
- Open a Pull Request ๐
- Follow ESLint rules ๐
- Write meaningful commit messages ๐ฌ
- Add tests for new features ๐งช
- Update documentation ๐
- Use conventional commit format ๐
This project is licensed under the ISC License - see the LICENSE file for details. ๐
- Shivam Ojha ๐จโ๐ป
- Initial work - SHIVAM1422000
- React Team for the amazing framework โ๏ธ
- Tailwind CSS for the utility-first approach ๐จ
- Socket.io for real-time communication โก
- MongoDB for the flexible database ๐
- Open source community for inspiration and tools ๐
Made with โค๏ธ by Shivam Ojha
โญ Star this repo if you found it helpful! ๐
๐ง Contact: [Your Email Here] | ๐ LinkedIn: [Your LinkedIn]
๐ฏ Live Demo: [Add your deployed app link here]
๐ Report Issues: GitHub Issues
๐ Documentation: [Add docs link if available]