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 is my complete guide to VSA in .NET, from the core ideas to 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") contains everything it needs - the request, the handler, the validation, and the data access - in one place.
Instead of scattering a single feature across Controllers, Services, and Repositories, you keep it together. This makes each slice self-contained, easier to understand, and simpler to change without affecting unrelated features.
The result is a codebase where 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, explain when it makes sense, and show you how to get started.
- 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 don't exist in isolation. They work well inside Modular Monoliths and alongside Clean Architecture. These articles explore 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 inherently testable - 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 truly shared policy 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.



