A simple MERN (MongoDB, Express, React, Node.js) stack e-commerce demo project.
- Product listing and creation (frontend with React + Chakra UI)
- RESTful API for products (backend with Express & MongoDB)
- State management with Zustand
- Modern UI with Chakra UI
mern-shop/
├── backend/
│ ├── server.js
│ ├── config/
│ ├── controllers/
│ ├── models/
│ └── routes/
├── frontend/
│ ├── src/
│ ├── public/
│ ├── package.json
│ └── vite.config.js
├── package.json
└── README.md
- Node.js (v18+ recommended)
- MongoDB instance (local or cloud)
- Clone the repository:
git clone <repo-url> cd mern-shop
- Install backend dependencies:
npm install
- Install frontend dependencies:
cd frontend npm install cd ..
Create a .env file in the backend/ directory with:
MONGO_URI=<your-mongodb-uri>
PORT=5000
-
Development:
npm run dev
- Backend: http://localhost:5000
- Frontend: http://localhost:5173
-
Production Build:
npm run build npm start