An E-commerce Website built with the MERN stack.
- MongoDB - NoSQL Database for storing product, user, and order data.
- Express.js - Web framework for building the backend.
- React.js - Frontend library for creating dynamic user interfaces.
- Node.js - JavaScript runtime for server-side development.
- Redux - State management for efficient data handling.
- Axios - HTTP client for API requests.
- Mongoose - MongoDB ODM for object modeling.
- Cloudinary - Media storage for product images.
- Postman - API testing and development tool.
- Stripe - Payment gateway integration.
- JWT (JSON Web Token) - Authentication and security.
- Bcrypt.js - Data encryption for user passwords.
- Multer - File upload handling for product images.
- Dotenv - Environment variable management.
After cloning, run this command in the root folder:
npm installNavigate to the "frontend" folder, run these commands:
npm install
npm run buildWait for the application build. After that, open the backend/config/config.env and update the MongoDB connection string, updating config env placeholders:
DB_LOCAL_URI=mongodb://localhost:27017/Ur_folderNavigate back to the "root" folder and run this command for loading demo data:
npm run seederRun this below command to run the app in production mode:
npm run prodPostman Collection To test the API's
Open http://localhost:8000 and test the application.
+frontend
+src
| | index.js
| | store.js
| | App.js
| +components
| | | Home.js
| | |+product
| | | | ProductReview.js
| | | | Product.js
| | | | ProductDetail.js
| | | | ProductSearch.js
| | |+order
| | | | UserOrders.js
| | | | OrderDetail.js
| | |+route
| | | | ProtectedRoute.js
| | |+cart
| | | | OrderSuccess.js
| | | | CheckoutStep.js
| | | | ConfirmOrder.js
| | | | Cart.js
| | | | Payment.js
| | | | Shipping.js
| | |+admin
| | | | Sidebar.js
| | | | UserList.js
| | | | ProductList.js
| | | | OrderList.js
| | | | UpdateUser.js
| | | | ReviewList.js
| | | | Dashboard.js
| | | | UpdateOrder.js
| | | | NewProduct.js
| | | | UpdateProduct.js
| | |+user
| | | | Profile.js
| | | | ForgotPassword.js
| | | | UpdatePassword.js
| | | | ResetPassword.js
| | | | Login.js
| | | | UpdateProfile.js
| | | | Register.js
| | |+layouts
| | | Loader.js
| | | MetaData.js
| | | Footer.js
| | | Search.js
| | | Header.js
|+slices
| | | productsSlice.js
| | | cartSlice.js
| | | userSlice.js
| | | orderSlice.js
| | | authSlice.js
| | | productSlice.js
|+actions
| | cartActions.js
| | orderActions.js
| | productActions.js
| | userActions.js
+public
| robots.txt
| manifest.json
| index.html
| favicon.ico
+images
+backend
| server.js
| app.js
|+routes
| | payment.js
| | order.js
| | product.js
| | auth.js
|+models
| | userModel.js
| | orderModel.js
| | productModel.js
|+uploads
|+user
| | user
| | _c49fab8e-0ccf-4724-a31a-977181660259
| | Apple-PNG-Images
| | alexander-hipp-iEEBWgY_6lA-unsplash
|+product
| realme_6
| pexels-math-90946
| pexels-pixabay-279906
|+controllers
| | paymentController.js
| | orderController.js
| | productController.js
| | authController.js
|+config
| | database.js
| | config.env
|+middlewares
| | catchAsyncError.js
| | authenticate.js
| | error.js
|+data
| | products.json
|+utils
| | errorHandler.js
| | jwt.js
| | seeder.js
| | email.js
| | apiFeatures.js
|.