This is a full-stack e-commerce platform built with the MERN stack (MongoDB, Express.js, React.js, and Node.js). It allows users to browse products, add them to a shopping cart, make purchases, and manage their accounts.
- User authentication (JWT-based)
- Product listing and details page
- Shopping cart functionality
- Checkout and payment integration (Stripe & Cash Pickup)
- Order tracking and user dashboard
- Admin dashboard for product management
- Responsive UI with React.js and Tailwind CSS
- Frontend: React.js, Tailwind CSS
- Backend: Node.js, Express.js, MongoDB
- Database: MongoDB with Mongoose ORM
- Authentication: JWT (JSON Web Tokens)
- Payment: Stripe, Cash Pickup
Ensure you have the following installed on your system:
git clone https://github.com/Omgupta12/E-Commerce-Application.git
cd E-Commerce-Application- Navigate to the backend directory:
cd backend - Install dependencies:
npm install
- Create a
.envfile in thebackenddirectory and add the following:PORT=4000 MONGODB_URI='your_mongodb_connection_string' JWT_SECRET='your_jwt_secret_key' STRIPE_SECRET_KEY='your_stripe_secret_key' CLOUDINARY_API_KEY='your_cloudinary_api_key' CLOUDINARY_SECRET_KEY='your_cloudinary_secret_key' CLOUDINARY_NAME='your_cloudinary_name'
- Run the backend server:
npm start
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Create a
.envfile in thefrontenddirectory and add the following:VITE_API_URL=http://localhost:4000
-
Start the frontend server:
npm run dev
-
Navigate to the admin directory:
cd admin -
Install dependencies:
npm install
-
Create a
.envfile in theadmindirectory and add the following:VITE_API_URL=http://localhost:4000
-
Start the admin panel server:
npm run dev
The application should now be running on:
- Frontend:
http://localhost:5173 - Backend:
http://localhost:4000 - Admin Panel:
http://localhost:5174
- Create an account on Vercel.
- Connect your GitHub repository.
- Deploy backend by selecting the
backendfolder. - Deploy frontend by selecting the
frontendfolder. - Deploy admin panel by selecting the
adminfolder. - Set up environment variables in each project as per the
.envfiles. - Deploy the projects.
POST /api/user/register- Register a new userPOST /api/user/login- Login userPOST /api/user/admin- Login admin
GET /api/product/list- Get all productsGET /api/product/single- Get product detailsPOST /api/product/add- Add new product (Admin only)DELETE /api/product/remove- Remove product (Admin only)
POST /api/cart/add- Add item to cartGET /api/cart/get- Get cart itemsPUT /api/cart/update- Update cart itemPOST /api/order/userorders- Place orderGET /api/order/list- Get All Order
Contributions are welcome! Feel free to fork the repository and submit a pull request.
This project is licensed under the MIT License.








