Skip to content
VANHONG

Web case study

Coffee Commerce

Full-stack specialty coffee e-commerce platform for Cambodia with packaged beans, prepared drinks, bilingual EN/KM storefront, and AWS ECS Fargate deployment.

Coffee Commerce English storefront showing USD/KHR currency switcher and editorial coffee hero

Project overview

Bilingual specialty coffee storefront and Spring Boot API deployed on AWS ECS Fargate.

Full-stack specialty coffee e-commerce platform for Cambodia with packaged beans, prepared drinks, bilingual EN/KM storefront, and AWS ECS Fargate deployment.

Problem or motivation

Specialty coffee retailers in Cambodia need a unified commerce workflow supporting both stocked packaged beans and customizable prepared drinks—with dual USD/KHR pricing, English and Khmer localization, branch hours, and reliable inventory reservations.

What I built

  • Engineered a bilingual (English and Khmer) Next.js 15 App Router storefront with live USD/KHR currency switching, packaged coffee shop, customizable drink bar, guest and account checkout, order tracking, and an admin operations console.
  • Built a Java 21 / Spring Boot 3.5 REST API with Flyway-migrated PostgreSQL schemas, JWT HttpOnly cookie authentication, auth rate limiting, stock reservations, order state transitions, audit logging, and pluggable payment adapters.
  • Provisioned AWS infrastructure with Terraform in ap-southeast-2—including a 2-AZ VPC, same-origin Application Load Balancer, ECS Fargate services with Service Connect, private RDS PostgreSQL 16, encrypted S3 media storage, and GitHub Actions deployment.

Technology stack

  • Next.js
  • TypeScript
  • Tailwind CSS
  • Spring Boot
  • PostgreSQL
  • AWS ECS
  • Terraform
  • Docker
  • Monorepo with Next.js 15 storefront (apps/web), Java 21 / Spring Boot 3.5 API (services/api), and Terraform AWS infrastructure (infra/terraform).
  • Includes 9 Flyway PostgreSQL migrations (V1–V9), S3 media storage adapter, and GitHub Actions AWS ECS deployment workflow.

Screenshots

Coffee Commerce English storefront showing USD/KHR currency switcher and editorial coffee hero
Live Coffee Commerce storefront served from AWS ECS Fargate behind an Application Load Balancer in ap-southeast-2, with EN/KM language toggle and USD/KHR display rate controls.

What I learned

  • Routing Next.js and Spring Boot behind a single Application Load Balancer so HttpOnly SameSite=Lax authentication and guest cart cookies work seamlessly on the same origin.
  • Implementing exact integer minor-unit and decimal monetary arithmetic across backend order pricing and frontend dual-currency USD/KHR display.
  • Automating Flyway database migrations, Secrets Manager integration, and container deployments to AWS ECS Fargate via Terraform and GitHub Actions.