Skip to content

Yashborse4/store-rating-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸͺ Store Rating Platform - Full Stack Application

A modern, comprehensive store rating platform built with React frontend and Node.js backend. This platform enables users to rate stores, discover new places, and make informed shopping decisions with a beautiful, production-ready interface.

πŸš€ Project Overview

This is a full-stack web application that consists of:

  • Frontend: Modern React application with glass morphism UI design
  • Backend: Robust Node.js API with Express and MySQL/PostgreSQL
  • Authentication: JWT-based secure authentication system
  • Database: Relational database with proper schema design
  • Production Ready: Complete deployment configuration

πŸ“ Project Structure

Job Project/
β”œβ”€β”€ backend/                    # Node.js Backend API
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ controllers/       # API route controllers
β”‚   β”‚   β”œβ”€β”€ models/           # Database models
β”‚   β”‚   β”œβ”€β”€ routes/           # Express routes
β”‚   β”‚   β”œβ”€β”€ middleware/       # Custom middleware
β”‚   β”‚   β”œβ”€β”€ config/           # Database & app configuration
β”‚   β”‚   └── utils/            # Utility functions
β”‚   β”œβ”€β”€ package.json
β”‚   └── server.js
β”‚
β”œβ”€β”€ store-rating-app/          # React Frontend
β”‚   β”œβ”€β”€ public/               # Public assets
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/       # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ pages/           # Page components
β”‚   β”‚   β”œβ”€β”€ context/         # React context providers
β”‚   β”‚   β”œβ”€β”€ services/        # API service layer
β”‚   β”‚   └── utils/           # Frontend utilities
β”‚   β”œβ”€β”€ package.json
β”‚   └── README.md            # Frontend-specific documentation
β”‚
└── README.md                # This file - Main project documentation

✨ Key Features

🎯 Core Functionality

  • Multi-Role System: Support for Regular Users, Store Owners, and System Administrators
  • Store Rating & Reviews: Comprehensive 5-star rating system with detailed reviews
  • Real-time Search: Fast and intelligent store search functionality
  • User Management: Complete user registration, authentication, and profile management
  • Analytics Dashboard: Detailed insights for store owners and administrators
  • Responsive Design: Mobile-first approach working perfectly on all devices

πŸ›‘οΈ Security Features

  • JWT Authentication: Secure token-based authentication
  • Role-based Access Control: Proper authorization for different user types
  • Input Validation: Comprehensive client and server-side validation
  • Password Security: Bcrypt hashing with salt rounds
  • Environment Security: No hardcoded credentials or sensitive data exposure

πŸš€ Quick Start Guide

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn
  • MySQL or PostgreSQL database
  • Git for version control

1. Clone the Repository

git clone <your-repository-url>
cd "Job Project"

2. Backend Setup

# Navigate to backend directory
cd backend

# Install dependencies
npm install

# Set up environment variables
cp .env.example .env
# Edit .env with your database credentials and JWT secret

# Run database migrations (if applicable)
npm run migrate

# Start the backend server
npm start
# Backend will run on http://localhost:3001

3. Frontend Setup

# Navigate to frontend directory
cd ../store-rating-app

# Install dependencies
npm install

# Set up environment variables
cp .env.development .env.local
# Edit .env.local with your API URL

# Start the frontend development server
npm start
# Frontend will run on http://localhost:3000

4. Access the Application

πŸ‘₯ User Roles & Permissions

πŸ›οΈ Regular Users

  • Register and authenticate securely
  • Search and browse stores
  • Rate stores (1-5 stars) with detailed reviews
  • Manage personal ratings and review history
  • Update profile information

πŸͺ Store Owners

  • Access comprehensive store analytics
  • Monitor customer feedback and ratings
  • View detailed performance metrics
  • Track rating trends over time
  • Respond to customer reviews

πŸ›‘οΈ System Administrators

  • Manage all users and their permissions
  • View comprehensive system statistics
  • Add, edit, and manage store listings
  • Monitor platform health and activity
  • Generate reports and analytics

πŸ”§ Configuration

Backend Configuration

# Database
DB_HOST=localhost
DB_USER=your_username
DB_PASSWORD=your_password
DB_NAME=store_rating_db

# JWT
JWT_SECRET=your_super_secret_jwt_key
JWT_EXPIRE=7d

# Server
PORT=3001
NODE_ENV=development

Production Deployment Checklist

Backend Deployment

  • Set up production database (MySQL/PostgreSQL)
  • Configure environment variables for production
  • Set up SSL certificates
  • Configure CORS for your frontend domain

Frontend Deployment

  • Update API URL in production environment
  • Build production bundle: npm run build
  • Deploy to static hosting (Netlify, Vercel, AWS S3)
  • Configure domain and SSL
  • Set up CDN for optimal performance

Recommended Hosting Options

Backend

  • Heroku: Easy deployment with database add-ons
  • AWS EC2: Full control with scalability
  • DigitalOcean: Affordable VPS with managed databases
  • Railway: Modern deployment platform

Frontend

  • Netlify: Automatic deployments from Git with form handling
  • Vercel: Optimized for React with serverless functions
  • AWS S3 + CloudFront: Enterprise-grade with global CDN
  • GitHub Pages: Free hosting for public repositories

Backend Testing

cd backend
npm test                # Run all tests
npm run test:unit      # Unit tests only
npm run test:integration # Integration tests
npm run test:coverage  # Test coverage report

Frontend Testing

cd store-rating-app
npm test              # Run all tests
npm run test:coverage # Coverage report
npm run test:e2e     # End-to-end tests

πŸ“ API Documentation

Authentication Endpoints

POST /api/auth/register     # User registration
POST /api/auth/login        # User login
POST /api/auth/refresh      # Refresh JWT token
GET  /api/auth/profile      # Get user profile
PUT  /api/auth/profile      # Update user profile

Store Endpoints

GET    /api/stores          # Get all stores
GET    /api/stores/:id      # Get single store
POST   /api/stores          # Create store (Admin only)
PUT    /api/stores/:id      # Update store
DELETE /api/stores/:id      # Delete store (Admin only)

Rating Endpoints

GET    /api/ratings/store/:storeId    # Get store ratings
POST   /api/ratings                   # Submit rating
PUT    /api/ratings/:id               # Update rating
DELETE /api/ratings/:id               # Delete rating

πŸ”’ Security Best Practices

Implemented Security Features

  • Password Hashing: Bcrypt with salt rounds
  • JWT Tokens: Secure authentication with expiration
  • Input Validation: Server-side validation with Joi/express-validator
  • SQL Injection Protection: Parameterized queries
  • XSS Protection: Input sanitization and CSP headers
  • Rate Limiting: Prevent brute force attacks
  • CORS Configuration: Controlled cross-origin requests

Built with ❀️ using React + Node.js

Back to top

About

The app is build for giving the store rating

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published