A production-grade full-stack e-commerce platform built with the MERN stack and deployed on AWS using industry-standard DevOps practices. Features a fully automated CI/CD pipeline β every git push to main automatically builds, tests, and deploys to AWS ECS Fargate with zero downtime.
π Live URL: http://skycommerce-alb-1652530944.ap-south-1.elb.amazonaws.com
User Browser β βΌ AWS Application Load Balancer (ALB) β βββ /api/* βββΊ Backend ECS Fargate (Node.js :5001) β β β ββββββββΌβββββββ β β MongoDB β β β Atlas β β βββββββββββββββ β ββββββββββββββββ β β AWS Secrets β β β Manager β β βββββββββββββββ β βββ /* βββΊ Frontend ECS Fargate (Nginx :80) β React.js SPA (Redux) All containers βββΊ CloudWatch Logs + Alarms
Every push to main triggers automatic deployment:
git push origin main β βΌ GitHub Actions (~4 minutes) β βββ Job 1: Test & Lint (15s) β Backend syntax check β Frontend build verification β βββ Job 2: Build & Push (60s) β Docker build (linux/amd64) β Push to AWS ECR β βββ Job 3: Deploy to ECS (2m 38s) Update ECS services Zero downtime rolling deploy Wait for health checks
| Layer | Technology |
|---|---|
| Frontend | React.js 18, Redux Toolkit, Tailwind CSS, Vite |
| Backend | Node.js 20, Express.js, REST API |
| Database | MongoDB Atlas (managed cloud) |
| Auth | JWT with HTTP-only cookies |
| Payment | Stripe (test mode) |
| Tool | Purpose |
|---|---|
| Docker | Multi-stage builds, Nginx, non-root security |
| AWS ECS Fargate | Serverless container orchestration |
| AWS ECR | Private Docker image registry |
| AWS ALB | Load balancer with path-based routing |
| AWS VPC | Custom network, public/private subnets |
| AWS Secrets Manager | Secure secrets β never in code |
| AWS CloudWatch | Logs, metrics, 4 alarms, dashboard |
| Terraform | 34 AWS resources as Infrastructure as Code |
| GitHub Actions | 3-job CI/CD pipeline |
| Git + GitHub | Branch protection, PR workflow |
34 resources managed as code β entire infrastructure recreatable in 5 minutes:
Networking VPC, 4 Subnets, IGW, Route Tables, Security Groups Load Balancing ALB, 2 Target Groups, Listener, Path Rules Containers ECS Cluster, 2 Task Definitions, 2 Fargate Services Registry 2 ECR Repositories with lifecycle policies Security 2 IAM Roles, 2 IAM Policies, Secrets Manager Monitoring 2 Log Groups, 4 Alarms, Dashboard, SNS Topic
SkyCommerce/
βββ .github/
β βββ workflows/
β βββ deploy.yml # GitHub Actions CI/CD
βββ backend/
β βββ config/
β β βββ db.js # MongoDB connection
β βββ controllers/ # Business logic handlers
β βββ middleware/ # Auth, error, upload
β βββ models/ # Mongoose schemas
β βββ routes/ # API endpoints
β βββ Dockerfile # Multi-stage build
β βββ server.js # Express entry point
βββ frontend/
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Route pages
β β βββ redux/ # State management
β β βββ utils/ # Axios interceptors
β βββ Dockerfile # Multi-stage + Nginx
β βββ nginx.conf # Production Nginx config
β βββ vite.config.js # Vite configuration
βββ terraform/
β βββ main.tf # Provider + data sources
β βββ vpc.tf # Network infrastructure
β βββ ecs.tf # ECS cluster + services
β βββ ecr.tf # Docker image registry
β βββ alb.tf # Load balancer + routing
β βββ iam.tf # Roles and policies
β βββ secrets.tf # AWS Secrets Manager
β βββ cloudwatch.tf # Monitoring + alerts
β βββ variables.tf # Input variables
β βββ outputs.tf # Output values
βββ screenshots/ # Project screenshots
βββ docker-compose.yml # Local development
βββ README.md
Customer
- Browse and search products by category/keyword
- Product details with ratings and reviews
- Shopping cart with quantity management
- Checkout with shipping address
- Order history and tracking
- JWT authentication (register/login/logout)
Admin
- Dashboard with revenue, orders, users metrics
- Full product CRUD (create, edit, delete)
- Order management (mark as delivered)
- User management
- All secrets in AWS Secrets Manager β zero secrets in code
- JWT tokens with bcrypt password hashing (10 rounds)
- Non-root user inside Docker containers
- IAM least privilege β CI/CD user has minimum permissions
- Branch protection β PRs required, no direct push to main
- ECR image scanning on every push
- Network isolation with VPC security groups
| Alarm | Threshold | Action |
|---|---|---|
| Backend CPU | > 80% | Email alert |
| Backend Memory | > 80% | Email alert |
| ALB 5XX Errors | > 10/min | Email alert |
| Response Time | > 5 seconds | Email alert |
# Clone
git clone https://github.com/jillani-07/skycommerce.git
cd skycommerce
# Backend
cd backend
cp .env.example .env
npm install
npm run dev
# Frontend (new terminal)
cd frontend
npm install
npm run dev
# Or run everything with Docker
docker-compose --env-file .env.docker up --buildSeed database:
cd backend
node seeder.js
# Admin: admin@skycommerce.com / admin123456Jillani Ansari
- GitHub: @jillani-07
- LinkedIn: www.linkedin.com/in/jillani05
MIT License




