A full-stack web application where users can rate and review stores. The system includes role-based access for Normal Users, Store Owners, and Admins, each with tailored dashboards and features.
- User Authentication: Secure signup and login functionality.
- Store Discovery: View a list of all registered stores.
- Search: Find stores by name or address.
- Rating System: Submit a rating from 1 to 5 for any store.
- Update Ratings: Modify previously submitted ratings.
- Password Management: Ability to update their own password after logging in.
- Secure Login: Access a dedicated, protected dashboard.
- Performance Metrics: View the overall average rating for their specific store.
- Customer Insights: See a list of all users who have submitted a rating for their store.
- Password Management: Ability to update their own password.
- Secure Login: Access a comprehensive admin dashboard.
- Platform Analytics: View key statistics, including the total number of users, stores, and ratings.
- User Management: View a filterable list of all users on the platform (Admin, User, Store Owner).
- Store Management: View a filterable list of all registered stores and their ratings.
- Creation Capabilities: Backend API includes protected endpoints for an admin to create new users (of any role) and new stores.
This project is built with a modern full-stack architecture.
- React.js: A JavaScript library for building user interfaces.
- Vite: A blazing-fast frontend build tool.
- React Router: For client-side routing and navigation.
- Axios: For making API requests to the backend.
- React Context API: For global state management (authentication).
- Node.js: JavaScript runtime environment.
- Express.js: A fast, unopinionated, minimalist web framework for Node.js.
- MySQL2: MySQL client for Node.js.
- JSON Web Token (JWT): For secure user authentication.
- Bcrypt.js: For hashing user passwords.
- Dotenv: For managing environment variables.
- CORS: For enabling Cross-Origin Resource Sharing.
- MySQL: A popular open-source relational database.
Before you begin, ensure you have the following installed on your local machine:
- Node.js (which includes npm)
- MySQL Server
- A database management tool like MySQL Workbench or XAMPP (which includes phpMyAdmin).
Follow these steps to get the project up and running locally.
Database: Create store_rating_db in MySQL and run database.sql.
Backend:
cd backend
npm install
npm start
Configure .env with DB credentials + JWT secret.
Frontend:
cd frontend
npm install
npm run dev
Set VITE_API_BASE_URL=http://localhost:5000.