This is a full-stack E-Commerce application developed using the MERN (MongoDB, Express.js, React.js, Node.js) stack. It provides a scalable and robust foundation for building an online shopping platform.
- User Authentication: Users can create accounts, log in, and securely authenticate.
- Product Management: Add, edit, and delete products with details such as name, description, price, and images.
- Shopping Cart: Users can add products to their shopping cart and proceed to checkout.
- Order Processing: Secure checkout process and order history for users.
- Admin Panel: Separate dashboard for administrators to manage products, users, and orders.
- Responsive Design: The application is designed to be accessible and usable on various devices.
Before you begin, ensure you have the following installed:
-
Clone the repository:
git clone https://github.com/your-username/mern-e-commerce.git
-
Change into the project directory:
cd mern-e-commerce
-
Install dependencies for the server:
npm install
-
Change into the client directory and install client dependencies:
cd client npm install
-
Go back to the project root:
cd ..
-
Create a
.env
file in the root directory with the following variables:NODE_ENV=development PORT=5000 MONGO_URI=your_mongo_db_uri JWT_SECRET=your_jwt_secret
Replace
your_mongo_db_uri
andyour_jwt_secret
with your MongoDB connection string and a secret key for JWT.
-
Start the server:
npm run server
-
Start the client:
npm run client
-
Open your browser and visit http://localhost:3000
-
Frontend:
- React.js
- Redux (State Management)
- Axios (HTTP requests)
-
Backend:
- Node.js
- Express.js
- MongoDB (Database)
- Mongoose (Object Data Modeling)
-
Authentication:
- JSON Web Tokens (JWT)
Contributions are welcome! Please fork the repository and create a pull request with your changes.
This project is licensed under the MIT License - see the LICENSE file for details.