How srajasimman/azure-web-app-bicep works
Project Type and Purpose
• This repository defines Azure infrastructure (using Bicep) to deploy a two-tier web application consisting of a static frontend and a .NET backend API.
• Purpose: Host a React-based static UI globally via Azure Front Door and run a .NET API with MySQL and object storage in Azure App Service, secured with Okta.
File Structure (omitting CI/CD pipelines)
• environments/dev & environments/prod: entry-point Bicep files and parameter sets per environment.
• modules/
• frontend: defines Azure Storage Account (static website) and Front Door.
• backend: defines App Service Plan + App Service, MySQL server, Storage Account (blobs).
• network: defines Virtual Network and subnet for App Service integration.
• security: defines Okta authentication and, in prod, Web Application Firewall rules.
Key Architecture Insights from README
• Frontend served from Azure Storage (static website) behind Azure Front Door for global HTTPs distribution.
• Backend: .NET API in App Service Plan, connected to:
• Azure Database for MySQL (persistent relational storage)
• Azure Storage Account for file/object storage
• Okta handles user authentication (OAuth/OIDC).
• Production adds a Web Application Firewall on Front Door.
Main Components
a. Frontend Layer
• Azure Storage Account (static website)
• Azure Front Door (global entry point, HTTPS, optional WAF)
b. Backend Layer
• Azure App Service Plan + App Service (host .NET API)
• Azure Database for MySQL
• Azure Storage Account (for blobs)
c. Network
• Virtual Network (App Subnet) linking App Service to protected resources
d. Security
• Okta authentication service (external identity provider)
• (Production only) Web Application Firewall on Front Door
e. Environment Overlays
• “Dev” vs “Prod” tiers differ in SKU sizes, redundancy, WAF enabled in Prod
Relationships and Data Flows
• User → Front Door → Storage Account (frontend assets)
• User → Front Door → App Service (API calls)
• App Service ↔ MySQL (data storage)
• App Service ↔ Storage Account (object store)
• App Service & Front Door validate tokens against Okta
• All components sit within or connect to a VNet/subnet for network isolation
Architectural Patterns & Principles
• Two-tier separation (static CDN-style frontend vs dynamic API backend)
• Infrastructure as Code (Bicep modules per layer)
• Environment promotion (dev ↔ prod parameterization)
• Defensive perimeter (Front Door + WAF in prod, VNet integration)
• Externalized identity (Okta) for SSO/OIDC