What problem does it solve?
This skill removes UI logic from Blazor components by applying a hexagonal frontend architecture so that UI behavior is fully testable, predictable, and decoupled from rendering concerns.
Core Features & Use Cases
- Presenter-driven UI: Move state, transitions, and visibility logic into Presenter classes placed in a UI.Domain layer with zero Blazor dependencies.
- Test-first workflow: Templates and guidance for writing Presenter unit tests using Fake Gateways to drive TDD for visibility, state machines, and error scenarios.
- Ports and Gateways: Define ports as interfaces and implement HTTP adapters in infrastructure so presenters remain pure; use Fake Gateways for fast, synchronous tests.
- Field Presenters & Validation: Strong typed field presenters with Valide types and Result<T> for safe, immutable form state and validation.
- DI and wiring checks: Explicit guidance to register gateways with AddHttpClient and presenters as Scoped, plus UI update safety using InvokeAsync(StateHasChanged) and IDisposable unsubscribe patterns.
Quick Start
Create a Presenter with a Fake gateway, write a failing unit test that asserts the desired visibility or state transition, implement the minimal Presenter logic to pass the test, and then wire a thin .razor component that injects and binds to the Presenter.