Skip to main content
Insight Architecture & Scale 6 min read

Vertical Slice vs Layered Architecture: Which Pattern Is Right for Your Startup?

July 2026

Most development tutorials teach the same structure: controllers, services, repositories. Framework documentation defaults to it. Bootcamps teach it. It is so embedded in how code is learned that most teams never stop to question it when they start building their first product.

They reach for the familiar pattern. And for a greenfield product at pre-seed or seed, that pattern costs them — not immediately, but at the worst possible moment.

How Layered Architecture Works (and Where It Falls Short)

Layered architecture organises code by technical role. Controllers handle HTTP. Services contain business logic. Repositories talk to the database. Within each layer, the code is clean and cohesive. Each layer has a clear job and a clear owner.

The problem is not the layers themselves. It is what happens at the boundaries between them.

A single business capability — "a user can raise an invoice" — touches every layer simultaneously. The UI needs to know the shape of the data. The service needs to know the rules. The repository needs to know the schema. When these are being developed in sequence, or even in parallel, the assumptions between them accumulate silently. Nobody is lying. Each layer is "done." But the system as a whole has never been assembled.

By the time the layers are put together into a working feature, the data shape the UI expects doesn't match the schema the repository was built against. The service has business rules written against an API contract that evolved independently. The integration cost arrives all at once, late in the build, when the pressure to ship is at its highest and the cost to correct is at its greatest.

This is not bad engineering. It is the structural consequence of the pattern. Integration risk in a layered system is hidden until assembly.

How Vertical Slice Architecture Surfaces Risk Earlier

Vertical slices invert the organising principle. Instead of grouping code by technical role, you group it by business capability. Everything that belongs to "Create Invoice" — the UI component, the business logic, the database schema — lives in one directory, owned by one slice, deployable independently.

This changes when integration risk surfaces. Instead of discovering at week ten that three layers don't fit together, you discover on day three of building the first slice. The cost of correction is a day's work, not a project reset. You are not stopping a build — you are adjusting a hypothesis before it compounds.

It also changes who can own a feature. In a layered codebase, a single feature is spread across multiple directories. Understanding it requires context from three separate locations. In a vertical codebase, a developer navigates to one directory and finds the complete picture: the input, the rules, the output, the tests. Onboarding is faster. Code review is predictable. Every feature has a clear owner and a defined boundary.

The architecture that looks organised at the file level is often the least organised at the feature level.

When Layered Architecture Is the Right Call

Layered architecture is not wrong in all contexts. In a mature engineering organisation with a dedicated frontend team, a backend team, and a data team, layer-level ownership reflects how the organisation actually works. Conway's Law operates in both directions: your architecture tends to mirror your communication structure, and your communication structure tends to follow your architecture.

At seed stage with two or three engineers building an uncertain product, that match does not exist. You do not have a frontend team and a backend team. You have two people who need to ship a working feature by the end of the week. The architecture should reflect that reality, not anticipate an organisation that does not exist yet.

There is also a legitimate case for extracting a layer early when one component has genuinely different scaling or operational characteristics — a real-time processing service alongside a transactional API, or a component with distinct security or compliance requirements. But "we might want to separate concerns someday" is not a sufficient reason. Someday is not now.

Vertical Slice or Layered: How to Choose

Can a single developer own a complete user-facing feature, from UI to database, without touching code that belongs to another feature?

If the answer is no, the architecture is creating coordination overhead the team has not yet earned. Features that require two or three developers to negotiate shared layers before they can be written are features that will be slow to build, slow to change, and expensive to understand.

Start with vertical slices. Build each capability as a self-contained unit. When the team grows, when the domains stabilise, when a genuine reason to extract a layer appears — you will have a codebase that makes that extraction straightforward, because the boundaries were drawn clearly from the beginning.

A layered codebase that grew organically is one of the harder things to decompose. A codebase organised by capability is a decomposition that already happened.

Free Blueprint

The Vertical Slice Engine — the pattern for building end-to-end from day one, with a proven delivery sequence

Read the blueprint →

Continue reading

Ready to go deeper? Explore the Vertical Slice Engine →

TechTekGo Newsletter

Architecture insights for founders building systems that scale.

No noise. Published when there's something worth reading.