scaffold-architecture

Scaffold Blazor frontend features with hexagonal architecture and infrastructure rules.

Updated Apr 1, 2026
One-click install
npx skills add https://github.com/FoxSilou/ConfigurationClaude --skill scaffold-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scaffold-architecture
Source: https://github.com/FoxSilou/ConfigurationClaude/tree/main/frontend/.claude/skills/scaffold-architecture
Command: npx skills add https://github.com/FoxSilou/ConfigurationClaude --skill scaffold-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a strict, repeatable rule set and scaffolding guidance to eliminate inconsistent frontend infrastructure, reduce architectural drift, and ensure testable, maintainable Blazor feature areas.

Core Features & Use Cases

  • Hexagonal architecture templates for separating UI.Domain, UI.Infrastructure, and UI.Blazor layers so presentation logic remains pure C# and infrastructure concerns implement ports.
  • Presenter-first rules and DI conventions that mandate scoped presenters, IDisposable patterns, InvokeAsync usage, and field presenters for validated inputs to keep UI logic testable.
  • Gateway and UI Kit encapsulation that enforces immutable DTOs for ports, HTTP gateway implementations, Radzen wrappers confined to a Kit, and centralized error translation for typed frontend exceptions.
  • Testing and tooling guidance recommending bUnit/xUnit for presenter tests, Playwright for end-to-end only when necessary, and data-testid selectors to stabilize test suites.

Quick Start

Scaffold a new frontend feature area following the hexagonal Blazor rules: create UI.Domain Presenters and Ports, UI.Infrastructure Gateways, UI.Blazor Pages and Components with Kit wrappers, register presenters as scoped services, and add presenter tests using bUnit.

Frequently Asked Questions about scaffold-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce hexagonal architecture in Blazor to keep presentation logic testable?

Enforce hexagonal architecture in Blazor by separating UI.Domain, UI.Infrastructure, and UI.Blazor layers. This isolates presentation logic into pure C# presenters while infrastructure concerns implement ports, producing testable and maintainable feature areas.

What is the best way to wire up scoped presenters and dependency injection in Blazor feature areas?

The best way to wire Blazor presenters is registering them as scoped DI services. This approach mandates IDisposable patterns and InvokeAsync usage, ensuring UI logic remains testable and state management stays consistent across feature areas.

How do I encapsulate Radzen UI components and translate API exceptions in a Blazor frontend?

Encapsulate Radzen UI components by confining them within Kit wrappers in the UI.Blazor layer. Centralize ApiException translation to handle typed frontend exceptions, keeping infrastructure concerns isolated from domain logic via immutable gateway DTOs.

How do I set up bUnit and xUnit testing harnesses for Blazor presenter tests?

Set up Blazor presenter tests using bUnit and xUnit to validate pure C# presentation logic. Stabilize your test suites by using data-testid selectors, reserving Playwright for end-to-end tests only when absolutely necessary.

Does this hexagonal Blazor scaffolding approach work for existing applications with architectural drift?

Yes, this scaffolding approach eliminates inconsistent frontend infrastructure and architectural drift by providing a strict, repeatable rule set. It applies to new feature scaffolding, gateway implementation, and UI Kit encapsulation within existing Blazor applications.