Muhammad Rafay
WorkBlogAboutContact

Work with me

DirectlyWhite-label for agencies

Solutions

All solutionsCloud infrastructureKubernetes & OpenShiftAI platform infrastructureEnterprise CMS hostingMigrations & go-liveDevOps, CI/CD & IaCSecurity & zero trustObservability & DRLoad testing

Markets

UAESaudi ArabiaQatar
  1. Home
  2. Work
  3. Meal-plan platform

E-commerce, Azure

The Azure platform behind an Abu Dhabi meal-plan business, run as code.

PractiCal, an Abu Dhabi meal-plan business, sells personalised meal plans through a Next.js storefront, Laravel/PHP backend services and Azure serverless workloads. I owned the cloud and application platform end to end: infrastructure, edge security, CI/CD and production operations across development, staging and production.

Delivered with
Technyx Systems
My role
Cloud Solutions ArchitectCloud solutions, infrastructure, security and DevOps
Stack
Azure, Laravel, Next.js
Duration
Ongoing platform ownership

The problem

Manual work out, predictable releases in.

PractiCal’s Laravel services and background workloads operated in an Azure environment with significant manual configuration. Order processing, notifications, and scheduled tasks required servers to run continuously. The platform needed consistent infrastructure and a controlled release process across development, staging, and production to support frequent application changes.

What I did

  • Cloud architecture. Designed and managed Azure infrastructure for Laravel backend services and application workloads.
  • Serverless architecture. Migrated order processing, notifications, and scheduled tasks to Azure Functions with Azure Storage Queues for asynchronous processing, removing the need for dedicated always-on compute.
  • Infrastructure as Code. Standardised Azure resource provisioning with Terraform, replacing manual configuration with repeatable infrastructure definitions.
  • CI/CD automation. Implemented Azure DevOps pipelines for Laravel and Next.js applications, adding staging validation and controlled promotion to production.
  • Edge security and operations. Configured Cloudflare for DNS, TLS, and WAF protection, and managed application monitoring, production troubleshooting, and incident management.

How delivery ran

Mapped first, then brought under code.

  1. Assess and map the environment

    Reviewed Azure resources, application dependencies, and environment configuration to clearly understand the platform before making changes.

  2. Standardise infrastructure and deployments

    Migrated Azure infrastructure to Terraform management and implemented Azure DevOps pipelines for Laravel and Next.js applications, including staging validation before production releases.

  3. Modernise background processing

    Transitioned order processing, notifications, and scheduled workloads from continuously running servers to Azure Functions, leveraging Azure Storage Queues for asynchronous execution.

  4. Strengthen edge and operational visibility

    Configured Cloudflare for public DNS, TLS, and WAF protection, and established monitoring and alerting to support deployment verification and ongoing production operations.

Architecture

From the edge to the data.

The request path is in orange. Cloudflare runs DNS, TLS, WAF rules and edge caching, and routes only to the App Services. Next.js and the Laravel API run on App Service, the API queues work to Azure Functions through Storage Queues, and data sits in Azure Database for MySQL, Azure Cache for Redis and Blob Storage, with secrets in Key Vault reached through managed identities.

