- Java 21 JDK
- Node.js 18+
- MongoDB (Atlas or Local)
Create/update backend/.env:
MONGODB_URI=mongodb+srv://Shriram2005:Shriram2005@cluster0.sfh7knq.mongodb.net/ecommerce?retryWrites=true&w=majority
JWT_SECRET=mySecretKeyForJWTTokenGenerationMustBeAtLeast256BitsLong
CORS_ORIGINS=http://localhost:5173,http://localhost:3000
PORT=8080
SPRING_PROFILES_ACTIVE=devCreate frontend/.env:
VITE_API_URL=http://localhost:8080/apicd backend
.\mvnw.cmd spring-boot:run✅ Backend starts at http://localhost:8080
cd frontend
npm install
npm run dev✅ Frontend starts at http://localhost:5173
- User App: http://localhost:5173
- API Server: http://localhost:8080/api
Done! 🎉