A comprehensive full-stack web application that enables users to discover stores, submit ratings, and empowers store owners to track their performance metrics in real-time.
- Overview
- Tech Stack
- Live Demo
- Features
- Installation
- API Documentation
- Project Structure
- Validation Rules
- Security
The Roxiler Store Rating System is a role-based platform designed to facilitate transparent store performance tracking through user ratings. The system supports three distinct user rolesβAdmin, Store Owner, and Normal Userβeach with tailored functionalities to ensure efficient store management and user engagement.
Backend
- Node.js with Express.js framework
- PostgreSQL / MySQL database
- JWT-based authentication
- RESTful API architecture
Frontend
- React 18+ with Vite build tool
- Modern ES6+ JavaScript
- Responsive UI design
Deployment
- Frontend: Vercel
- Backend: Render
Experience the application in action:
- Frontend: https://roxiler-systems-nine.vercel.app
- Backend API: https://roxiler-systems-backend-jle0.onrender.com
Use these credentials to explore different user roles:
| Role | Password | |
|---|---|---|
| Admin | admin@test.com | 123456789A@ |
| Store Owner | owner.demo@roxiler.com | Owner@12345 |
| Normal User | user2@test.com | 0987654321@N |
The admin role provides comprehensive system management capabilities:
- Dashboard Analytics: View real-time statistics
- User Management: Create, view, filter, search, and delete user accounts
- Store Management: Create, assign owners, and delete stores
- Rating Oversight: Access and monitor all user ratings across the platform
- Advanced Filtering: Search functionality for users and stores
Standard users enjoy the following capabilities:
- Account Management: Sign up, login, and update password
- Store Discovery: Browse all registered stores with search functionality
- Search & Filter: Find stores by name or address
- Rating Submission: Submit ratings on a 1-5 scale
- Rating Updates: Modify previously submitted ratings
Store owners have access to performance tracking tools:
- Authentication: Secure login with password management
- Store Dashboard: View detailed store information and metrics
- Customer Insights: See complete list of users who rated the store
- Performance Metrics: Monitor average store rating
- Node.js (v14 or higher)
- PostgreSQL or MySQL database
- npm or yarn package manager
- Navigate to the backend directory:
cd Backend
npm install- Create a
.envfile in the Backend directory:
PORT=5000
DB_PORT=5432
DATABASE_URL=your_postgresql_or_mysql_connection_url
JWT_SECRET=your_secure_jwt_secret_key_change_in_production
NODE_ENV=development- Start the development server:
npm run devThe backend API will be available at http://localhost:5000
- Navigate to the frontend directory:
cd frontend
npm install- Create a
.envfile in the frontend directory (if needed):
VITE_API_URL=http://localhost:5000- Start the development server:
npm run devThe frontend will be available at http://localhost:5173
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| POST | /api/auth/signup |
Register new user | No |
| POST | /api/auth/login |
User login | No |
| POST | /api/auth/update-password |
Update user password | Yes |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /api/stores/admin/all |
Get all stores (admin) | Yes (Admin) |
| GET | /api/stores/user/list |
Get all stores (user view) | Yes |
| GET | /api/stores/:id |
Get store by ID | Yes |
| POST | /api/stores |
Create new store | Yes (Admin) |
| DELETE | /api/stores/:id |
Delete store | Yes (Admin) |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| POST | /api/ratings/submit |
Submit/update rating | Yes |
| GET | /api/ratings/user/:storeId |
Get user's rating for store | Yes |
| GET | /api/ratings/store/:storeId |
Get all ratings for store | Yes (Owner) |
| GET | /api/ratings/admin/all |
Get all ratings (admin) | Yes (Admin) |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| POST | /api/users |
Create new user | Yes (Admin) |
| GET | /api/users/all |
Get all users | Yes (Admin) |
| GET | /api/users/:id |
Get user by ID | Yes (Admin) |
| GET | /api/users/dashboard |
Get dashboard stats | Yes (Admin) |
| DELETE | /api/users/:id |
Delete user | Yes (Admin) |
RBackend/
src/
controllers/
routes/
middleware/
validators/
frontend/
src/
components/
pages/
services/
styles/
βββ README.md
The application enforces strict validation rules to ensure data integrity:
- Name: 20-60 characters
- Address: Maximum 400 characters
-
Password Requirements:
- Length: 8-16 characters
- Must contain at least 1 uppercase letter
- Must contain at least 1 special character
- Example valid password:
MyP@ssw0rd
-
Email: Standard email format (RFC 5322 compliant)
- Value: Integer between 1-5 (inclusive)
- Uniqueness: One rating per user per store
The application implements multiple security measures:
- JWT Authentication: Secure token-based authentication for protected routes
- Password Hashing: User passwords are encrypted using industry-standard hashing
- Role-Based Access Control (RBAC): Endpoint authorization based on user roles
- Input Validation: Server-side validation prevents malicious data injection
- CORS Configuration: Controlled cross-origin resource sharing
- Connect your GitHub repository to Render
- Set environment variables in Render dashboard
- Configure build command:
npm install - Configure start command:
npm start
- Connect your GitHub repository to Vercel
- Set root directory to
frontend - Configure build command:
npm run build - Configure output directory:
dist
This project is available for assessment and educational purposes.
Developed as part of Roxiler Systems assessment.
For questions or issues, please create an issue in the repository or contact the development team.
