Mahalaxmi Tailors needed a complete digital presence — an e-commerce storefront where customers could browse catalogues, place tailoring orders, and make secure payments. I built and deployed the full system in three days using the MERN stack and AWS.
Tech Stack Decisions
MongoDB for flexible product schemas, Express.js for REST APIs, React for the storefront, and Node.js on the backend. AWS CloudFormation was used to define the entire infrastructure as code — EC2 instances, RDS, S3 buckets, and CloudFront CDN — so the deployment is fully reproducible.
Authentication with JWT and RBAC
Three roles — Customer, Staff, and Admin — each with strictly scoped permissions. JWT access tokens (15-minute expiry) and refresh tokens (7-day expiry) stored in HTTP-only cookies prevent XSS-based token theft.
Razorpay Payment Integration
Orders are created server-side and Razorpay webhook signatures are verified with HMAC-SHA256 before updating order status. This prevents fraudulent order confirmations. Every payment event is logged for audit trails.
AWS CloudFormation Infrastructure
The entire AWS infrastructure is defined in a single CloudFormation template — making the deployment reproducible, version-controlled, and disaster-recoverable within minutes. EC2 runs the Node.js backend behind an Application Load Balancer, with CloudFront caching static assets globally.
"Build it once, deploy it anywhere — that's what Infrastructure as Code gives you."