Solution architecture: PractiCal meal-plan platform on AzureCustomers reach the Next.js storefront through Cloudflare, which provides DNS, TLS and WAF. The storefront and the Laravel API run on Azure App Service. Azure Functions behind Storage Queues handle order processing, notifications and scheduled jobs. Data lives in Azure Database for MySQL, Azure Cache for Redis, Blob Storage and Key Vault, reached over private endpoints. Payment, messaging and delivery partners are called from the API and the functions. Azure DevOps, Terraform and Azure Monitor run alongside as the delivery and operations platform.Azure: production, staging and development, one Terraform definition per environmentDelivery and operationsCustomersWeb and mobile visitorsOnboarding, plan selection, subscriptionsTeamOperations and kitchen staffOrders, menus, delivery schedulesEdge & securityCloudflareDNS, TLS termination, WAF rules, bot controls and caching for static assets, routing only to the App ServicesStorefrontNext.js on App ServiceCustomer experience: onboarding, meal-plan builder,subscriptions, account and checkoutServer-side calls to the Laravel APIStatic assets cached at the edgeBackend servicesLaravel / PHP API on App Service for ContainersPlans, orders, subscriptions, customersPayment and billing integrationsQueues work to Azure FunctionsAdmin and operations endpointsMessagingStorage QueuesOrder placed, plan changed,payment eventsRetry and poison handlingServerlessAzure FunctionsOrder processing and kitchen schedules, notifications by email, SMS and push, nightly plans and remindersScale to zero between runs, no servers to patchManaged identity to data services and Key VaultDataAzure Database for MySQLLaravel application dataAutomated backups, read replicaDataAzure Cache for RedisSessions, cache, rate limitsQueue backing for LaravelDataBlob StorageMeal and menu media, exportsLifecycle policiesSecretsKey VaultKeys, connection strings, certsManaged identities onlyExternalPayment gatewayCard payments and subscriptionsWebhooks into the APIVerified signaturesExternalMessaging providersEmail, SMS and pushCalled from Azure FunctionsTemplates versioned in GitExternalDelivery and logisticsRoute and slot integrationsDaily schedule exportsCalled from the APIVirtual network with private endpoints for MySQL, Redis, Storage and Key Vault. App Services accept traffic only from Cloudflare.CI/CDAzure DevOpsBuild, test, deploy perenvironment, staging isthe gate before productionIaCTerraformApp Services, Functions,data, network, Cloudflare,plan and apply in pipelinesObservabilityAzure MonitorApplication Insights, LogAnalytics, alert rules,dashboards, runbooksRequest pathData and queue accessExternal calls, deployment and telemetryDev, staging and production are identical definitions

Architecture decisions and their trade-offs

  1. Background work on Azure Functions behind Storage Queues

    Why. Order processing, notifications and nightly jobs scale to zero between runs, with no servers to patch.

    Trade-off. A queued message can be delivered more than once, so every function is safe to retry, with retry and poison-message handling built in.

  2. Cloudflare as the only way in

    Why. DNS, TLS, WAF rules, bot controls and edge caching sit in one place, and Cloudflare routes only to the App Services.

    Trade-off. Only static assets are cached at the edge, so signed-in pages such as the meal-plan builder and checkout still reach the App Services on every request.

  3. Managed identities instead of stored credentials

    Why. Keys, connection strings and certificates live in Key Vault, and the Functions and App Services reach data through managed identities.

    Trade-off. Every new service and environment needs its identity and access defined in Terraform before it can run, instead of a copied connection string.

What was delivered

What the platform now includes.

  • Azure cloud infrastructure as Terraform
  • Laravel/PHP application infrastructure
  • Next.js application deployment
  • Azure Functions workloads behind queues
  • Azure DevOps CI/CD pipelines
  • Development, staging and production environments
  • Cloudflare DNS and edge configuration
  • WAF, TLS and secure application ingress
  • Application and infrastructure monitoring
  • Production deployment, troubleshooting and optimisation

Outcomes

What changed for the client.

AreaOutcome
Cloud platformConsistent infrastructure provisioning across development, staging and production
Application deliveryPipeline deployments for the Laravel and Next.js applications, with staging as the gate before production
ServerlessOrder processing, notifications and scheduled tasks moved from always-on servers to Azure Functions
SecurityEvery public hostname behind Cloudflare DNS, TLS and WAF, routing only to the App Services
InfrastructureManual configuration replaced by Terraform
OperationsAzure Monitor and Application Insights alerts on the same dashboards used for releases

Have a cloud platform to build, modernise or improve?

Whether you are designing a new platform, modernising existing infrastructure or improving production operations, let’s discuss your requirements and delivery approach.