Skip to content

Sumant3086/BuyIndiaX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›οΈ BuyIndiaX - Enterprise E-Commerce Platform

A full-stack, production-ready e-commerce platform built with the MERN stack, featuring real-time notifications, AI-powered recommendations, and enterprise-grade security.

License

🌐 Live Demo

Visit BuyIndiaX β†’

Experience the full-featured e-commerce platform in action!

πŸ“Έ Screenshots

Home Page

Home Page

Shop by Category

Shop by Category

Product Page

Product Page

Admin Dashboard

Admin Dashboard

πŸš€ Features

Core Features

  • πŸ›’ Complete E-Commerce Flow - Browse, cart, checkout, payment, order tracking
  • πŸ’³ Payment Integration - Razorpay payment gateway with test mode
  • πŸ” Authentication & Authorization - JWT-based auth with role-based access
  • πŸ“¦ Order Management - Real-time order tracking with timeline visualization
  • ⭐ Reviews & Ratings - Product reviews with image upload support
  • ❀️ Wishlist - Save favorite products
  • πŸ” Advanced Search - Autocomplete with search history and suggestions
  • 🎯 Product Comparison - Side-by-side product comparison

Advanced Features

  • πŸ€– AI Chatbot - Google Gemini AI-powered customer support
  • πŸ”” Real-Time Notifications - Socket.IO for instant updates
  • πŸ“Š Analytics Dashboard - Sales, revenue, and user behavior tracking
  • 🎁 Coupon System - Discount codes and promotional offers
  • πŸ† Loyalty Program - Points system with tiered memberships
  • πŸ“ˆ Recommendation Engine - Collaborative filtering for personalized suggestions
  • πŸŒ“ Dark/Light Theme - Smooth theme switching with persistence
  • πŸ“± Fully Responsive - Mobile-first design

Admin Features

  • πŸ“Š Admin Dashboard - Real-time analytics and insights
  • πŸ“¦ Product Management - CRUD operations with bulk CSV import/export
  • πŸ‘₯ Customer Management - User analytics and segmentation
  • πŸ“‹ Order Management - Status updates and order processing
  • πŸ“‰ Sales Analytics - Visual charts and reports
  • πŸ”” Low Stock Alerts - Automated inventory notifications

πŸ› οΈ Tech Stack

Backend

  • Runtime: Node.js 18+
  • Framework: Express.js
  • Database: MongoDB with Mongoose ODM
  • Cache: Redis (optional)
  • Authentication: JWT (JSON Web Tokens)
  • Payment: Razorpay
  • AI: Google Gemini API
  • Real-time: Socket.IO
  • Email: Nodemailer

Frontend

  • Framework: React 19
  • Routing: React Router v7
  • State Management: Context API
  • Animations: Framer Motion
  • Icons: React Icons
  • HTTP Client: Axios

DevOps & Infrastructure

  • Containerization: Docker & Docker Compose
  • Orchestration: Kubernetes with Helm
  • Monitoring: Prometheus & Grafana
  • CI/CD: GitHub Actions
  • Security Scanning: Trivy
  • Code Quality: ESLint, SonarCloud
  • Auto-scaling: Horizontal Pod Autoscaler

πŸ“‹ Prerequisites

  • Node.js 18+ and npm
  • MongoDB 6.0+
  • Docker & Docker Compose (for containerized deployment)
  • Git

πŸš€ Quick Start

1. Clone Repository

git clone https://github.com/Sumant3086/BuyIndiaX.git
cd buyindiax

2. Install Dependencies

# Backend dependencies
npm install

# Frontend dependencies
cd client
npm install
cd ..

3. Environment Setup

# Copy example env file
cp .env.example .env

# Edit .env with your configuration
nano .env

Required environment variables:

# Server
NODE_ENV=development
PORT=5000

# Database
MONGODB_URI=mongodb://localhost:27017/buyindiax

# JWT
JWT_SECRET=your_super_secret_jwt_key

# Razorpay (Test Keys)
RAZORPAY_KEY_ID=rzp_test_SZT2as0qsWZtkR
RAZORPAY_KEY_SECRET=uJLKwIAhb6JcXu2PWIoBzHhC

# Google AI
GOOGLE_API_KEY=your_google_api_key

# Email (Optional)
EMAIL_USER=your_email@gmail.com
EMAIL_PASS=your_app_password

4. Seed Database (Optional)

node scripts/seedProducts.js

5. Run Application

Development Mode:

# Start backend (port 5000)
npm run dev

# Start frontend (port 3000) - in another terminal
cd client
npm start

Production Mode:

