Welcome to the E-Commerce MegaMart project! This is a comprehensive e-commerce application showcasing both front-end and back-end development skills. The project is designed to provide a seamless shopping experience, complete with user authentication, product management, and a fully functional admin panel.
Check out the video demos of the Admin Page and Home Page:
-
Project Live Demo Youtube Link :- https://youtu.be/J1gE6f9pMZE?si=IYfM62kw1-JCu5HU
The E-Commerce MegaMart project is built using the MERN stack, which includes:
- MongoDB: Database for storing product details, user information, and order data.
- Express.js: Backend framework for building the server-side application.
- React.js: Frontend framework for developing a responsive and interactive user interface.
- Node.js: Runtime environment for building the server-side logic.
- User Authentication with JWT: Secure user login and registration using JSON Web Tokens (JWT) to maintain user sessions.
- RESTful API: Built using Express.js, providing clean and structured endpoints for efficient client-server communication.
- Product Management: Admin can add, update, or delete products.
- Order Management: Users can view their orders; Admin can manage order statuses.
- Responsive Design: Optimized for both desktop and mobile devices.
frontend/
: Contains the React frontend code.backend/
: Contains the Express backend code.admin/
: Contains the admin panel code using React.
To run the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/harishsemwal/E-Commerce-MegaMart.git cd E-Commerce-MegaMart
-
Install dependencies:
cd frontend npm install cd ../backend npm install cd ../admin yarn install
-
Run the development servers:
Open three terminal windows or use three terminal tabs:
Frontend:
cd frontend npm start
Backend:
cd backend npm run dev
Admin Panel:
cd admin yarn run dev
-
Open your browser and navigate to:
http://localhost:3000
The backend API is designed following REST principles. Here are some key endpoints:
-
User Authentication:
POST /api/auth/register
: Register a new user.POST /api/auth/login
: Authenticate a user and issue a JWT.GET /api/auth/logout
: Invalidate the user's session.
-
Product Management:
GET /api/products
: Retrieve a list of products.POST /api/products
: Add a new product (Admin only).PUT /api/products/:id
: Update an existing product (Admin only).DELETE /api/products/:id
: Delete a product (Admin only).
-
Order Management:
GET /api/orders
: Retrieve user orders.POST /api/orders
: Place a new order.PUT /api/orders/:id
: Update order status (Admin only).
To deploy the application, follow the deployment guidelines for your hosting provider. Ensure that the environment variables are properly configured for production.
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Feel free to open an issue or submit a pull request.
For any questions or feedback, feel free to contact Harish Prasad Semwal.
Feel free to make any more changes or ask for further customizations!