Production-oriented MERN E-Commerce application containerized with Docker and deployed on Kubernetes.
The project demonstrates a DevOps workflow around a MERN application, including containerization, Kubernetes deployments, service discovery, Ingress routing, health checks, autoscaling, Redis caching, MongoDB persistence and application configuration through Kubernetes resources.
┌─────────────────┐
│ User │
└────────┬────────┘
│
▼
┌─────────────────┐
│ NGINX Ingress │
│ Controller │
└────────┬────────┘
│
▼
┌─────────────────────────┐
│ Frontend Service │
└────────────┬────────────┘
│
▼
┌─────────────────────────┐
│ React Frontend │
│ NGINX Container │
└────────────┬────────────┘
│
│ API Requests
▼
┌─────────────────────────┐
│ Backend Service │
│ :5000 │
└────────────┬────────────┘
│
┌───────────────┴───────────────┐
│ │
▼ ▼
┌──────────────────┐ ┌──────────────────┐
│ Node.js / │ │ Redis │
│ Express Backend │ │ Cache │
│ │ │ :6379 │
└────────┬─────────┘ └──────────────────┘
│
▼
┌──────────────────┐
│ MongoDB │
│ :27017 │
│ StatefulSet │
└──────────────────┘
### Setup .env file
```bash
PORT=5000
MONGO_URI=your_mongo_uri
UPSTASH_REDIS_URL=your_redis_url
ACCESS_TOKEN_SECRET=your_access_token_secret
REFRESH_TOKEN_SECRET=your_refresh_token_secret
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
STRIPE_SECRET_KEY=your_stripe_secret_key
CLIENT_URL=http://localhost:5173
NODE_ENV=development
npm run buildnpm run start