https://github.com/jasontaylordev/azd-blazor
A starter project for creating a Blazor web app using C# and a SQL database hosted on Azure.
https://github.com/jasontaylordev/azd-blazor
azd-templates azure azure-app-service azure-application-insights azure-key-vault azure-sql bicep csharp dotnet
Last synced: 2 months ago
JSON representation
A starter project for creating a Blazor web app using C# and a SQL database hosted on Azure.
- Host: GitHub
- URL: https://github.com/jasontaylordev/azd-blazor
- Owner: jasontaylordev
- License: mit
- Created: 2023-12-01T00:53:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-03T10:53:48.000Z (3 months ago)
- Last Synced: 2025-03-18T09:45:32.579Z (3 months ago)
- Topics: azd-templates, azure, azure-app-service, azure-application-insights, azure-key-vault, azure-sql, bicep, csharp, dotnet
- Language: Bicep
- Homepage:
- Size: 1.12 MB
- Stars: 18
- Watchers: 5
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Blazor Web App with C# and SQL Database on Azure
A starter project for creating a Blazor web app using C# and a SQL database hosted on Azure. The project contains sample application code which can be removed and replaced with your own application code. Add your own source code and leverage the Infrastructure as Code assets (written in Bicep) to get the app up and running quickly.
## Prerequisites
> This template will create infrastructure and deploy code to Azure. If you don't have an Azure Subscription, you can sign up for a [free account here](https://azure.microsoft.com/free/). Make sure you have contributor role to the Azure subscription.
The following prerequisites are required to use this application. Please ensure that you have them all installed locally.
- [Azure Developer CLI](https://aka.ms/azd-install)
- [.NET SDK 9.0](https://dotnet.microsoft.com/download/dotnet/9.0)## Quickstart
To learn how to get started with any AZD template, follow the steps in [this quickstart](https://learn.microsoft.com/azure/developer/azure-developer-cli/get-started?tabs=localinstall&pivots=programming-language-csharp) with this template (`jasontaylordev/azd-blazor`).This quickstart will show you how to authenticate on Azure, initialize using a template, provision infrastructure and deploy code on Azure via the following commands:
```bash
# Log in to azd.
azd auth login# First-time project setup. Initialize a project in the current directory, using this template.
azd init --template jasontaylordev/azd-blazor# Provision and deploy to Azure
azd up
```## Application Architecture
This application utilizes the following Azure resources:
- [**Azure App Service**](https://docs.microsoft.com/azure/app-service/) to host the web app
- [**Azure Monitor**](https://docs.microsoft.com/azure/azure-monitor/) for monitoring and logging
- [**Azure SQL Database**](https://docs.microsoft.com/azure/azure-sql/database/sql-database-paas-overview?view=azuresql) for storage
- [**Azure Key Vault**](https://docs.microsoft.com/azure/key-vault/) for securing secretsHere's a high level architecture diagram that illustrates these components. Notice that these are all contained within a single [resource group](https://docs.microsoft.com/azure/azure-resource-manager/management/manage-resource-groups-portal), that will be created for you when you create the resources.

## Cost of provisioning and deploying this template
This template provisions resources to an Azure subscription that you will select upon provisioning them. Refer to the [Pricing calculator for Microsoft Azure](https://azure.microsoft.com/pricing/calculator/) to estimate the cost you might incur when this template is running on Azure and, if needed, update the included Azure resource definitions found in `infra/main.bicep` to suit your needs.## Application Code
This template is structured to follow the [Azure Developer CLI](https://aka.ms/azure-dev/overview). You can learn more about `azd` architecture in [the official documentation](https://learn.microsoft.com/azure/developer/azure-developer-cli/make-azd-compatible?pivots=azd-create#understand-the-azd-architecture).
## Next Steps
At this point, you have a complete application deployed on Azure. But there is much more that the Azure Developer CLI can do. These next steps will introduce you to additional commands that will make creating applications on Azure much easier. Using the Azure Developer CLI, you can setup your pipelines, monitor your application, test and debug locally.
> Note: Needs to manually install [setup-azd extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.azd) for Azure DevOps (azdo).
- [`azd pipeline config`](https://learn.microsoft.com/azure/developer/azure-developer-cli/configure-devops-pipeline?tabs=GitHub) - to configure a CI/CD pipeline (using GitHub Actions or Azure DevOps) to deploy your application whenever code is pushed to the main branch.
- [`azd monitor`](https://learn.microsoft.com/azure/developer/azure-developer-cli/monitor-your-app) - to monitor the application and quickly navigate to the various Application Insights dashboards (e.g. overview, live metrics, logs)
- [Run and Debug Locally](https://learn.microsoft.com/azure/developer/azure-developer-cli/debug?pivots=ide-vs-code) - using Visual Studio Code and the Azure Developer CLI extension
- [`azd down`](https://learn.microsoft.com/azure/developer/azure-developer-cli/reference#azd-down) - to delete all the Azure resources created with this template
## Additional `azd` commands
The Azure Developer CLI includes many other commands to help with your Azure development experience. You can view these commands at the terminal by running `azd help`. You can also view the full list of commands on our [Azure Developer CLI command](https://aka.ms/azure-dev/ref) page.
## Reporting Issues and Feedback
If you have any feature requests, issues, or areas for improvement, please [file an issue](https://github.com/jasontaylordev/azd-blazor/issues).