A full-stack web application that enables users to rate stores, manage accounts, and interact with a role-based dashboard system. Built with React, Node.js/Express, and PostgreSQL, this project demonstrates practical implementation of authentication, role-based authorization, database modeling, and dynamic UI rendering.
🚀 Features
The platform supports three user roles with dedicated functionalities:
The admin dashboard displays:
- 📌 Total number of users
- 🏬 Total number of stores
- ⭐ Total number of submitted ratings
➕ Add new:
- Admin users
- Store owners
- Normal users Stores
- Stores (Name, Email, Address, Rating)
- Users (Name, Email, Address, Role)
- Name
- Address
- Role
- 📝 Can sign up
- 🔑 Can log in
- Name
- Address
- Password
- 🔒 Update password
- 🏬 View all registered stores
- 🔍 Search stores by:
- Name
- Address
- Store Name
- Address
- Overall Rating
- User’s own rating (if submitted)
- Button to submit rating
- Submit/Modify ratings (1–5 stars)
Store owners can:
- 👥 View list of users who rated their store
- ⭐ See their store’s average rating
- 🔒 Update password
- 🚪 Logout
All form fields follow strict validation rules:
| Field | Validation |
|---|---|
| Name | 20–60 characters |
| Address | Max 400 characters |
| Password | 8–16 characters, must include one uppercase letter and one special character |
| Must follow valid email format |
- Tables
- users
- stores
- ratings
- Store name is used as a foreign key reference in ratings
- A store may have multiple ratings
- User may submit only one rating per store (editable)
- React
- Axios
- PrimeReact
- React Icons
- Node.js
- Express.js
- JSON Web Tokens (JWT)
- bcrypt
- PostgreSQL
- JWT-based authentication
- Password hashing using bcrypt
- Protected routes via middleware
- Role-based access control
Rating-app/
│── frontend/ → React application
│── backend/ → Express server + PostgreSQL
│── README.md-
Clone the repository:
git clone https://github.com/pushkar009/Rating-app.git -
🔧 Backend Setup (Install dependencies):
cd backend
npm install
- Create a .env file
DATABASE_URL=your_postgresql_url_here
JWT_SECRET=your_secret_key- Start server
npm start
🎨 Frontend Setup 5. Install dependencies
cd ../frontend
npm install
- Start frontend
npm run dev
| Frontend | Backend | database |
|---|---|---|
| Vercel (Frontend) | Render (Node Server) | Supabase (Hosted PostgreSQL) |
This project includes:
- Role-based UI rendering
- Secure login system with JWT
- Real-time store ratings
- Interactive dashboards
- Fully responsive UI
- Sorting, filtering, and user management
- Database schema with relational structure
Contributions, suggestions, and improvements are welcome! Feel free to open issues or submit PRs.
This project is licensed under the MIT License.