Full-stack e-commerce project with three separate apps:
- Customer storefront (React + Vite)
- Admin dashboard (React + Vite)
- Backend API (Node.js + Express + MongoDB)
This repository is structured for real shopping flow features: product browsing, cart management, checkout, payment integration, and admin product/order operations.
kumar/
frontend/ -> Customer web app
admin/ -> Admin panel
backend/ -> REST API + business logic
- React 19
- Vite 7
- React Router
- Axios
- Tailwind CSS
- React Toastify
- React 19
- Vite 7
- React Router
- Axios
- Tailwind CSS
- React Toastify
- Node.js
- Express
- MongoDB + Mongoose
- JWT authentication
- Bcrypt password hashing
- Cloudinary image upload
- Stripe payment integration
- Browse products by collection/category
- Product detail page with size selection
- Add to cart and update quantity
- User registration/login
- Place orders with:
- Cash on Delivery (COD)
- Stripe checkout flow
- Order history view
- Admin login
- Add new products with up to 4 images
- Product listing management
- View all customer orders
- Update order status
- User auth APIs (register, login, admin login)
- Product APIs (list, add, remove, single)
- Cart APIs (get, add, update)
- Order APIs (place COD, place Stripe, verify Stripe, list orders, update status)
Create a .env file inside backend/:
PORT=4000
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=your_admin_password
CLOUDINARY_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
STRIPE_SECRET_KEY=your_stripe_secret_keyCreate a .env file inside frontend/:
VITE_BACKEND_URL=http://localhost:4000Create a .env file inside admin/:
VITE_BACKEND_URL=http://localhost:4000git clone https://github.com/Maverick-841/kumar.git
cd kumarcd backend && npm install
cd ../frontend && npm install
cd ../admin && npm installTerminal 1 (backend):
cd backend
npm run serverTerminal 2 (frontend):
cd frontend
npm run devTerminal 3 (admin):
cd admin
npm run dev- Backend API: http://localhost:4000
- Frontend app: http://localhost:5173
- Admin app: http://localhost:5174 (or next free Vite port)
/api/user/api/product/api/cart/api/order
- Backend includes Vercel config in
backend/vercel.json - Frontend includes Vercel config in
frontend/vercel.json - Admin includes Vercel config in
admin/vercel.json
For production:
- Set all required environment variables in your hosting platform
- Replace local
VITE_BACKEND_URLwith deployed backend URL - Confirm CORS policy allows frontend/admin domains
- Add
.env.examplefiles in all apps - Add refresh token flow for auth
- Add input validation middleware for all routes
- Add unit/integration tests
- Add CI workflow (lint + build checks)
Maverick-841