Movie Ticketing
Seat booking for Thai cinemas with NestJS on ECS Fargate and PostgreSQL on RDS. The demo is offline.

How it works
Amazon CloudFront
Amazon S3
Application Load Balancer
Amazon ECS on Fargate
Amazon RDS
Amazon CloudWatch
Amazon SNS- Terraform
- GitHub Actions
Amazon ECR
SSM Parameter Store
AWS WAF
3 paths · 12 services
How it works
Amazon CloudFront
Amazon S3
Application Load Balancer
Amazon ECS on Fargate
Amazon RDS
Amazon CloudWatch
Amazon SNS
- Terraform
- GitHub Actions
Amazon ECR
SSM Parameter Store
AWS WAF
3 paths · 12 services
Runs inap-southeast-7Thailand; other regions are marked on their box.
d2d95bxlk5dsty.cloudfront.netOpening the sitefrom the browser
Amazon CloudFront
Serves the site over HTTPS with security headers
AWS WAF · us‑east‑1
- Reads S3 through OAC
Amazon S3
Private bucket with the static Next.js build, Thai and English
- Block Public Access on
- Only CloudFront can read (OAC)
/api/*Booking a seatfrom the booking page
Amazon CloudFront
Sends /api/* into the VPC, never cached
- VPC origin
Application Load Balancer
Internal: no public address, only CloudFront reaches it
Amazon ECS on Fargate
api
NestJS API containers, ARM64 on Fargate Spot
- Auto scaling 1–2 tasks · CPU 60%
- Inbound only from the load balancer
- No NAT Gateway (cost)
Amazon RDS
PostgreSQL 17 in private subnets; locks seats in one transaction
- TLS forced
- Daily backups
- Separate migrate and app roles
ecs-high-cpuAlerting mefrom the service metrics
Amazon CloudWatch
ecs-high-cpu
Alarm: the api service averages over 80% CPU for 5 minutes
- Alarm and OK states
Amazon SNS
ecs-monitoring-alerts
Topic that emails each state change to my inbox
- Email subscription
Behind it all
Terraform
Every AWS resource as code, applied in phases
Remote state in a private S3 bucket
- State locking
GitHub Actions
Tests, builds ARM64 images, migrates, then rolls out the API and the site
- OIDC · no stored AWS keys
- Secret scan (gitleaks)
Amazon ECR
Container images, tagged by git commit
- Keeps the last 5
SSM Parameter Store
Database passwords and API secrets, generated by Terraform
- The task reads only its own
Amazon CloudWatch
Logs from the API and the one-off tasks, and the CPU alarm
- Kept 7 days
Built with
Frontend · Backend · Cloud · Delivery & tests
Built with
Frontend · Backend · Cloud · Delivery & tests
- Frontend
- Next.js 16 (static export)
- next-intl (Thai, English)
- TanStack Query
- React Hook Form
- Tailwind CSS
- Backend
- NestJS 12
- Prisma 7
- PostgreSQL 17
- Zod
- Stripe (test mode)
- Cloud
- ECS Fargate Spot
- Application Auto Scaling
- ECR
- RDS
- ALB
- CloudFront
- WAF
- S3
- SSM Parameter Store
- CloudWatch Logs and alarms
- SNS
- Delivery & tests
- Terraform
- GitHub Actions (OIDC)
- Docker
- Bash + AWS CLI
- Vitest
- Testcontainers
- Playwright












