Introduction
Blazor builds ShopNest admin dashboards in C# instead of JavaScript — Server (SignalR circuit), WebAssembly (runs in browser), or Blazor United (.NET 8+) mixing both.
After this article you will
- Compare Blazor Server, WASM, and United
- Build components with data binding
- Forms and validation in Blazor
- Call ShopNest REST API from WASM
- Auth and JS interop
Prerequisites
- Article 70 — Real-Time Chat App
- Articles 1–64 ShopNest foundations (MVC, EF Core, API, auth, deploy)
Architecture & design
| Mode | Runs | Best for |
|---|---|---|
| Server | Server CPU | Low-latency internal admin |
| WASM | Browser | Offline-capable SPA |
| United | Hybrid | Fast first paint + interactivity |
@page "/dashboard"
@inject HttpClient Http
<h3>Orders today: @_count</h3>
@code {
private int _count;
protected override async Task OnInitializedAsync()
=> _count = await Http.GetFromJsonAsync<int>("api/stats/orders-today");
}Hands-on build guide — ShopNest Interactive Dashboard
- ShopNest.Blazor.Server dashboard project.
- Chart component bound to API data.
- EditForm with DataAnnotations validation.
- JS interop for chart library if needed.
Common pitfalls
- Blazor Server on poor mobile network — latency on every interaction.
- Large WASM download — optimize AOT and trimming in .NET 8+.
Interview & portfolio questions
Q: Blazor vs React?
A: Blazor = C# full stack; React = larger ecosystem + hiring pool.
Summary
- Blazor option for ShopNest internal dashboards
- Server for LAN admin; WASM for public SPA
- United is the .NET 8+ default direction
Previous: Real-Time Chat App
Next: gRPC, GraphQL and Alternative APIs
FAQ
Blazor Mobile?
MAUI Blazor Hybrid for mobile shells.
SEO on WASM?
Poor — use SSR/United or separate marketing site.