Skip to content

Maverick-841/kumar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kumar E-Commerce Platform

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.

Project Structure

kumar/
  frontend/   -> Customer web app
  admin/      -> Admin panel
  backend/    -> REST API + business logic

Tech Stack

Frontend (Customer)

  • React 19
  • Vite 7
  • React Router
  • Axios
  • Tailwind CSS
  • React Toastify

Admin

  • React 19
  • Vite 7
  • React Router
  • Axios
  • Tailwind CSS
  • React Toastify

Backend

  • Node.js
  • Express
  • MongoDB + Mongoose
  • JWT authentication
  • Bcrypt password hashing
  • Cloudinary image upload
  • Stripe payment integration

Core Features

Customer App

  • 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 App

  • Admin login
  • Add new products with up to 4 images
  • Product listing management
  • View all customer orders
  • Update order status

Backend API

  • 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)

Environment Variables

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_key

Create a .env file inside frontend/:

VITE_BACKEND_URL=http://localhost:4000

Create a .env file inside admin/:

VITE_BACKEND_URL=http://localhost:4000

Local Setup

1) Clone and enter project

git clone https://github.com/Maverick-841/kumar.git
cd kumar

2) Install dependencies

cd backend && npm install
cd ../frontend && npm install
cd ../admin && npm install

3) Run all apps (use 3 terminals)

Terminal 1 (backend):

cd backend
npm run server

Terminal 2 (frontend):

cd frontend
npm run dev

Terminal 3 (admin):

cd admin
npm run dev

Default Local URLs

API Route Groups

  • /api/user
  • /api/product
  • /api/cart
  • /api/order

Deployment Notes

  • 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_URL with deployed backend URL
  • Confirm CORS policy allows frontend/admin domains

Recommended Improvements

  • Add .env.example files 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)

Author

Maverick-841

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages