Build a Real-Time Blazor Artifact Manager

Résumé

Pixel shares an architectural deep dive into building a project artifact manager with Blazor WebAssembly, SignalR, and ASP.NET Core. It explores shared contracts, hosting models, persistence, dependency injection, and client synchronization to help teams replace stale spreadsheets with a reliable real-time dashboard.

DEV Community

Automating Project Artifacts with Blazor WebAssembly and SignalR

More articles found at: GWS Blog Internal engineering tools—build configuration trackers, release checklists, deployment manifests—almost always start as a shared spreadsheet or wiki page and quietly degrade into stale data, merge conflicts, and manual copy-paste errors. When your team already builds in C# and .NET, creating a real-time internal dashboard with Blazor WebAssembly and SignalR keeps your domain models, validation rules, persistence logic, and UI components inside a single strongly typed ecosystem. You eliminate the cognitive overhead and serialization drift that inevitably creep in when maintaining separate C# backends and TypeScript frontends. In this architectural deep dive, we will build an end-to-end project artifact manager from the ground up. More importantly, we will dissect the engineering trade-offs behind every layer—comparing hosting models, RPC transports, persistence patterns, DI lifetimes, and client-side synchronization strategies—so you understand not only how to write the code, but why each decision holds up under real-world production constraints. Architectural Blueprint Before writing a line of code, look at how dependencies flow across the three projects we are about to structure. In clean .NET architecture, dependency direction is everything: ┌─────────────────────────┐ ┌─────────────────────────┐
│ ArtifactManager.Client │ │ ArtifactManager │
│ (Browser WASM Runtime) │ │ (ASP.NET Core Server) │
└────────────┬────────────┘ └────────────┬────────────┘
│ │
│ Both reference Shared; │
│ NEITHER references the other │
▼ ▼
┌───────────────────────────────────────┐
│ ArtifactManager.Shared │
│ (Contracts, Validation, Constants) │
└───────────────────────────────────────┘
If ArtifactManager.Client ever takes a direct project reference to the server project (ArtifactManager), the .NET linker will attempt to compile server-only assemblies (Entity Framework Core, SQL Server drivers, Microsoft.AspNetCore.App) into your WebAssembly payload—either failing compilation outright or leaking server internals into the browser's network tab. Prerequisites Visual Studio 2022 (v17.8+) or Visual Studio Code with the C# Dev Kit .NET 8.0 SDK (Long-Term Support) or newer Working familiarity with C#, ASP.NET Core dependency injection, and Razor component syntax Step 1: Scaffold a .NET 8+ Blazor WebAssembly Solution In .NET 8+, Microsoft unified the Blazor project templates into dotnet new blazor. When configured with WebAssembly interactivity (--interactivity WebAssembly), the CLI automatically scaffolds a two-project solution: ArtifactManager (Server Host): An ASP.NET Core host that renders the root HTML shell, serves the WebAssembly runtime and .dll assets, manages database connections, and hosts SignalR hubs. ArtifactManager.Client (WASM Client): The browser-executed WebAssembly UI project. We will also add a third class library—ArtifactManager.Shared—so domain models, Data Annotations, and SignalR route constants live in a clean, neutral assembly referenced by both tiers. Deep Dive: Comparing Blazor Hosting Models Choosing an interactivity and hosting model dictates where your compute runs, how memory scales, and what happens when a developer's laptop goes into a tunnel or switches VPNs: Dimension Blazor WebAssembly (Chosen) Blazor Server .NET 8+ Interactive Auto Execution Runtime Mono/WASM runtime inside the browser's JS sandbox; backend APIs/Hubs run on Kestrel. Server-side CLR; browser is a thin DOM-patching client. Starts on Server CLR while downloading WASM in the background, then flips to WASM on subsequent loads. Server Memory Scaling Stateless per UI: Server only allocates memory for active HTTP/SignalR requests. Stateful per circuit: Server holds the entire component render tree and state...
Build a Real-Time Blazor Artifact Manager
Powered by Readybot.io

Les dernières actus de Pixel

Incident Response: Look Beyond the Red Alert

Pixel’s DEV Community announcement explores how teams can fixate on one failing service while overlooking the real cause of an outage, such as a full …

Sach: AI Fact-Checks WhatsApp Forwards in India

Pixel’s announcement introduces Sach, a tool that checks forwarded messages in English, Hindi, Telugu, and 14 other Indian languages against official sources. It gives cited …

Java 25 Removes SecurityManager: What to Fix

Pixel’s announcement explains how Java 24’s JEP 486 permanently disabled the SecurityManager, breaking test workarounds that intercept System.exit. It recommends returning exit codes or throwing …