A modern, minimalist e-commerce platform built with the MERN stack (MongoDB, Express, React, Node.js) and TypeScript.
- Clean UI: Modern, minimalist design using Tailwind CSS and Inter font.
- Authentication: Secure JWT-based authentication with protected routes.
- Product Management: Search, pagination, and administrative controls.
- Shopping Cart: Add, remove, and update quantities with real-time stock validation.
- Order System: Secure checkout flow with inventory decrementing.
- Security: Equipped with
helmet,cors, andexpress-rate-limitfor production safety. - Logging: Professional logging with Winston (logs to console and files).
- Frontend: React 19, Vite, TypeScript, Tailwind CSS, Axios.
- Backend: Node.js, Express, MongoDB (Mongoose), Winston.
- Node.js installed
- MongoDB Cluster (Atlas)
git clone <your-repo-url>
cd shopscalecd backend
npm installCreate a .env file in the backend/ directory using .env.example:
PORT=4000
DB_USER=your_db_username
DB_PASSWORD=your_db_password
DB_HOST=your_cluster.mongodb.net
DB_NAME=shopscale
JWT_SECRET=your_jwt_secret
FRONTEND_URL=http://localhost:5173Run the backend:
npm run devcd ../frontend
npm installCreate a .env file in the frontend/ directory:
VITE_API_BASE_URL=http://localhost:4000/apiRun the frontend:
npm run dev- Inventory Logic: Prevents overselling by validating stock before orders.
- Mass Assignment Protection: Strictly pick allowed fields during updates.
- Rate Limiting: Protects API from brute-force attacks.
- Environment Aware: Uses dynamic base URLs for seamless deployment.
ISC