Thái Anh Đức

June 5, 2026

Opinioned slice architecture solution structure

When I started my software engineer career, layered structure was the default. There were Api, Application, Infrastructure, Abstraction, Data Access projects. There were also unit test and integration test projects.

When I heard about Vertical/Feature/Slice Architecture, It reasoned well with me. I liked it immediately. Since then, it has been my default architecture. The solution structure looks
image.png

Each feature is a slice. Tests is per feature at the Api level. Test the API endpoints not the internal implementation.

API
The endpoints with Requests and Responses. Usually, REST is employed. The actual implementation is delegated to Application.

Application
All the detail. Business logic. Validation.

Model
The core data model. It is independent. Mostly pure POCO classes. Minimal dependencies.

Data
ORM with database. EF Core is usually used. The application DbContext is defined here with all mappings, efcore migrations.

Tests
Test the feature supported by the API. There is no mock. Use SQLite database. Minimal fake to external dependencies such as Http calls to external services.

AI Agent
It turns out AI Agent loves that structure. Agent can trace a feature and make changes without too much side effect.

About Thái Anh Đức

Software architect from Việt Nam. Partner at https://ritvn.com/.  Train with Kettlebells. Run with minimal shoes and sandals.