A MERN-based e-commerce application demonstrating complete e-commerce flows (auth → catalogue → cart → checkout) with MongoDB-backed data handling and a documented setup for local execution.
- User registration and sign-in
- Product catalogue and product details
- Search and category-based browsing (as implemented)
- Shopping cart workflow
- Admin operations (products/categories/orders) (if configured in your current build)
- Optional payment integration variables (Braintree)
This repository follows a standard MERN separation:
- Client: React app (
/client) - Server: Express API (
server.js) exposing/api/*routes - Database: MongoDB via Mongoose
- Auth: JWT-based auth flow (configured via environment variables)
Architecture flow (text):
User → React Client → Express API (/api) → MongoDB
- Frontend: React (Create React App in
/client) - Backend: Node.js, Express
- Database: MongoDB, Mongoose
- Auth: JWT
- Dev tooling: Nodemon, Concurrently
- Payments (optional): Braintree
git clone https://github.com/HamnaIqbal44/mern-ecommerce-master.git
cd mern-ecommerce-masternpm install
cd client
npm install
cd ..Create a .env file in the repo root:
MONGODB_URI=<YOUR_MONGODB_URI>
JWT_SECRET=<YOUR_JWT_SECRET>
BRAINTREE_MERCHANT_ID=<OPTIONAL>
BRAINTREE_PUBLIC_KEY=<OPTIONAL>
BRAINTREE_PRIVATE_KEY=<OPTIONAL>Create client/.env:
REACT_APP_API_URL=<YOUR_API_URL>npm run devBackend defaults to port
5000unlessPORTis set; frontend runs via CRA defaults.
- Start the app (
npm run dev). - Register/login.
- Browse products and add to cart.
- Check admin flows (if configured).
Hamna Iqbal
🎓 Final Year BS Software Engineering 📌 Project Domain: Software Engineering, Web Development