Vertical Slice Architecture organizes code by feature instead of by layer, so everything a slice needs (endpoint, handler, validation, data access) lives in one place. Shipping one small feature in a layered codebase means touching a controller, a service, a repository, and a handful of interfaces in between. This page links to my articles on VSA in .NET, covering the core ideas, slice structure, testing, and combining it with other architectures.
What is Vertical Slice Architecture?
Vertical Slice Architecture organizes code by feature instead of by layer. Each feature (or "slice") keeps everything it needs in one place: the request, the handler, the validation, and the data access.
Instead of scattering a single feature across Controllers, Services, and Repositories, you keep it together. Each slice is self-contained, so you can change it without affecting unrelated features.
Adding a new feature means adding a new slice, not modifying five different layers.
Getting Started
These articles introduce the core ideas behind Vertical Slice Architecture and explain when it makes sense.
- Vertical Slice Architecture
- Vertical Slice Architecture Is Easier Than You Think
- Screaming Architecture
- Vertical Slice Architecture vs Clean Architecture
- When to Choose Vertical Slice Architecture
Structuring Your Slices
Once you understand the basics, you'll need patterns for organizing slices as your project grows. These articles cover structure, shared logic, and CQRS integration.
- Vertical Slice Architecture: Structuring Vertical Slices
- Vertical Slice Architecture: Where Does the Shared Logic Live?
- CQRS Pattern: The Way It Should Have Been From the Start
- The REPR Pattern in ASP.NET Core
- Vertical Slice Architecture Project Structure
- Feature Folders in .NET
- Combining Vertical Slices with CQRS
- Vertical Slice Architecture with Carter in .NET
Cross-Cutting Concerns and Validation
Even self-contained slices share some concerns. These articles cover how to handle validation and cross-cutting logic without breaking slice isolation.
Combining with Other Architectures
Vertical slices work well inside Modular Monoliths and alongside Clean Architecture. These articles cover the combinations.
- Where Vertical Slices Fit Inside the Modular Monolith Architecture
- What Is a Modular Monolith?
- Clean Architecture: The Missing Chapter
Testing and Quality
Vertical slices are easy to test because each slice is a focused unit with clear inputs and outputs.
- Enforcing Software Architecture with Architecture Tests
- Shift Left with Architecture Testing in .NET
- 5 Architecture Tests You Should Add to Your .NET Projects
- Testing Vertical Slices in .NET
Frequently Asked Questions
What is Vertical Slice Architecture?
Vertical Slice Architecture groups the endpoint, request, validation, business logic, and data access for one use case together. A feature can change without coordinating edits across controller, service, and repository layers that exist only for technical separation.
Can Vertical Slice Architecture use Clean Architecture?
Yes. Vertical slices organize behavior, while Clean Architecture controls dependency direction. Keep domain rules independent of infrastructure where that matters, but avoid forcing every simple slice through identical layers and abstractions.
Where do cross-cutting concerns go in vertical slices?
Put policy that applies across slices in pipeline behaviors, decorators, endpoint filters, or middleware. Keep feature-specific validation and decisions inside the slice. This removes repetition without turning a shared service layer into the new coupling point.
How should vertical slices be tested?
Test a slice through its public feature boundary, usually HTTP, against the real database so routing, validation, serialization, and persistence work together. Unit test extracted domain logic separately when it has enough decision complexity to justify isolation.



