Skip to content

Harshbansal8705/ECommerce-Website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ecommerce Website

Table of Contents

Introduction

This repository contains an Ecommerce website built using the MERN stack (MongoDB, Express, React, and Node.js). The application allows users to browse products, add them to the cart, and purchase them. The application is hosted live at ecommerce-steel-eight.vercel.app.

Features

  • User authentication and authorization
  • Product browsing and searching
  • Shopping cart functionality
  • Order management
  • Responsive design

Technologies

  • MongoDB
  • Node.js
  • Express.js
  • React
  • Vercel (for hosting)

Installation and Usage

To set up this project locally, follow these steps:

Backend (Node.js + Express)

  1. Clone the repository:

    git clone https://github.com/Harshbansal8705/ECommerce-Website.git
    cd ECommerce-Website/backend
  2. Install dependencies:

    npm install
  3. Create a .env file and add the necessary environment variables:

    MONGODB_URI = <your-mongodb-uri>
    JWT_SECRET = <your-jwt-secret>
    
  4. Populate the MongoDB database with dummy product data:

    node processor/dbgenerate.js
  5. Start the backend server:

    npm start

Frontend (React)

  1. Navigate to the frontend directory:

    cd ../frontend
  2. Create a .env file and add the necessary environment variables:

    REACT_APP_BACKEND_URL = <your-backend-server-url>
    
  3. Install dependencies:

    npm install
  4. Start the frontend development server:

    npm start
  5. Open http://localhost:3000 in your browser to use the application locally.

Project Structure

ECommerce-Website/
├── backend/
│   ├── api/
│   ├── controller/
│   ├── middlewares/
│   ├── model/
│   ├── processor/
│   ├── package-lock.json
│   ├── package.json
│   └── vercel.json
├── frontend/
│   ├── public/
│   ├── src/
│   ├── package-lock.json
│   ├── package.json
│   └── tailwind.config.js
├── .gitignore
└── README.md

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for more details.