- Node.js installed
- MongoDB installed (download from https://www.mongodb.com/try/download/community)
- Navigate to backend folder:
cd d:\shoppy\backend- Install dependencies:
npm install-
Make sure MongoDB is running on your system
-
Start the backend server:
npm startThe backend will run on http://localhost:5000
- Navigate to frontend folder:
cd d:\shoppy\frontend\E-commerce- Install dependencies (if not already done):
npm install- Start the development server:
npm run devThe frontend will run on http://localhost:5173
- User Registration and Login with MongoDB
- Product browsing with images
- Shopping cart with quantity management
- Total bill calculation
- Multiple UPI payment options (Google Pay, PhonePe, Paytm, Amazon Pay)
- Responsive design for all devices
- User session management
If the backend is not running, the app will work in demo mode with mock authentication.
- POST /api/auth/register - Register new user
- POST /api/auth/login - Login user
- GET /api/products - Get all products
- POST /api/products/seed - Seed initial products (run once)
If you see "Registration failed":
- Make sure MongoDB is running
- Make sure backend server is running on port 5000
- Check console for detailed error messages
- The app will work in demo mode if backend is unavailable