FOREVER is a clothing e-commerce platform built on the MERN stack (MongoDB, Express, React, Node.js). It features secure payments with Razorpay & Stripe, image storage via Cloudinary, and a modern, responsive UI. Designed for scalability, it delivers a seamless online shopping experience for fashion enthusiasts.
Prerequisites
- Node.js
- Mongodb Atlas
- Cloudinary
Frontend:
npm install
npm install react-router-dom react-toastifyBackend:
npm install
npm i cors dotenv express jsonwebtoken mongoose multer nodemon razorpay stripe validator cloudinary bcrypt Admin:
npm install
npm install axios react-router-dom react-toastifyBackend
- Create a
.envfile in thebackenddirectory. - Add the following variables with appropriate values
JWT_SECRET = "-------- Anything --------"
ADMIN_EMAIL = "admin@example.com"
ADMIN_PASSWORD = "admin123"
MONGODB_URI = "-------- Paste Your Mongo URI Here --------"
CLOUDINARY_API_KEY = "-------- Paste Cloudinary API key --------"
CLOUDINARY_SECRET_KEY = "-------- Paste Cloudinary SECRET key --------"
CLOUDINARY_NAME = "-------- Paste Cloudinary cloud name --------"
STRIPE_SECRET_KEY = "-------- Paste Stripe Secret key --------"
RAZORPAY_KEY_SECRET = '-------- Paste Razorpay Secret key --------'
RAZORPAY_KEY_ID = '-------- Paste Razorpay key Id --------'
Frontend
- Create a
.envfile in thefrontenddirectory - Add the following variable:
VITE_BACKEND_URL = "http://localhost:4000"
VITE_RAZORPAY_KEY_ID = '-------- Paste Razorpay key Id --------'
Admin
- Create a
.envfile in theadmindirectory - Add the following variable:
VITE_BACKEND_URL = "http://localhost:4000"
- Navigate to the
backenddirectory:cd backend - Start the server:
npm run server
- Navigate to the
frontend&admindirectory:cd frontend/cd admin - Start the server:
npm run dev
