A full-stack e-commerce project with a customer storefront, an admin dashboard, and a Node.js/Express backend.
frontend/- Customer-facing React app built with ViteAdmin/- Admin dashboard for managing products and ordersbackend/- Express API, database connection, authentication, uploads, and payments
- Frontend: React, Vite, Tailwind CSS, Axios
- Admin: React, Vite, Tailwind CSS, Axios
- Backend: Node.js, Express, MongoDB, Mongoose, Cloudinary, Stripe, Razorpay
Install dependencies separately in each app folder:
cd frontend && npm install
cd ../Admin && npm install
cd ../backend && npm installCreate a .env file in backend/ with the values used by the server:
PORT=5000
MONGODB_URI=
ACCESS_TOKEN_SECRET=
ACCESS_TOKEN_EXPIRY=15m
REFRESH_TOKEN_SECRET=
REFRESH_TOKEN_EXPIRY=7d
JWT_SECRET=
ADMIN_EMAIL=
ADMIN_PASSWORD=
CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
STRIPE_SECRET_KEY=Set the frontend API URL in both Vite apps:
VITE_BACKEND_URL=Start each project from its own folder:
# Customer frontend
cd frontend
npm run dev
# Admin dashboard
cd ../Admin
npm run dev
# Backend API
cd ../backend
npm startFrontend and admin apps support:
npm run devnpm run buildnpm run lintnpm run preview
Backend supports:
npm start
- The customer app and admin app both call the backend through
VITE_BACKEND_URL. - The backend connects to MongoDB and uses authentication tokens for user and admin flows.