← Blog

Why I Prefer Vertical Slice Architecture

The Short Version

I do not use Vertical Slice because it looks clean. I use it because it protects cohesion.

It helps:

  • keep related code close together
  • reduce the blast radius of change
  • make AI-assisted development less chaotic

The Problem with Global Layer Folders

Once a project grows, a global layered structure often spreads one feature across too many places:

  • models/
  • services/
  • serializers/
  • views/
  • tests/

To change one feature, you keep bouncing across folders.

The problem is not the number of files. The problem is that feature cohesion disappears.

What Vertical Slice Changes

Vertical Slice groups code by feature, not by global layer.

That means a feature can keep its:

  • API
  • schema
  • service
  • model
  • tests

close together.

This makes the system easier to navigate and easier to change safely.

Why I Care About It

The biggest reason is control.

In fast-moving products, especially with AI-assisted coding, structure matters even more. AI can generate code quickly, but it does not naturally preserve architectural discipline.

Vertical Slice gives a strong local boundary:

  • this feature lives here
  • related logic belongs here
  • new code should be added here

That constraint is valuable.