Skip to content

Patlu475/Ecommerce-Store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

E-commerce Clothing Store πŸ‘•πŸ›οΈ

A full-stack e-commerce clothing store built with React.js, Node.js, Express.js, and MongoDB. This application provides a complete online shopping experience with separate interfaces for customers and administrators.

πŸ“‹ Table of Contents

πŸ‘₯ Team Members

  • Nikhal Rajpal - 023-21-0120
  • Amrat Kukreja - 023-21-0107
  • Raveena Roopeja - 023-21-0155

✨ Features

Customer Features

  • πŸͺ Browse products by categories (Men, Women, Kids)
  • πŸ›’ Add/Remove items from shopping cart
  • πŸ‘€ User registration and authentication
  • πŸ” Secure login/logout functionality
  • πŸ“± Responsive design for all devices
  • πŸ” Product search and filtering

Admin Features

  • πŸ“Š Admin dashboard
  • βž• Add new products
  • ✏️ Edit existing products
  • πŸ—‘οΈ Remove products
  • πŸ“Έ Image upload for products
  • πŸ‘₯ User management

πŸ› οΈ Tech Stack

Frontend

  • React.js (v18.2.0) - UI Library
  • React Router DOM (v6.21.1) - Client-side routing
  • CSS3 - Styling
  • React Scripts - Build tool

Backend

  • Node.js - Runtime environment
  • Express.js (v4.18.2) - Web framework
  • MongoDB - Database
  • Mongoose (v8.0.4) - ODM for MongoDB
  • JWT (v9.0.2) - Authentication
  • Multer (v1.4.5) - File upload handling
  • CORS (v2.8.5) - Cross-origin resource sharing

Admin Panel

  • React.js (v18.2.0) - UI Library
  • Vite (v5.0.8) - Build tool and dev server
  • React Router DOM (v6.21.2) - Client-side routing
  • ESLint - Code linting

πŸ“ Project Structure

Ecommerce/
β”œβ”€β”€ frontend/                 # Customer-facing React application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ Components/       # Reusable React components
β”‚   β”‚   β”œβ”€β”€ Pages/           # Page components
β”‚   β”‚   β”œβ”€β”€ Context/         # React context for state management
β”‚   β”‚   β”œβ”€β”€ App.js           # Main App component
β”‚   β”‚   └── index.js         # Entry point
β”‚   β”œβ”€β”€ public/              # Static assets
β”‚   └── package.json         # Frontend dependencies
β”‚
β”œβ”€β”€ backend/                  # Node.js/Express.js API server
β”‚   β”œβ”€β”€ upload/              # Uploaded product images
β”‚   β”œβ”€β”€ index.js             # Main server file
β”‚   └── package.json         # Backend dependencies
β”‚
β”œβ”€β”€ admin/                    # Admin panel React application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ Components/      # Admin UI components
β”‚   β”‚   β”œβ”€β”€ Pages/          # Admin page components
β”‚   β”‚   β”œβ”€β”€ assets/         # Static assets
β”‚   β”‚   β”œβ”€β”€ App.jsx         # Main Admin App component
β”‚   β”‚   └── main.jsx        # Entry point
β”‚   β”œβ”€β”€ public/             # Static assets
β”‚   └── package.json        # Admin dependencies
β”‚
└── README.md               # Project documentation

πŸš€ Installation

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn
  • MongoDB (local installation or MongoDB Atlas)

Steps

  1. Clone the repository

    git clone https://github.com/AmratKukreja/Ecommerce.git
    cd Ecommerce
  2. Install Frontend Dependencies

    cd frontend
    npm install
  3. Install Backend Dependencies

    cd ../backend
    npm install
  4. Install Admin Panel Dependencies

    cd ../admin
    npm install
  5. Database Setup

    • Ensure MongoDB is running on your system
    • Update the MongoDB connection string in backend/index.js if needed

πŸƒβ€β™‚οΈ Usage

Development Mode

  1. Start the Backend Server

    cd backend
    node index.js

    The server will run on http://localhost:4000

  2. Start the Frontend Application

    cd frontend
    npm start

    The app will run on http://localhost:3000

  3. Start the Admin Panel

    cd admin
    npm run dev

    The admin panel will run on http://localhost:5173

Production Build

  1. Build Frontend

    cd frontend
    npm run build
  2. Build Admin Panel

    cd admin
    npm run build

πŸ”Œ API Endpoints

Product Endpoints

  • GET /allproducts - Get all products
  • POST /addproduct - Add a new product (Admin)
  • POST /removeproduct - Remove a product (Admin)
  • POST /upload - Upload product image

User Endpoints

  • POST /signup - User registration
  • POST /login - User login
  • POST /addtocart - Add item to cart
  • POST /removefromcart - Remove item from cart
  • POST /getcart - Get user's cart

Static Files

  • GET /images/:filename - Access uploaded product images

πŸ›’ Application Features

Product Management

  • Dynamic product catalog with categories
  • Image upload and storage
  • Product availability tracking
  • Price management (old/new prices)

User Authentication

  • JWT-based authentication
  • Secure password handling
  • User cart persistence
  • Session management

Shopping Cart

  • Add/remove items
  • Quantity management
  • Cart persistence across sessions
  • Real-time cart updates

🀝 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 ISC License.

πŸ“ž Support

For support and questions, please contact any of the team members listed above.


Happy Shopping! πŸ›οΈ

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors