Skip to content

Bishaldgr8/e-commerce-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›οΈ The Secret Shop - Full-Stack E-Commerce Platform

A modern, feature-rich e-commerce platform built with React, TypeScript, Express, and MongoDB Atlas.

🌐 Live Demo

Frontend (Live): https://e-commerce-website-zntj-3ikanb5ta-bishal-boros-projects.vercel.app

Note: Backend is deployed at https://e-commerce-website-iota-beige.vercel.app. Full functionality is available.


✨ Features

🎨 Beautiful UI/UX

  • Modern, responsive design with dark mode support
  • Smooth animations and transitions
  • Interactive fish animation effect that follows your cursor
  • Glassmorphism and floating card effects
  • Professional typography with Google Fonts (Inter, Outfit)

Homepage

πŸ›’ Shopping Experience

  • Product Catalog: Browse 123+ products across multiple categories
  • Advanced Filtering: Filter by category, price range, and search
  • Product Details: Detailed product pages with images and descriptions
  • Shopping Cart: Add, remove, and manage cart items
  • Wishlist: Save products for later

Product Catalog

πŸ” Authentication & User Management

  • Secure JWT-based authentication
  • Role-based access control (Customer, Seller, Admin)
  • User registration and login
  • Password encryption with bcrypt
  • Protected routes and API endpoints

Login Page

πŸ“¦ Order Management

  • Complete checkout process
  • Order history and tracking
  • Order status updates
  • Detailed order information

Checkout

πŸ‘¨β€πŸ’Ό Admin Dashboard

  • User management (view, edit, delete users)
  • Order management and tracking
  • Product management
  • Analytics and statistics
  • Role assignment and permissions

Admin Dashboard

πŸͺ Seller Dashboard

  • Product creation and management
  • Inventory tracking
  • Sales analytics
  • Order fulfillment

Seller Dashboard

🎯 Additional Features

  • Real-time Notifications: Toast notifications for user actions
  • Responsive Design: Works seamlessly on desktop, tablet, and mobile
  • SEO Optimized: Proper meta tags and semantic HTML
  • Performance: Optimized images and lazy loading
  • Accessibility: ARIA labels and keyboard navigation

πŸ› οΈ Tech Stack

Frontend

  • React 18 - UI library
  • TypeScript - Type safety
  • Vite - Build tool and dev server
  • React Router - Client-side routing
  • Axios - HTTP client
  • Sonner - Toast notifications
  • Lucide React - Icon library
  • React Hook Form - Form management
  • Zod - Schema validation

Backend

  • Node.js - Runtime environment
  • Express - Web framework
  • MongoDB Atlas - Cloud database
  • Mongoose - ODM for MongoDB
  • JWT - Authentication
  • bcryptjs - Password hashing
  • CORS - Cross-origin resource sharing

πŸ“ Project Structure

β”œβ”€β”€ frontend/          # React + TypeScript + Vite
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/    # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ features/      # Feature-based modules
β”‚   β”‚   β”œβ”€β”€ pages/         # Page components
β”‚   β”‚   β”œβ”€β”€ api/           # API client
β”‚   β”‚   └── styles/        # Global styles
β”‚   β”œβ”€β”€ public/
β”‚   └── package.json
β”‚
β”œβ”€β”€ backend/           # Express + MongoDB
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ controllers/   # Request handlers
β”‚   β”‚   β”œβ”€β”€ models/        # Mongoose models
β”‚   β”‚   β”œβ”€β”€ routes/        # API routes
β”‚   β”‚   β”œβ”€β”€ middleware/    # Custom middleware
β”‚   β”‚   └── config/        # Configuration files
β”‚   β”œβ”€β”€ .env
β”‚   └── package.json
β”‚
└── README.md

πŸš€ Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • MongoDB Atlas account
  • Git

Installation

  1. Clone the repository

    git clone https://github.com/Bishaldgr8/e-commerce-website.git
    cd e-commerce-website
  2. Install dependencies

    # Install all dependencies (frontend + backend)
    npm install
    
    # Or install separately
    cd frontend && npm install
    cd ../backend && npm install
  3. Environment Variables

    Create a .env file in the backend/ directory:

    PORT=5000
    NODE_ENV=development
    JWT_SECRET=your_jwt_secret_here
    MONGODB_URI=your_mongodb_connection_string

    Create a .env file in the frontend/ directory:

    VITE_API_URL=http://localhost:5000/api/v1
  4. Seed the Database

    cd backend
    node seed_full.js
    node create_admin.js
  5. Run the Application

    # From root directory - runs both frontend and backend
    npm run dev
    
    # Or run separately
    cd frontend && npm run dev  # Frontend on http://localhost:5173
    cd backend && npm run dev   # Backend on http://localhost:5000

πŸ‘€ Default Admin Credentials

  • Email: admin@secretshop.com
  • Password: ********(contact me for access)

πŸ“Έ Screenshots

Homepage

Homepage

Product Catalog

Catalog

Authentication

Login

Checkout

Checkout

Admin Dashboard

Admin

Seller Dashboard

Seller


🎨 Design Highlights

  • Modern Aesthetics: Vibrant gradients, smooth animations, and glassmorphism effects
  • Dark Mode: Full dark mode support with proper contrast
  • Interactive Elements: Hover effects, micro-animations, and cursor-following fish effect
  • Premium Feel: Professional color palette and typography
  • Responsive: Mobile-first design that works on all devices

πŸ”’ Security Features

  • JWT-based authentication
  • Password hashing with bcrypt
  • Role-based access control (RBAC)
  • Protected API routes
  • Input validation and sanitization
  • CORS configuration
  • Environment variable protection

πŸ“¦ Database

The application uses MongoDB Atlas with the following collections:

  • Users: Customer, seller, and admin accounts
  • Products: 123+ products across multiple categories
  • Orders: Order history and tracking
  • Cart: Shopping cart items

🌟 Key Features Breakdown

For Customers:

βœ… Browse and search products
βœ… Add items to cart and wishlist
βœ… Secure checkout process
βœ… Order history and tracking
βœ… User profile management

For Sellers:

βœ… Product management (CRUD operations)
βœ… Inventory tracking
βœ… Sales analytics
βœ… Order fulfillment

For Admins:

βœ… Complete user management
βœ… Order oversight
βœ… Product moderation
βœ… System analytics
βœ… Role management


🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


πŸ“„ License

MIT License - feel free to use this project for learning or commercial purposes.


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

Made with precision by BishalB


πŸ™ Acknowledgments


⭐ If you like this project, please give it a star on GitHub!

Releases

No releases published

Packages

 
 
 

Contributors