Skip to content

Latest commit

Β 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›οΈ Clothing E-Commerce Platform

🌟 Project Overview

A full-stack e-commerce application designed to provide a seamless online shopping experience for fashion enthusiasts. This platform focuses on a modern UI/UX, robust state management, and efficient backend integration, ensuring smooth navigation, product exploration, and purchase completion.

🎯 Features

βœ… 1. Product List Page

  • Responsive grid display showcasing products.
  • Displays images, names, brands, and prices.
  • Add to Bag button for quick cart addition.
  • Optimized mobile & desktop views.

Tech Stack:

  • React Components for rendering.
  • Tailwind CSS for modern, responsive styling.
  • Dynamic product fetching from backend API.

βœ… 2. Product Detail View

  • Detailed product page/modal on click.
  • Displays description, price, mock reviews.
  • "Add to Bag" functionality.
  • Smooth modal transitions for better UX.

Enhancements:

  • Intuitive product information layout.
  • Optimized for mobile-first design.

βœ… 3. Shopping Cart ("My Bag")

  • Accessible via navigation bar.
  • Side-drawer/modal interface.
  • Displays:
    • Added products.
    • Product quantities.
    • Individual & total prices.
    • Remove & quantity adjust options.

State Management:

  • Real-time updates for cart.
  • Persistent cart state for user sessions.

βœ… 4. State Management

  • Implemented using React Context API.
  • Centralized handling for:
    • User authentication.
    • Shopping cart.
    • Product interactions.
  • Ensures smooth UX across components.

πŸš€ Tech Stack

πŸ–₯️ Frontend:

  • React + Vite ⚑
  • Tailwind CSS for UI design.
  • React Context API for state management.

πŸ›  Backend:

  • Node.js + Express for API development.

πŸ—„ Database:

  • MongoDB πŸƒ for data persistence.

πŸ” Authentication:

  • JWT-based authentication.

πŸ“Έ Image Management:

  • Cloudinary for image storage & optimization.

πŸš€ Optional Enhancements

βœ… Backend Integration

  • Custom REST APIs for product handling.
  • Dynamic product data fetching.
  • Mock data insertion via Bruno API testing.

🌐 Key API Endpoints

πŸ›οΈ Product Routes

  • GET /products/list - Fetch all products.
  • POST /products/single - Fetch single product details.

πŸ›’ Cart Routes

  • POST /cart/get - Retrieve user’s cart.
  • POST /cart/add - Add item to cart.
  • POST /cart/update - Update cart items.

πŸ‘€ User Routes

  • POST /user/register - User registration.
  • POST /user/login - User authentication.

Home Page🏠

image image image

Collection Page

image

About Page

image

Contact Page

image

Individual Product Page

image

Descriptions && Mock Reviews and Related Page

image

Cart Page

image

Delivery and Place Order Page

image

πŸ—οΈ Design Challenges & Solutions

πŸ€” Key Challenges

  • Complex UI/UX: Ensuring intuitive, responsive design.
  • State Management: Efficient handling of global states.

πŸ’‘ Solutions

  • React Context API for centralized state handling.
  • Reusable & modular components.
  • Mobile-first approach for better performance.

Project Structure

