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.
- 🛒 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.
-
Fork this repo to your GitHub account.
-
Clone your fork:
git clone https://github.com/Krut/MERN-eCommerce.git cd MERN-eCommerce -
Create a MongoDB database (MongoDB Atlas).
-
Create a Razorpay account (Razorpay).
-
Create a Brevo account (Brevo).
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_LOGINnpm install
cd frontend
npm installTo run both frontend and backend together:
npm run devTo run only the backend:
npm run serverTo build the frontend for production:
cd frontend
npm run buildImport sample users/products:
npm run data:importDestroy all data:
npm run data:destroy-
Admin Dashboard:
Admin Login
Email: [email protected]
Password: admin123 -
Customer Logins:
Customer Login- John Doe: [email protected] / john123
- Alice Smith: [email protected] / alice123
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-nameTest your changes, follow coding conventions, and update documentation if needed.
git add .
git commit -m "Describe your changes"
git push origin feature/your-feature-nameOpen a pull request on GitHub with a clear title and description.
Project maintainers will review your PR. Please address any feedback for quality and compatibility.
Thank you for using and contributing to the MERN eCommerce Platform!
If you have questions, use the issue tracker or discussions. Happy