A production-inspired serverless backend for processing website contact form submissions using Azure Functions and Azure Table Storage. This project demonstrates how to build a scalable, event-driven REST API that automatically validates incoming requests, stores contact information in a NoSQL database, and eliminates the need to manage backend servers.
This project showcases a modern serverless architecture on Microsoft Azure for handling website contact form submissions. It leverages Azure Functions for compute, Azure Table Storage for persistent NoSQL storage, and Application Insights for monitoring and diagnostics. The repository also demonstrates Infrastructure as Code (IaC) using Bicep and Terraform, along with deployment automation through Azure CLI scripts.
Small businesses and organizations often need a reliable backend to process website contact forms without maintaining virtual machines, web servers, or traditional databases. Conventional backend solutions introduce additional infrastructure costs, ongoing maintenance, and scaling challenges, especially when traffic fluctuates.
A lightweight, scalable, and cost-effective backend is needed to process contact form submissions while minimizing operational overhead.
This project implements a serverless contact form processing system using Azure Functions and Azure Table Storage.
When a user submits a contact form:
- An HTTP request is sent to an Azure Function.
- The function validates the request payload.
- Contact information is processed and stored in Azure Table Storage.
- A JSON response is returned to the client.
- Application Insights captures logs and telemetry for monitoring.
The architecture automatically scales based on demand, follows a pay-as-you-go pricing model, and removes the need to manage backend infrastructure.
serverless-contact-system/
│
├── README.md
│
├── architecture/
│ └── architecture.png
│
├── docs/
│ ├── api.md
│ └── deployment.md
│
├── function-app/
│ ├── ContactFunction/
│ │ ├── function.json
│ │ └── index.js
│ ├── host.json
│ ├── package.json
│ └── local.settings.json.example
│
├── infrastructure/
│ ├── bicep/
│ │ ├── modules/
│ │ │ ├── api-management.bicep
│ │ │ ├── app-insights.bicep
│ │ │ ├── app-settings.bicep
│ │ │ ├── communication-services.bicep
│ │ │ ├── function-app.bicep
│ │ │ ├── outputs.bicep
│ │ │ ├── parameters.json
│ │ │ ├── resource-group.bicep
│ │ │ ├── storage-account.bicep
│ │ │ └── table-storage.bicep
│ │ ├── main.bicep
│ │ └── main.parameters.json
│ └── terraform/
│
├── scripts/
│ ├── variables.sh
│ ├── create-storage.sh
│ ├── create-function.sh
│ ├── configure-function.sh
│ ├── create-api-management.sh
│ ├── create-communication-service.sh
│ ├── create-resource-group.sh
│ ├── destroy.sh
│ ├── publish-function.sh
│ ├── test-api.sh
│ └── deploy.sh
│
└── screenshots/
- Azure Functions
- Azure Table Storage
- Azure Storage Account
- Azure Application Insights
- Node.js
- JavaScript
- Azure Functions Runtime v4
- Azure CLI
- Bash
- Bicep
- Terraform
- REST API
- HTTP Trigger
- Serverless REST API
- Event-driven architecture
- Automatic scaling
- HTTP-triggered Azure Function
- Contact form validation
- Email format validation
- CORS support
- Structured error handling
- Azure Table Storage integration
- Low-cost NoSQL data storage
- Application Insights monitoring
- Deployment automation using Azure CLI
- Infrastructure as Code (Bicep & Terraform)
- Modular production-style project structure
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/contact |
Submit a contact form |
Example Request
{
"name": "John Doe",
"email": "john@example.com",
"message": "Hello from Azure!"
}Example Response
{
"message": "Contact form submitted successfully",
"id": "1722492331-abcd123"
}Clone the repository
git clone https://github.com/earlfranciss/Serverless-Contact-Processing-System-on-Azure.git
cd Serverless-Contact-Processing-System-on-AzureLogin to Azure
az loginDeploy the infrastructure
./scripts/deploy.shPublish the Azure Function
func azure functionapp publish <function-app-name>Detailed deployment instructions are available in:
docs/deployment.md
| File | Description |
|---|---|
| docs/deployment.md | Deployment guide |
| docs/api.md | REST API documentation |
| infrastructure/bicep | Azure Bicep templates |
| infrastructure/terraform | Terraform templates |
| scripts | Azure CLI deployment scripts |
- Azure API Management
- Azure Communication Services email notifications
- Azure Static Web Apps admin dashboard
- Authentication and authorization
- Rate limiting
- Azure Key Vault integration
- GitHub Actions CI/CD pipeline
- Spam filtering and input sanitization
This project is inspired by the Azure cloud project recipe created by Michael Zazon.
While the original recipe served as the initial foundation, this repository expands the implementation into a production-inspired project by introducing deployment automation, Infrastructure as Code (Bicep and Terraform), modular project organization, and comprehensive documentation to demonstrate practical Azure cloud engineering and DevOps practices.