clothing-e-commerce/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   β”œβ”€β”€ cloudinary.js         # Cloudinary image upload configuration
β”‚   β”‚   └── mongodb.js            # MongoDB database connection setup
β”‚   β”‚
β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   β”œβ”€β”€ cartController.js     # Handles cart-related operations (add, remove, update)
β”‚   β”‚   β”œβ”€β”€ orderController.js    # Manages order creation, tracking, and processing
β”‚   β”‚   β”œβ”€β”€ productController.js  # CRUD operations for product management
β”‚   β”‚   └── userController.js     # User authentication and profile management
β”‚   β”‚
β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   β”œβ”€β”€ adminAuth.js          # Middleware for admin route protection
β”‚   β”‚   β”œβ”€β”€ auth.js               # JWT authentication middleware
β”‚   β”‚   └── multer.js             # File upload middleware configuration
β”‚   β”‚
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ orderModel.js         # Mongoose schema for orders
β”‚   β”‚   β”œβ”€β”€ productModel.js       # Mongoose schema for products
β”‚   β”‚   └── userModel.js          # Mongoose schema for user accounts
β”‚   β”‚
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ cartRoute.js          # API routes for cart operations
β”‚   β”‚   β”œβ”€β”€ orderRoute.js         # API routes for order management
β”‚   β”‚   β”œβ”€β”€ productRoute.js       # API routes for product CRUD
β”‚   β”‚   └── userRoute.js          # API routes for user authentication
β”‚   β”‚
β”‚   β”œβ”€β”€ .env                      # Environment variables (DB connection, secrets)
β”‚   β”œβ”€β”€ .gitignore                # Git ignore file
β”‚   β”œβ”€β”€ package.json              # Backend dependencies and scripts
β”‚   β”œβ”€β”€ package-lock.json         # Locked dependency versions
β”‚   β”œβ”€β”€ server.js                 # Main Express server entry point
β”‚   └── bruno-testing/            # Bruno API testing collection
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ node_modules/             # React dependencies
β”‚   β”œβ”€β”€ public/                   # Static assets
β”‚   β”‚
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ assets/               # Static images, logos, etc.
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ components/           # Reusable React components
β”‚   β”‚   β”‚   β”œβ”€β”€ BestSeller.jsx    # Best-selling products component
β”‚   β”‚   β”‚   β”œβ”€β”€ CartTotal.jsx     # Cart total calculation component
β”‚   β”‚   β”‚   β”œβ”€β”€ Footer.jsx        # Site footer component
β”‚   β”‚   β”‚   β”œβ”€β”€ Hero.jsx          # Landing page hero section
β”‚   β”‚   β”‚   β”œβ”€β”€ LatestCollection.jsx  # Latest product collection display
β”‚   β”‚   β”‚   β”œβ”€β”€ Navbar.jsx        # Site navigation component
β”‚   β”‚   β”‚   β”œβ”€β”€ NewsletterBox.jsx # Newsletter signup component
β”‚   β”‚   β”‚   β”œβ”€β”€ OurPolicy.jsx     # Store policies display
β”‚   β”‚   β”‚   β”œβ”€β”€ ProductItem.jsx   # Individual product display
β”‚   β”‚   β”‚   β”œβ”€β”€ RelatedProducts.jsx  # Related products suggestion
β”‚   β”‚   β”‚   β”œβ”€β”€ SearchBar.jsx     # Product search functionality
β”‚   β”‚   β”‚   └── Title.jsx         # Reusable page title component
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ context/              # React context for global state
β”‚   β”‚   β”‚   └── ShopContext.jsx   # Shopping cart and user context
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ pages/                # Individual page components
β”‚   β”‚   β”‚   β”œβ”€β”€ About.jsx         # About us page
β”‚   β”‚   β”‚   β”œβ”€β”€ Cart.jsx          # Shopping cart page
β”‚   β”‚   β”‚   β”œβ”€β”€ Collection.jsx    # Product collection page
β”‚   β”‚   β”‚   β”œβ”€β”€ Contact.jsx       # Contact us page
β”‚   β”‚   β”‚   β”œβ”€β”€ Home.jsx          # Landing/homepage
β”‚   β”‚   β”‚   β”œβ”€β”€ Login.jsx         # User login page
β”‚   β”‚   β”‚   β”œβ”€β”€ Orders.jsx        # User order history
β”‚   β”‚   β”‚   β”œβ”€β”€ PlaceOrder.jsx    # Order placement page
β”‚   β”‚   β”‚   β”œβ”€β”€ Product.jsx       # Individual product details page
β”‚   β”‚   β”‚   β”œβ”€β”€ Verify.jsx        # User verification page
β”‚   β”‚   β”‚   └── Products.jsx      # All products listing page
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ App.jsx               # Main React application component
β”‚   β”‚   β”œβ”€β”€ index.css             # Global CSS styles
β”‚   β”‚   β”œβ”€β”€ main.jsx              # React application entry point
β”‚   β”‚   └── vite.config.js        # Vite configuration
β”‚   β”‚
β”‚   β”œβ”€β”€ .gitignore                # Git ignore file
β”‚   β”œβ”€β”€ index.html                # Main HTML entry point
β”‚   β”œβ”€β”€ package.json              # Frontend dependencies and scripts
β”‚   └── package-lock.json         # Locked dependency versions
β”‚
β”œβ”€β”€ README.md                     # Project documentation

Frontend Deployment Link

https://clothing-e-c.netlify.app/

Backend Deployment Link

https://clothing-e-commerce-1.onrender.com

πŸ”§ Local Setup Guide

Prerequisites

  • Node.js (v16+)
  • MongoDB Account
  • Cloudinary Account

Installation Steps

1️⃣ Clone the Repository

git clone https://github.com/your-username/clothing-ecommerce.git
cd clothing-ecommerce

2️⃣ Backend Setup

cd backend
npm install

3️⃣ Frontend Setup

cd frontend
npm install

4️⃣ Environment Configuration

Create .env files in backend & frontend, and add:

MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
CLOUDINARY_URL=your_cloudinary_connection_url

5️⃣ Run the Application

# Start backend
npm run dev

# Start frontend
npm run dev

🀝 Contributing

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

πŸ“ž Connect With Me

πŸ“§ Email: sudhanssudhan83@gmail.com
🌐 LinkedIn: Connect on LinkedIn
πŸ™ GitHub: GitHub Profile

About

πŸ›οΈ Clothing E-Commerce Platform A full-stack e-commerce application for seamless online shopping. Built with React, Node.js, Express, MongoDB, and Tailwind CSS, featuring product browsing, cart management, authentication, and order placement.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages