Yogndrr / MERN-Ecommerce-Site

Seamless shopping, search and explore different product categories, add products to cart, and checkout swiftly. Become a seller and add products, monitor sales, and gather customer feedback.
https://shopcart-ecommerce-site.vercel.app/
54 stars 27 forks source link
ecommerce ecommerce-website flipkart-clone material-ui mern mern-ecommerce mern-stack mongoose nodejs reactjs redux-toolkit

SHOPCART: Ecommerce Site

Seamless shopping, search and explore different product categories, add products to cart, and checkout swiftly.
Become a seller and add products, monitor sales, and gather customer feedback.


Youtube Video

LinkedIn

About

ShopCart is an ecommerce site developed using the MERN (MongoDB, Express.js, React, Node.js) stack. It offers a user-friendly and efficient shopping experience for customers, while providing sellers with essential tools to manage their products and sales.

Features

Technologies Used


Installation

git clone https://github.com/Yogndrr/MERN-Ecommerce-Site.git

Open 2 terminals in separate windows/tabs.

Terminal 1: Setting Up Backend

cd backend
npm install
npm start

Create a file called .env in the backend folder. Inside it write this :

MONGO_URL = mongodb://127.0.0.1/ecommerce

SECRET_KEY = 'secret-key'

Instead of this link write your database link.

Terminal 2: Setting Up Frontend

cd frontend
npm install
npm start

Now, navigate to localhost:3000 in your browser. The Backend API will be running at localhost:5000.

Error Solution

If you encounter a network error while signing up, follow these steps to resolve it:

  1. Navigate to the src > redux > userHandle.js file.

  2. Add the following line after the import statements:

const REACT_APP_BASE_URL = "http://localhost:5000";
  1. Replace all instances of process.env.REACT_APP_BASE_URL with REACT_APP_BASE_URL.

The issue arises because the .env file in the frontend may not work for all users, while it works for me.

These steps should resolve the network error in the frontend. If the issue persists, feel free to contact me for further assistance.

Don't forget to leave a star for this project if you found the solution helpful. Thank you!

Deployment