Modern e-commerce built with best practices in mind. MERN stack, Redux Toolkit for state management, Material UI for a delightful UI, and RESTful APIs for seamless integration. Dive in and explore!
MIT License
MERN Ecommerce is a full-stack application designed to transform your online shopping experience. Built with the MERN stack (MongoDB, Express.js, React, Node.js), it leverages Redux Toolkit for efficient state management and Material UI for a sleek, user-friendly interface. This project offers a robust platform for both users and admins, packed with essential features for a seamless experience.
Product Reviews:
Wishlist:
Order Management:
Profile Management:
Shopping Cart:
Product Management:
Order Management:
Secure Authentication:
Intuitive Interface:
git clone https://github.com/RishiBakshii/mern-ecommerce.git
cd mern-ecommerce
Tip: To efficiently install dependencies for both frontend and backend simultaneously, use split terminals.
Install frontend dependencies
cd frontend
npm install
Install backend dependencies
cd backend
npm install
Backend
.env
file in the backend
directory.# Database connection string
MONGO_URI="mongodb://localhost:27017/your-database-name"
# Frontend URL (adjust if needed)
ORIGIN="http://localhost:3000"
# Email credentials for sending password resets and OTPs
EMAIL="[email protected]"
PASSWORD="your-email-password"
# Token and cookie expiration settings
LOGIN_TOKEN_EXPIRATION="30d" # Days
OTP_EXPIRATION_TIME="120000" # Milliseconds
PASSWORD_RESET_TOKEN_EXPIRATION="2m" # Minutes
COOKIE_EXPIRATION_DAYS="30" # Days
# Secret key for jwt security
SECRET_KEY="your-secret-key"
# Environment (production/development)
PRODUCTION="false" # Initially set to false for development
Frontend
.env
file in the frontend
directory# Backend URL (adjust if needed)
REACT_APP_BASE_URL="http://localhost:8000"
Important
.env
file from version control to protect sensitive information.Steps:
backend
directory: cd backend
npm run seed
( This script executes the seed.js
file within the seed
subdirectory equivalent to running node seed/seed.js
)Important:
split terminal
to avoid conflicts.nodemon
installed globally to run the backend development servers using npm run dev
. You can install it globally using npm install -g nodemon
.backend
directory: cd backend
npm run dev
(or npm start)frontend
directory: cd frontend
npm start
login credentials
email: [email protected]
pass: helloWorld@123
Please Note: While the demo account provides a convenient way to explore many features, it has some limitations:
What this means:
What to do?
Once both servers are running, you can access them at the following URL's:
Don't forget to star the repository and share your feedback!✨