blazor-hexagonal

Community

Create testable Blazor UI with Presenter

AuthorFoxSilou
Version1.0.0
Installs0

System Documentation

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.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: blazor-hexagonal
Download link: https://github.com/FoxSilou/ConfigurationClaude/archive/main.zip#blazor-hexagonal

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.