Browse pages
Blazor Stack
This stack serves a product that has no server of its own.
Intent#
This stack serves a product that has no server of its own. It combines a .NET client-side domain model, browser-local persistence, and a Blazor WebAssembly application compiled to static output. Such a product declares the client-only shape under litespec/core/scope#declare-a-consumer-that-has-no-backend, which names the backend pages that still apply. This page adds what Blazor itself requires. Exact framework and package versions live only in litespec.manifest.json.
Standards#
Keep Blazor outside the UI contract#
ruleguidancelitespec/frontend/blazor/stack#keep-blazor-outside-the-ui-contractA consumer selecting this stack MUST NOT apply the controlled UI contract.
Why
The contract's route checks read TypeScript, so they cannot read a Blazor component. The Blazor pages state the styling, accessibility, and state rules that apply instead.
Checka reviewer answers
Does the consumer apply any UI contract page or route check?
Marked guidance: a reviewer answers this question.
Publish static WebAssembly output#
ruleguidancelitespec/frontend/blazor/stack#publish-static-webassembly-outputA consumer MUST publish a standalone Blazor WebAssembly application to static files.
Why
Blazor Server, interactive server rendering, and prerendering each remove offline operation and reintroduce a server, so all three are outside this stack.
Checka reviewer answers
Does the published output hold no server assembly or server render mode?
Marked guidance: a reviewer answers this question.
Conventions#
Verify with the .NET toolchain#
conventionguidancelitespec/frontend/blazor/stack#verify-with-the-net-toolchainRun client verification through dotnet rather than a Node package manager.
ReplacementA consumer can replace this default with an explicit local convention.
Why
The client application has no Node build step. A consumer holding a separate content or asset workspace keeps the manifest-pinned Node and pnpm toolchain for that workspace only.
Example
dotnet build apps/web/{ProjectName}.slnx --configuration Release
dotnet test apps/web/{ProjectName}.slnx --configuration Release --no-buildChecka reviewer answers
Does the CI client job run dotnet build and dotnet test?
Marked guidance: a reviewer answers this question.
Record a first-load budget#
conventionguidancelitespec/frontend/blazor/stack#record-a-first-load-budgetRecord the compressed transfer size of the framework payload as a Limit record in Operating Limits.
ReplacementA consumer can replace this default with an explicit local convention.
Why
A WebAssembly client downloads a runtime before it renders anything. Directory size does not describe what a visitor waits for.
Checka reviewer answers
Does Operating Limits record the budget the publish job enforces?
Marked guidance: a reviewer answers this question.
Verification#
| ID | Mark | Evidence |
|---|---|---|
| litespec/frontend/blazor/stack#keep-blazor-outside-the-ui-contract | guidance | Does the consumer apply any UI contract page or route check? |
| litespec/frontend/blazor/stack#publish-static-webassembly-output | guidance | Does the published output hold no server assembly or server render mode? |
| litespec/frontend/blazor/stack#verify-with-the-net-toolchain | guidance | Does the CI client job run dotnet build and dotnet test? |
| litespec/frontend/blazor/stack#record-a-first-load-budget | guidance | Does Operating Limits record the budget the publish job enforces? |