Skip to content

Welcome to the MERN eCommerce Platform, a full-featured online shopping application built with MongoDB, Express.js, React, and Node.js.

Notifications You must be signed in to change notification settings

Krut369/MERN-eCommerce-main

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MERN eCommerce Platform

Welcome to the MERN eCommerce Platform, a full-featured online shopping application built with MongoDB, Express.js, React, and Node.js.

Live Demo: https://mern-shop-abxs.onrender.com/
Note: Render's free tier may sleep after 15 minutes of inactivity. The first request after reactivation may be slow.


Features

  • 🛒 Shopping cart: Add, remove, and manage products.
  • ⭐ Product reviews & ratings.
  • 🎠 Top products carousel.
  • 📄 Product pagination & search.
  • 👤 User profile & order history.
  • 🛠️ Admin dashboard: Manage admins, products, users, and orders.
  • 🚚 Mark orders as delivered.
  • 💳 Razorpay payment integration.
  • 📦 Database seeder for sample data.
  • 📧 Email notifications via Brevo SMTP.

Getting Started

Prerequisites

  1. Fork this repo to your GitHub account.

  2. Clone your fork:

    git clone https://github.com/Krut/MERN-eCommerce.git
    cd MERN-eCommerce
  3. Create a MongoDB database (MongoDB Atlas).

  4. Create a Razorpay account (Razorpay).

  5. Create a Brevo account (Brevo).

Environment Variables

Rename .env.example to .env and fill in your credentials:

NODE_ENV=development
PORT=5000
JWT_SECRET=ADD_YOUR_JWT_SECRET_HERE
MONGO_URI=ADD_YOUR_MONGO_URI_HERE
RAZORPAY_KEY_ID=ADD_YOUR_RAZORPAY_KEY_ID
RAZORPAY_KEY_SECRET=ADD_YOUR_RAZORPAY_KEY_SECRET
PAGINATION_MAX_LIMIT=12
EMAIL_HOST=smtp-relay.brevo.com
EMAIL_PORT=587
EMAIL_USER=ADD_YOUR_BREVO_LOGIN
EMAIL_PASS=ADD_YOUR_BREVO_PASSWORD
EMAIL_FROM=ADD_YOUR_BREVO_LOGIN

Install Dependencies

npm install
cd frontend
npm install

Running the App

To run both frontend and backend together:

npm run dev

To run only the backend:

npm run server

Build & Deploy

To build the frontend for production:

cd frontend
npm run build

Seed Database

Import sample users/products:

npm run data:import

Destroy all data:

npm run data:destroy

Sample Logins


Contributing

We welcome contributions!
Fork the repo, create a branch, make changes, and submit a pull request.

git checkout -b feature/your-feature-name
# or
git checkout -b issues/your-issue-name

Test your changes, follow coding conventions, and update documentation if needed.


Commit & PR

git add .
git commit -m "Describe your changes"
git push origin feature/your-feature-name

Open a pull request on GitHub with a clear title and description.


Code Review

Project maintainers will review your PR. Please address any feedback for quality and compatibility.


Thank You!

Thank you for using and contributing to the MERN eCommerce Platform!
If you have questions, use the issue tracker or discussions. Happy

About

Welcome to the MERN eCommerce Platform, a full-featured online shopping application built with MongoDB, Express.js, React, and Node.js.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published