Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serverless Contact Processing System on Azure

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.


Overview

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.


Problem

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.


Solution

This project implements a serverless contact form processing system using Azure Functions and Azure Table Storage.

When a user submits a contact form:

  1. An HTTP request is sent to an Azure Function.
  2. The function validates the request payload.
  3. Contact information is processed and stored in Azure Table Storage.
  4. A JSON response is returned to the client.
  5. 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.


Architecture

Screenshot 2026-08-05 165726

Project Structure

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/

Technology Stack

Azure Services

  • Azure Functions
  • Azure Table Storage
  • Azure Storage Account
  • Azure Application Insights

Backend

  • Node.js
  • JavaScript
  • Azure Functions Runtime v4

Infrastructure & Deployment

  • Azure CLI
  • Bash
  • Bicep
  • Terraform

API

  • REST API
  • HTTP Trigger

Features

  • 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

API Endpoint

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"
}

Deployment

Clone the repository

git clone https://github.com/earlfranciss/Serverless-Contact-Processing-System-on-Azure.git

cd Serverless-Contact-Processing-System-on-Azure

Login to Azure

az login

Deploy the infrastructure

./scripts/deploy.sh

Publish the Azure Function

func azure functionapp publish <function-app-name>

Detailed deployment instructions are available in:

  • docs/deployment.md

Documentation

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

Future Enhancements

  • 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

Source

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.


About

Serverless contact form processing system built with Azure Functions and Azure Table Storage. Provides a scalable, cost-effective backend for collecting website contact submissions without managing servers or databases.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages