A Full Stack E-commerce Web Application Built Atop the MERN Stack

Shipkart

MERN Stack Web application Features Redux for state management

Usage

Create a .env file in the root of the project Copy the following files onto it and specify your appropriate MONGO_URI

NODE_ENV = development
PORT = 5000
MONGO_URI =

Install dependencies

npm install

cd frontend && npm install

cd ..

Run Server

Make sure you are connected to MongoDB atlas by specifying appropriate environment variable values.

npm run server  # Express API  :5000

npm run dev  # MERN APP

Postman Routes

Test your routes in PostMan with the following…

Products Routes

  1. Get all products - GET http://localhost:5000/api/products

  2. Get a specific product - GET http://localhost:5000/api/products/:id

Body

{
        "rating": 4.5,
        "numReviews": 4,
        "price": 89.99,
        "countInStock": 3,
        "_id": "",
        "name": "Airpods Wireless Bluetooth Headphones",
        "image": "/images/airpods.jpg",
        "description": "Bluetooth technology lets you connect it with compatible devices wirelessly High-quality AAC audio offers immersive listening experience Built-in microphone allows you to take calls while working",
        "brand": "Apple",
        "category": "Electronics",
        "user": "",
        "__v": 0,
        "createdAt": "2020-11-09T19:10:20.499Z",
        "updatedAt": "2020-11-09T19:10:20.499Z"
}

User Auth Routes

  1. Register a user - POST http://localhost:5000/api/users

  2. Login a user - POST http://localhost:5000/api/users/login

  3. Get a specific user - GET http://localhost:5000/api/users/profile

  4. Update a specific user - PUT http://localhost:5000/api/users/profile

Download Details:

Author: sujitmohanty

Source Code: https://github.com/sujitmohanty/shipkart

#react #reactjs #javascript

A Full Stack E-commerce Web Application Built Atop the MERN Stack
9.05 GEEK