Back to projects
GovernmentJul 2025 – Present

SAMB Mobile App

Complete backend system for Melaka water utility mobile application with cloud-native architecture.

LaravelLaravel OctanePostgreSQLAWSCloudFormationNginxLivewireLaravel VoltCloudflare

Context

Syarikat Air Melaka Berhad (SAMB), the water utility for the state of Melaka, required a mobile application to provide consumers with digital access to water services. Building on the architectural lessons from Air Selangor, this project was designed cloud-native from day one.

Constraints

  • Government utility with regulatory compliance requirements
  • Cloud-native architecture required from the start (no legacy migration)
  • High-performance API requirements for mobile application
  • Database design needing to support future growth and analytics
  • Infrastructure as Code requirement for reproducible deployments

Architecture

Cloud-native architecture on AWS with Infrastructure as Code via CloudFormation. The backend API is powered by Laravel Octane for high-performance request handling, with PostgreSQL as the primary data store. Cloudflare provides edge caching and DDoS protection.

Key Decisions

  • Cloud-native from day one: Unlike Air Selangor's migration journey, SAMB was architected for cloud from the start — applying lessons learned from previous projects.
  • AWS + CloudFormation: Infrastructure as Code ensures reproducible, version-controlled deployments. CloudFormation was chosen for native AWS integration.
  • Laravel Octane: Persistent worker model for handling high request volumes efficiently, proven in the Farmbyte project.
  • PostgreSQL: Consistent with the Farmbyte stack, chosen for data integrity and query performance.
  • Cloudflare integration: Edge caching reduces origin server load and provides built-in DDoS protection.

Security & Reliability

  • Infrastructure as Code enables security audit of infrastructure changes
  • Cloudflare WAF and DDoS protection at the edge
  • Secure API design with proper authentication and authorization
  • PostgreSQL with strict data integrity constraints
  • SAST integration in CI/CD pipeline

Execution

  • Led technical architecture and solution design
  • Designed database structure and API contracts
  • Configured AWS infrastructure using CloudFormation
  • Set up server configuration with Nginx and Laravel Octane
  • Produced technical documentation for stakeholder alignment

Outcome

  • Delivered a cloud-native architecture applying all lessons from 7+ years of water utility projects
  • Infrastructure as Code enables repeatable, auditable deployments
  • High-performance API layer ready for Melaka's consumer base
  • Architecture documentation enables team scalability
SAMB Mobile App — Hafiq Iqmal