SHIVAM1422000/ComplaintManagment

Live Link to Website

โ˜… 0Forks 0JavaScriptGitHub โ†—Compare

Project website โ†—

reactsocket

README

๐Ÿš€ Query360: An AI Complaint Management System ๐Ÿ“‹

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. ๐Ÿ’ช

๐Ÿ“– Table of Contents

โœจ Features

๐ŸŽฏ Core Functionality

  • ๐Ÿ” 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 ๐Ÿ‘ค

๐ŸŽจ User Interface

  • ๐Ÿ“ฑ 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 ๐Ÿ“ˆ

๐Ÿ”ง Advanced Features

  • ๐Ÿง  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 ๐ŸŽฏ

๐Ÿ› ๏ธ Tech Stack

Backend ๐Ÿ–ฅ๏ธ

  • 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 ๐Ÿค–

Frontend ๐Ÿ’ป

  • 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 ๐ŸŽฏ

DevOps & Tools ๐Ÿ› ๏ธ

  • ESLint - Code linting ๐Ÿ”
  • Nodemon - Auto-restart for development ๐Ÿ”„
  • Vercel - Deployment platform โ˜๏ธ

๐Ÿ—๏ธ Architecture

๐Ÿ“ 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 ๐Ÿ“–

๐Ÿš€ Installation

Prerequisites ๐Ÿ“‹

  • Node.js (v16 or higher) ๐ŸŸข
  • MongoDB (local or cloud instance) ๐Ÿƒ
  • npm or yarn ๐Ÿ“ฆ

Backend Setup ๐Ÿ–ฅ๏ธ

  1. Clone the repository ๐Ÿ“ฅ

    git clone https://github.com/SHIVAM1422000/ComplaintManagment.git
    cd ComplaintManagment
  2. Navigate to backend directory ๐Ÿ“‚

    cd backend
  3. Install dependencies ๐Ÿ“ฆ

    npm install
  4. Set up environment variables ๐Ÿ”ง Create a .env file in the backend directory:

    PORT=8000
    MONGODB_URI=mongodb://localhost:27017/complaint_management
    JWT_SECRET=your_super_secret_jwt_key_here
    NODE_ENV=development
  5. Start MongoDB ๐Ÿƒ Make sure MongoDB is running on your system.

  6. Run the backend server ๐Ÿš€

    npm run dev

    The server will start on http://localhost:8000 ๐ŸŽ‰

Frontend Setup ๐Ÿ’ป

  1. Open a new terminal and navigate to client directory ๐Ÿ“‚

    cd ../client1
  2. Install dependencies ๐Ÿ“ฆ

    npm install
  3. Start the development server โšก

    npm run dev

    The app will be available at http://localhost:5173 ๐ŸŽŠ

โš™๏ธ Configuration

Environment Variables ๐Ÿ”

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

Database Setup ๐Ÿƒ

The application uses MongoDB. Make sure to:

  1. Install MongoDB locally or use a cloud service like MongoDB Atlas โ˜๏ธ
  2. Update the MONGODB_URI in your .env file
  3. The app will automatically create collections as needed โœจ

๐ŸŽฏ Usage

For Customers ๐Ÿ‘ฅ

  1. Register/Login ๐Ÿ”
  2. Submit a Complaint ๐Ÿ“
    • Fill out the complaint form
    • Add details, priority, and attachments if needed
  3. Chat with Support ๐Ÿ’ฌ
    • Use the real-time chat feature
    • Get instant responses from support agents
  4. Track Progress ๐Ÿ“Š
    • Monitor complaint status
    • View history and updates

For Support Agents ๐Ÿ‘จโ€๐Ÿ’ผ

  1. Login to Dashboard ๐Ÿ“ˆ
  2. View Inbox ๐Ÿ“ฌ
    • See all assigned complaints
    • Filter by status, priority, or tags
  3. Manage Tickets ๐ŸŽซ
    • Update status and priority
    • Assign to team members
    • Add internal notes
  4. Chat with Customers ๐Ÿ’ฌ
    • Respond to customer messages
    • Provide solutions and updates
  5. Analyze Performance ๐Ÿ“Š
    • View analytics and reports
    • Track resolution times and satisfaction

For Administrators ๐Ÿ‘‘

  1. User Management ๐Ÿ‘ฅ
    • Add/remove users
    • Assign roles and permissions
  2. System Configuration โš™๏ธ
    • Configure auto-tagging rules
    • Set up priority algorithms
  3. Analytics & Reporting ๐Ÿ“Š
    • Comprehensive dashboards
    • Export reports and insights

๐Ÿ”— API Endpoints

Authentication ๐Ÿ”

  • POST /api/auth/register - User registration
  • POST /api/auth/login - User login
  • GET /api/auth/profile - Get user profile

Queries/Complaints ๐Ÿ“‹

  • GET /api/queries - Get all queries
  • POST /api/queries - Create new query
  • GET /api/queries/:id - Get specific query
  • PUT /api/queries/:id - Update query
  • DELETE /api/queries/:id - Delete query

Analytics ๐Ÿ“Š

  • GET /api/analytics/sentiment - Sentiment analysis data
  • GET /api/analytics/trends - Trend analysis
  • GET /api/analytics/summary - General summary

Chat ๐Ÿ’ฌ

  • WebSocket events handled via Socket.io
  • Real-time messaging between users

๐Ÿ“Š Analytics & Insights

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

๐Ÿค Contributing

We love contributions! ๐ŸŽ‰ Here's how you can help:

  1. Fork the repository ๐Ÿด
  2. Create a feature branch ๐ŸŒฟ
    git checkout -b feature/amazing-feature
  3. Commit your changes ๐Ÿ’พ
    git commit -m 'Add amazing feature โœจ'
  4. Push to the branch ๐Ÿš€
    git push origin feature/amazing-feature
  5. Open a Pull Request ๐Ÿ“

Development Guidelines ๐Ÿ“

  • Follow ESLint rules ๐Ÿ”
  • Write meaningful commit messages ๐Ÿ’ฌ
  • Add tests for new features ๐Ÿงช
  • Update documentation ๐Ÿ“–
  • Use conventional commit format ๐Ÿ“

๐Ÿ“„ License

This project is licensed under the ISC License - see the LICENSE file for details. ๐Ÿ“œ

๐Ÿ‘ฅ Authors

  • Shivam Ojha ๐Ÿ‘จโ€๐Ÿ’ป

๐Ÿ™ Acknowledgments

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

Contributors

SHIVAM1422000

Issues