Skip to content

Users can submit ratings for registered stores on a scale of 1 to 5, with role-based access controlling available functionalities.

License

Notifications You must be signed in to change notification settings

pragatidh/StoreRatingPlatform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Store Rating Platform A Full-Stack App

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.

✨ Features

👤 Normal User

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

🏪 Store Owner

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

🛠️ System Administrator

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

🚀 Tech Stack

This project is built with a modern full-stack architecture.

Frontend

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

Backend

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

Database

  • MySQL: A popular open-source relational database.

📋 Prerequisites

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

⚙️ Installation & Setup

Follow these steps to get the project up and running locally.

1. Database Setup

Database: Create store_rating_db in MySQL and run database.sql.

2. Backend Setup

Backend:

cd backend
npm install
npm start

Configure .env with DB credentials + JWT secret.

3. Frontend Setup

Frontend:

cd frontend
npm install
npm run dev

Set VITE_API_BASE_URL=http://localhost:5000.

About

Users can submit ratings for registered stores on a scale of 1 to 5, with role-based access controlling available functionalities.

Topics

Resources

License

Stars

Watchers

Forks