Skip to content

Latest commit

 

History

History
93 lines (65 loc) · 1.54 KB

README.md

File metadata and controls

93 lines (65 loc) · 1.54 KB

Mern Shop | eCommerce Platform

  • E-Commerce platform built with the MERN stack & Redux Toolkit.

Features

  • Product reviews and ratings
  • Top products carousel
  • Product pagination
  • Product search feature
  • User profile with orders
  • Admin product management
  • Admin user management
  • Admin Order details page
  • Mark orders as delivered option
  • Checkout process (shipping, payment method etc.)
  • Database seeder (products & users)

Usage

  1. Create a MongoDB database and obtain your MongoDB URI.

Env Variables

  1. Create the .env file with following variables:
NODE_ENV = development
PORT = 5000
MONGO_URI = [MONGO_DB_URI]
JWT_SECRET = [SECRET]
PAGINATION_LIMIT = 6
  1. Change the JWT_SECRET and PAGINATION_LIMIT to what you want.

Install Dependencies

npm install
cd frontend
npm install

Run


# Run frontend (:5173) & backend (:5000)
npm run dev

# Run backend only
npm run server

Build & Deploy

# Create frontend prod build
cd frontend
npm run build

Seed Database

  1. You can use the following commands to seed the database with some sample users and products as well as destroy all data.
# Import data
npm run data:import

# Destroy data
npm run data:destroy
# Sample User Logins

Email: [email protected] (Admin)
Password: secret

Email: [email protected] (Customer)
Password: john_secret

Email: [email protected] (Customer)
Password: jane_secret

License

This project is licensed under the MIT License.