# Build frontend
cd client
npm run build
cd ..

# Start server
npm start

Docker Mode:

# Start all services
docker-compose up -d

# View logs
docker-compose logs -f

# Stop services
docker-compose down

πŸ“š Documentation

πŸ—οΈ Project Structure

buyindiax/
β”œβ”€β”€ client/                 # React frontend
β”‚   β”œβ”€β”€ public/            # Static files
β”‚   └── src/
β”‚       β”œβ”€β”€ components/    # Reusable components
β”‚       β”œβ”€β”€ context/       # Context providers
β”‚       β”œβ”€β”€ pages/         # Page components
β”‚       β”œβ”€β”€ theme/         # Theme & animations
β”‚       └── utils/         # Utility functions
β”œβ”€β”€ middleware/            # Express middleware
β”œβ”€β”€ models/               # MongoDB models
β”œβ”€β”€ routes/               # API routes
β”œβ”€β”€ scripts/              # Utility scripts
β”œβ”€β”€ utils/                # Backend utilities
β”œβ”€β”€ .github/              # GitHub Actions workflows
β”œβ”€β”€ docker-compose.yml    # Docker orchestration
β”œβ”€β”€ Dockerfile           # Docker image definition
└── server.js            # Express server entry point

πŸ”’ Security Features

  • βœ… JWT Authentication - Secure token-based auth
  • βœ… Password Hashing - bcrypt with salt rounds
  • βœ… Rate Limiting - Per-user and IP-based limits
  • βœ… Input Sanitization - XSS and NoSQL injection prevention
  • βœ… Security Headers - Helmet.js with CSP
  • βœ… CORS Configuration - Controlled cross-origin requests
  • βœ… SQL Injection Prevention - Pattern detection
  • βœ… Secure Payment - PCI-DSS compliant Razorpay integration

🎨 UI/UX Features

  • ✨ 3D Animations - Parallax scrolling and 3D transforms
  • 🎭 Glassmorphism - Modern frosted glass effects
  • 🌊 Smooth Transitions - Framer Motion animations
  • πŸ“± Mobile Responsive - Touch-friendly interactions
  • β™Ώ Accessible - ARIA labels and keyboard navigation
  • 🎨 Theme System - Dark/light mode with smooth transitions
  • ⚑ Performance Optimized - Code splitting and lazy loading

πŸ“Š API Endpoints

Authentication

  • POST /api/auth/register - User registration
  • POST /api/auth/login - User login
  • GET /api/auth/me - Get current user

Products

  • GET /api/products - Get all products
  • GET /api/products/:id - Get product by ID
  • GET /api/products/search - Search products
  • POST /api/products - Create product (Admin)
  • PUT /api/products/:id - Update product (Admin)
  • DELETE /api/products/:id - Delete product (Admin)

Orders

  • POST /api/orders - Create order
  • GET /api/orders - Get user orders
  • GET /api/orders/:id - Get order by ID
  • PUT /api/orders/admin/:id/status - Update order status (Admin)

Cart

  • GET /api/cart - Get user cart
  • POST /api/cart/add - Add item to cart
  • PUT /api/cart/update/:id - Update cart item
  • DELETE /api/cart/remove/:id - Remove from cart

Payment

  • POST /api/payment/create-order - Create Razorpay order
  • POST /api/payment/verify - Verify payment

See full API documentation

πŸ§ͺ Testing

# Run backend tests
npm test

# Run frontend tests
cd client
npm test

# Run with coverage
npm run test:coverage

🚒 Deployment

Option 1: Docker Compose (Development)

# Build and start
docker-compose up -d

# View logs
docker-compose logs -f

# Stop
docker-compose down

Option 2: Kubernetes (Production - Recommended)

# Quick deploy
cd k8s
chmod +x deploy.sh
./deploy.sh

# Or use Helm
helm install buyindiax ./helm/buyindiax -n buyindiax --create-namespace

See KUBERNETES_SETUP.md for complete guide.

Option 3: Manual Deployment

See DEPLOYMENT.md for detailed instructions.

CI/CD Pipeline

Automated deployment via GitHub Actions. See CI-CD-SETUP.md.

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Author

Sumant

πŸ™ Acknowledgments

  • Razorpay for payment gateway
  • Google for Gemini AI API
  • MongoDB for database
  • React team for amazing framework
  • Framer Motion for animations

πŸ“ž Support

For support, email support@buyindiax.com or open an issue on GitHub.


⭐ Star this repo if you find it helpful!

Made with ❀️ by Sumant

About

Modern MERN stack e-commerce platform with Razorpay payments, JWT authentication, and responsive React UI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors