Project Overview #
A full-stack serverless web application deployed entirely on Microsoft Azure as part of the Cloud Resume Challenge. The project goes far beyond hosting a static resume - it integrates a dynamic visitor counter API, a globally distributed CDN, infrastructure-as-code, and a fully automated CI/CD pipeline.
Every component - from the Hugo-generated frontend to the Cosmos DB-backed API - is provisioned with Terraform and deployed via GitHub Actions, making the entire stack reproducible and version-controlled.
Architecture #
The application follows a serverless, event-driven architecture:
- Visitor navigates to
az.chetan-thapliyal.cloudover HTTPS. - Azure Front Door terminates TLS and serves cached static assets from the nearest global edge PoP.
- On a cache miss, Front Door fetches from the Azure Blob Storage origin (
$webcontainer). - The frontend JavaScript calls the
/api/counterendpoint. - Azure Functions (Python) reads and increments the visitor count in Cosmos DB and returns the updated value.
- The visitor counter updates live on the page.
Tech Stack #
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | Hugo (GoFolium theme) | Responsive portfolio site with custom layouts |
| Hosting | Azure Blob Storage | Static website hosting via $web container |
| CDN / TLS | Azure Front Door | Global edge caching, managed TLS, and custom domain routing |
| API | Azure Functions (Python 3.12) | Serverless visitor counter endpoint |
| Database | Azure Cosmos DB (Table API) | Globally-distributed persistence for visitor count |
| IaC | Terraform | Modular infrastructure automation with remote state |
| CI/CD | GitHub Actions | Automated build β deploy β cache-purge pipeline |
| DNS | Cloudflare | Custom domain management with az subdomain delegation |
Challenges #
- CDN β Front Door Migration: Migrated from Azure CDN Classic (nearing deprecation) to Azure Front Door Standard with zero downtime, re-configuring custom domain routing, caching rules, and TLS certificates.
- CORS Configuration: Configuring Cross-Origin Resource Sharing correctly between the Front Doorβserved frontend and the Azure Function backend for secure, cross-origin visitor counter API calls.
- Terraform State Management: Importing 15+ existing Azure resources into Terraform management, handling remote backend state with Azure Storage, and resolving import conflicts for resources like Front Door custom domains and routes.
- Cosmos DB Function Bindings: Implementing the correct Table API bindings for Azure Functions to perform atomic read-increment-write operations against Cosmos DB’s serverless tier.
- CI/CD Cache Purging: Debugging the GitHub Actions workflow to correctly purge Front Door’s edge cache after deployments β matching the endpoint name, profile, and content paths to the actual Azure configuration.
Key Learnings #
- Architecting a serverless full-stack application on Azure with zero VM management
- Configuring Azure Front Door with custom domains, managed TLS certificates, and cache rules
- Building CI/CD pipelines with GitHub Actions for both frontend and infrastructure deployment
- Using Cosmos DB Table API bindings with Azure Functions for low-latency data access
- Migrating from Azure CDN Classic to Azure Front Door Standard without downtime
- Implementing Infrastructure as Code with Terraform for reproducible, version-controlled cloud environments
- Managing remote Terraform state with Azure Storage backend for team-safe workflows