Clean Architecture Meets
Vertical Slices for .NET

A .NET-first framework that enforces SOLID principles by design. Build Blazor Web and MAUI Hybrid apps with feature-centric vertical slices.

1 min
Project Setup
30 sec
Boilerplate Per Feature
2 Platforms
One Codebase
100%
SOLID Compliant
MIT
Open Source

Why VanillaSlice?

Stop wasting time on boilerplate. Focus on building features.

Rapid Development

Generate production-ready projects in 5 minutes. Add new features in 30 seconds with SliceFactory.

Vertical Slices

Feature-centric organization. All code for a feature lives together—no hunting across layers.

SOLID by Design

Interface-driven architecture enforces dependency inversion and single responsibility automatically.

Multi-Platform

One codebase runs on Blazor Web, MAUI Hybrid (iOS, Android, Windows, macOS). Write once, deploy everywhere.

Direct LINQ Queries

No repository pattern overhead. Clean, composable EF Core queries directly in services.

UI Framework Agnostic

Choose Bootstrap 5, Fluent UI, Tailwind, or MudBlazor. Switch frameworks without rewriting business logic.

Zero External Dependencies

Plain C# code with no compiled dependencies or packages. Just standard .NET—no magic, no black boxes, 100% transparent.

MIT Licensed - Truly Free

Use commercially, modify, distribute—no restrictions. Learn more about your rights.

The Four-Layer Pattern

One interface, four implementations—SOLID architecture enforced by design

1

Service Contract

Shared interface defining the capability

public interface IProductListingDataService
{
    Task<PagedDataList<ProductListingBusinessModel>>
        GetPaginatedItemsAsync(ProductFilterBusinessModel filter);
}
2

Server Data Service

Business logic with direct LINQ queries

public class ProductListingServerDataService
    : IProductListingDataService
{
    public IQueryable<ProductListingBusinessModel> GetQuery(
        ProductFilterBusinessModel filter)
    {
        return from p in context.Products
               where p.Name.Contains(filter.Name)
               select new ProductListingBusinessModel { ... };
    }
}
3

API Controller

Thin HTTP endpoint layer

[ApiController, Route("api/[controller]/[action]")]
public class ProductListingController
    : ControllerBase, IProductListingDataService
{
    [HttpGet]
    public async Task<PagedDataList<ProductListingBusinessModel>>
        GetPaginatedItemsAsync([FromQuery] ProductFilterBusinessModel filter)
    {
        return await dataService.GetPaginatedItemsAsync(filter);
    }
}
4

Client Service

HTTP client wrapper

public class ProductListingClientDataService
    : IProductListingDataService
{
    public async Task<PagedDataList<ProductListingBusinessModel>>
        GetPaginatedItemsAsync(ProductFilterBusinessModel filter)
    {
        return await httpClient.GetFromJsonAsync<
            PagedDataList<ProductListingBusinessModel>>(
                "api/productListing/GetPaginatedItems" +
                filter.ToQueryString());
    }
}

💡 The Magic

Your UI doesn't know if it's calling a remote API, local cache, or offline storage. Just swap the DI registration—zero code changes needed!

Latest from the Blog

Deep dives into architecture, patterns, and best practices

12 min read

Building Maintainable .NET Applications with Vertical Slice Architecture

How VanillaSlice implements vertical slice architecture for cross-platform .NET apps.

Read more →
10 min read

Type-Safe HTTP Clients in .NET Without Code Generation

Interface-based HTTP clients for compile-time safety without the Swagger codegen overhead.

Read more →
15 min read

From Zero to Production in Minutes

Bootstrap your next .NET project with Blazor Web and MAUI Hybrid in under 5 minutes.

Read more →

Ready to Build Your Next App?

Stop wasting time on project setup. Generate a production-ready .NET application in 5 minutes.

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.