Sat Mar 28 2026

Chat Room With Multiple Frontends

.Net
Blazor
SignalR
React
SQL
OIDC
Docker
Terraform
Azure
Github Actions
Claude
Personal

This project started as an exploration of SignalR for real-time communication, but grew into something more interesting when I decided to build multiple front-end clients against the same backend, including a Blazor Server app, a React TypeScript SPA, and a WinForms desktop client. Each takes a different approach to connecting to the chat hub and managing authentication state, which made for a useful comparison. Rather than using JWTs, I implemented server-side session management using ASP.NET Core's ITicketStore interface, storing sessions in the database alongside the user's IP and user agent. Sessions are managed with HTTP-only cookies, with no sensitive data in the browser, and can be revoked server-side if needed. The Blazor client follows a Backend-for-Frontend pattern, where the server acts as an intermediary for API calls so that session credentials are never exposed to the browser directly. Authentication supports both email/password and Google OAuth, with duplicate email detection to prevent conflicts between providers. I also used this project as an opportunity to explore infrastructure as code with Terraform, provisioning the cloud infrastructure needed to host the application. This was my first time approaching deployment from an IaC perspective and gave me a better understanding of how cloud architecture decisions interact with application design.

Objectives

  • 00
    Implement real-time messaging using SignalR
  • 01
    Build multiple front-end clients against a shared backend, including Blazor Server and React
  • 02
    Implement server-side session management
  • 03
    Apply the Backend-for-Frontend pattern in the Blazor client
  • 04
    Add authentication via email/password and Google OAuth
  • 05
    Containerise the application using Docker
  • 06
    Provision cloud infrastructure using Terraform
  • 07
    Set up a CI/CD pipeline using GitHub Actions
  • 08
    Explore real development flows using Claude Code

Images

Blazor login page
Blazor login page
React signup page
React signup page
Blazor chat page
Blazor chat page
Blazor session flow diagram
Blazor session flow
React session flow diagram
React session flow
Azure resources
Azure resources
Azure resource visualisation
Azure resource visualisation
GitHub Actions deploy pipeline with summary
GitHub Actions deploy pipeline
GitHub Actions Terraform plan PR comment
GitHub Actions Terraform plan PR comment