The first 200 students can use code LAUNCH20 to get 20% off our new 4 courses Deep Dive: Blazor, From Zero to Hero: Event-Driven Architecture, Getting Started: ASP.NET Core and Getting Started: Event Sourcing

Let's Build It: URL Shortener in .NET

Learn how to build a production-ready URL Shortener, including conception, development and deployment

In this massive "Let's Build It" course, Gui Ferreira will build an entire, production-ready URL Shortener system from conception to production deployment. The course will start with requirement analysis, move into system design, and then follow that up by setting up a development environment and continuous integration. It will then move to infrastructure as code and secrets management, and only after all the setup has been done properly will it move into coding an entire URL shortener using best practices. On top of that, the author will develop a client-side web application that will include best practices for telemetry and security. This is a unique opportunity to learn how a system can be built from scratch all the way to production.

Curriculum

Welcome (01:33)

What will you learn in this course? (03:44)

Who is the course for and prerequisites (01:13)

Introduction (04:59)

Functional requirements (03:02)

Non-functional requirements (04:46)

Section recap (01:45)

Discovering the Short Url length (09:42)

Designing the high-level architecture (14:58)

Assigning technologies to the architecture (06:14)

Introduction (01:56)

Creating and setting up the GitHub repository (04:45)

Setting up GitHub environments (04:19)

Creating the API Project (08:15)

Creating GitHub Actions for API (09:03)

Section recap (00:34)

Introduction (05:26)

What is Infrastructure as Code and Bicep? (09:49)

Writing Bicep scripts for URL shortener infrastructure (21:19)

Deploying infrastructure to Azure with GitHub Actions (14:48)

Deploying infrastructure to multiple environments (15:15)

Deploying API with GitHub Actions (06:23)

Section recap (01:09)

Introduction (05:20)

Deploying Azure Key Vault using Bicep (08:34)

Integrating with Key Vault (12:55)

Elevate GH Actions privileges to write permissions (04:31)

Section recap (01:19)

Introduction (00:24)

Feature Design (08:58)

Generating a short URL (38:14)

Handling requests to create a Short URL (29:51)

Adding input validation (08:37)

Creating an API endpoint to create Short URLs (13:12)

Deploying CosmosDB resources with Bicep (06:31)

Storing URLs in CosmosDB (16:12)

Increment token and avoid duplication (07:04)

Demo (06:48)

Section recap (04:21)

Introduction (01:27)

Feature Design (05:16)

Creating the Token Range API infrastructure (01:58)

Setting up PostgreSQL for token management (09:40)

Creating the Token Range API GitHub Action Workflow (14:50)

Handling token range requests (33:23)

Deploying the database schema (06:41)

Creating an hosted service for range retrieval (32:14)

Adding a retry policy with Polly (08:33)

Demo (06:16)

Section recap (01:47)

Introduction (00:33)

Using Microsoft Entra ID for authentication (03:11)

Deploying Entra ID resources using Bicep (11:45)

Configuring Entra ID application for the API (04:12)

Giving permissions to GitHub Action deploy EntraID Application (04:51)

Adding JWT authentication with Entra ID in API (09:04)

Accessing user identity in the API (08:55)

Section recap (01:28)

Introduction (03:46)

Deploying the Redirect API using Bicep (02:44)

Creating the Redirect API GitHub Action Workflow (07:23)

Implementing URL redirection logic (21:10)

Setting up Azure Redis Cache (03:59)

Using Redis Cache for better performance (14:54)

Demo (05:11)

Section recap (01:24)

Introduction (00:41)

Addressing data challenges (13:49)

Setting up Azure Function for data processing using Bicep (13:15)

Creating GitHub Action for Azure Function (16:17)

Implementing CosmosDB Trigger Azure Function (10:53)

Adding a List endpoint to the API (29:07)

Add pagination using Continuation Tokens (22:03)

Demo (01:57)

Section recap (02:17)

Introduction (01:13)

What is React.js (06:15)

Creating the React Project (08:20)

Deploying Azure Static Web App using Bicep (05:21)

Configuring the Web Application in Microsoft Entra ID (05:35)

Creating GitHub Action for Static Web App (08:26)

Integrating MSAL.js for Entra ID authentication (29:03)

Enable CORS on Api (03:51)

Listing URLs in the UI (17:29)

Applying style to the Components (09:13)

Building a form to create a short URLs (12:20)

Section recap (02:41)

Let's practice (05:31)

Solution (04:58)

Introduction (01:11)

What is a Health Check (04:38)

Implementing a HealthCheck (12:50)

Applying Health Checks across all services (08:48)

Configuring Health Checks using Bicep (03:50)

Section recap (02:50)

Introduction (01:27)

What is OpenTelemetry? (05:51)

Configuring Application Insights and Log Analytics workspace with Bicep (17:42)

Adding OpenTelemetry to services (17:54)

Collecting Request Metrics (04:19)

Demo (09:47)

Section recap (03:34)

Introduction (00:50)

What is Azure FrontDoor? (06:00)

Deploying Front Door using Bicep (27:05)

Configuring the Health Probe (04:53)

Adding a Rate Limit Rule with WAF to Front Door (06:28)

Setting up a custom domain with Front Door (13:06)

Demo (02:36)

Section recap (01:38)

Introduction (01:24)

Setting up a Virtual Network (03:49)

Adding services to the Virtual Network (19:23)

Allowing FrontDoor requests (06:47)

Implementing access restrictions for CosmosDB (03:14)

Implementing access restrictions for Redis (08:11)

Implementing access restrictions for PostgreSQL (05:41)

Allowing GitHub Action deployments to App Services (09:01)

Implementing access restrictions for KeyVault (02:15)

Section recap (02:29)

Conclusion (00:48)

Course Info

Level:
Let's Build It
Duration:
16h 46m
Rating (New):
star

Lifetime access

Add to Cart
Dometrain Pro

Want access to all of our courses? Subscribe to Dometrain Pro!

Try it for free!

About the Author

author_img

Gui Ferreira

Guilherme Ferreira, also known as Gui, is a Minimalist Software Craftsman, passionate about simplicity and continuous learning. Gui is a Microsoft MVP for Developer Technologies, a Tech Speaker, a YouTuber, and a .NET content creator. With over 15 years of experience in software development, Gui went from Startups to Tech Giants. Along his journey, he got to know several hats, including Software Engineer, Architect, CTO, and Developer Advocate, gathering a diverse and invaluable skill set.

More courses by Gui Ferreira