What problem does it solve?
Vertical Slice Architecture (VSA) eliminates the friction of scattering a single feature across controllers, services, and repositories by keeping each feature self-contained around its endpoint and handler.
Core Features & Use Cases
- Feature-first folder structure: Co-locates endpoint wiring, request/response types, validation, and handler logic inside a feature folder (e.g.,
Features/Orders/CreateOrder.cs) to reduce navigation and cognitive load.
- Low coupling across features: Prevents direct feature-to-feature calls so shared behavior lives in
Common/ or Shared/ rather than creating tangled dependencies.
- Multiple handler options: Supports Mediator-style handlers (source-generated), Wolverine convention-based handlers, or raw handler classes depending on project constraints.
- Cleaner responsibilities: Treats the handler as the unit of work, discouraging god-classes and large multi-purpose service layers.
- Practical growth paths: Guides adding module boundaries for larger applications and using shared contracts only when necessary.
Quick Start
Load this skill when designing or refactoring a .NET API so that each feature folder contains the endpoint and handler for one operation, with validation and request/response types colocated.