A full-stack web application for managing and analyzing driver feedback with intelligent sentiment analysis and comprehensive admin analytics.
RideX is a modern feedback management system designed for ride-sharing platforms. It enables users to submit detailed feedback about their drivers, while providing administrators with powerful analytics and insights through sentiment analysis of user comments.
- User Authentication - Secure JWT-based authentication with role-based access control (User, Driver, Admin)
- Multi-Dimensional Feedback - Rate drivers across multiple categories:
- Overall Rating
- Ride Quality
- Driving Behavior
- Cleanliness
- Punctuality (On Time)
- Intelligent Sentiment Analysis - Automatic text-based rating prediction from user comments
- Driver Scoring System - Automated driver performance scoring (0-100 scale) based on feedback
- Admin Dashboard - Comprehensive analytics including:
- Driver performance metrics
- Feedback trends and statistics
- Sentiment analysis (positive/negative comments)
- Average ratings and text scores
- Real-time Updates - Dynamic driver selection and feedback submission
- Responsive Design - Modern UI built with React and Tailwind CSS
- React 19.2.0 - Modern UI library
- React Router DOM 7.9.6 - Client-side routing
- Tailwind CSS 4.1.17 - Utility-first CSS framework
- Axios 1.13.2 - HTTP client for API requests
- Vite 7.2.4 - Fast build tool and dev server
- Node.js with Express 5.1.0 - Web application framework
- MongoDB with Mongoose 9.0.0 - NoSQL database and ODM
- JWT (jsonwebtoken 9.0.2) - Secure authentication
- bcrypt 6.0.0 - Password hashing
- CORS - Cross-origin resource sharing
- dotenv - Environment variable management
feedback_system/
βββ client/ # Frontend React application
β βββ src/
β β βββ pages/
β β β βββ LandingPage.jsx # Landing page
β β β βββ LoginPage.jsx # User login
β β β βββ SignupPage.jsx # User registration
β β β βββ Homepage.jsx # User feedback form
β β β βββ AdminHome.jsx # Admin dashboard
β β βββ utils/
β β β βββ axios.js # Axios configuration
β β βββ App.jsx # Main app component
β β βββ main.jsx # Entry point
β βββ package.json
β βββ vite.config.js
β
βββ server/ # Backend Node.js application
βββ controllers/
β βββ auth.controller.js # Authentication logic
β βββ feedback.controller.js # Feedback & driver logic
βββ models/
β βββ User.model.js # User schema
β βββ Feedback.model.js # Feedback schema
βββ routes/
β βββ auth.router.js # Auth routes
β βββ feedback.router.js # Feedback routes
βββ middlewares/
β βββ auth.js # JWT authentication middleware
βββ .env # Environment variables
βββ index.js # Server entry point
βββ package.json
- Node.js (v16 or higher)
- MongoDB (local or cloud instance)
- npm or yarn package manager
- Navigate to the server directory:
cd server- Install dependencies:
npm install- Create a
.envfile in the server directory:
PORT=3000
MONGO_URL=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key- Start the server:
node index.jsThe server will run on http://localhost:3000
- Navigate to the client directory:
cd client- Install dependencies:
npm install- Start the development server:
npm run devThe client will run on http://localhost:5173
POST /api/signup- Register a new userPOST /api/signin- Login user
POST /api/create- Submit feedback for a driverGET /api/getdrivers- Get list of all driversGET /api/getfb- Get all feedbacks with analytics
The system includes a built-in sentiment analysis feature that automatically evaluates user comments:
- Positive Keywords: good, great, excellent, amazing, friendly, polite, helpful, clean, comfortable, smooth, perfect, nice, fast, on time, professional, best
- Negative Keywords: bad, rude, angry, unprofessional, late, dirty, slow, worst, rough, unsafe, careless, annoying, smell, disgusting
The algorithm assigns a text-based score (1-5) based on keyword frequency, which is then combined with the manual rating to calculate the driver's overall performance score.
Driver scores are calculated using:
- Average of manual rating and auto-generated text score
- Normalized to a 0-100 scale
- Updated automatically after each new feedback submission
- Submit feedback for drivers
- Rate across multiple dimensions
- Add detailed comments
- Receive feedback from users
- Performance tracked via scoring system
- View all drivers and their performance metrics
- Access comprehensive feedback analytics
- Monitor sentiment trends
- View positive/negative comment statistics
- Star Rating Component - Interactive 5-star rating system
- Driver Selection Dropdown - Dynamic driver list from database
- Form Validation - Client-side validation for required fields
- Success/Error Notifications - Toast-style popup messages
- Responsive Tables - Mobile-friendly data display
- Analytics Cards - Visual metrics display on admin dashboard
- Password hashing with bcrypt (10 salt rounds)
- HTTP-only cookies for JWT tokens
- Protected routes with authentication middleware
- Email uniqueness validation
- Role-based access control
- Sign Up - Create an account with role selection (User/Driver/Admin)
- Login - Authenticate with email and password
- Submit Feedback (User) - Select a driver and provide ratings
- View Dashboard (Admin) - Access analytics and driver performance data
- name (String, required)
- email (String, unique, required)
- password (String, hashed, required)
- role (Enum: User/Driver/Admin)
- score (Number, default: 0)
- count (Number, default: 0)
- user (ObjectId, ref: User)
- Driver (ObjectId, ref: User)
- rating (Number, 1-5, required)
- comment (String, max: 500)
- rideQuality (Number, 1-5)
- drivingBehavior (Number, 1-5)
- cleanliness (Number, 1-5)
- onTime (Number, 1-5)
- autoTextScore (Number)
- timestamps (createdAt, updatedAt)
- Email notifications for low-rated drivers
- Advanced analytics with charts and graphs
- Export feedback data to CSV/PDF
- Driver response system
- Multi-language support
- Mobile application
- Real-time notifications with WebSockets
This project is open source and available for educational and commercial use.
Built with β€οΈ for MoveInSync
Note: This is a production-ready feedback management system with intelligent sentiment analysis capabilities. For any issues or feature requests, please open an issue in the repository.