logo-kreta-white
The Clean Architecture Cargo Cult: How Enterprise Patterns Cripple Web Startups
Tara

The Clean Architecture Cargo Cult: How Enterprise Patterns Cripple Web Startups

2026-11-18

Explore industry news, expert advice, and creative strategies to keep your website ahead of the curve.

Continue exploring ideas in web design and beyond.

Back to Blogs

Startups copy Clean Architecture into CRUD web apps: many layers, no shipped features, DB swap never happens. Kreasi Kita builds vertical slices.

The Clean Architecture Cargo Cult: How Enterprise Patterns Cripple Web Startups

Somewhere right now, a five-person startup is building a CRUD app with a domain layer, an application layer, an infrastructure layer, an interface adapters layer, a repository per entity, a use case per endpoint, and DTOs mapping DTOs mapping DTOs. They have shipped zero features this sprint. Their justification: "someday we might swap Postgres for MongoDB."

They won't. Nobody does. But the codebase is already unpayable.

At Kreasi Kita, we watch this pattern repeat across the startup ecosystem with almost religious regularity. Clean Architecture — Robert C. Martin's 2012 formulation of layered, dependency-inverted design — has become the default answer to "how should we structure our backend?" regardless of whether the question makes sense for the product being built. The result is what anthropologists would recognize immediately: cargo cult engineering. Teams copy the visible artifacts of successful enterprise systems (layers, interfaces, dependency injection containers) without understanding which original constraints produced those artifacts. The planes never land. The features never ship.

This article is our case against preemptive architecture, and for a pragmatic alternative: vertical slices, colocation, and indirection bought only with evidence.

What Clean Architecture Actually Claims — and What It Actually Costs

Clean Architecture's core promises are legitimate in principle:

  • Framework independence. Business logic doesn't depend on Rails, Django, or Spring.
  • Database independence. You can swap persistence without touching domain rules.
  • Testability. Domain logic runs without HTTP servers or databases.
  • UI independence. Swap the frontend without rewriting business rules.

These properties matter — for systems with genuinely volatile external dependencies and long lifespans. Enterprise systems with 15-year horizons, multiple persistence targets, or regulatory-driven integration churn can justify the structure.

The cost side of the ledger is what cargo culters never read:

ConcernCost of full Clean Architecture
Feature latencyOne feature touches 5–8 files across layers: route → controller → use case → domain entity → repository interface → repository impl → ORM model → DTO mappers
OnboardingJuniors must learn the layering contract before shipping anything
Refactoring frictionRenaming a field means synchronized edits across every layer boundary
Cognitive loadIndirection means "where does this actually happen?" is a search problem
Test scaffoldingMock repositories, fake use cases, fixture factories — all before the first assertion

None of this buys the promised flexibility, because the flexibility is theoretical. The database swap scenario — the most commonly cited justification — almost never materializes. Postgres-to-Mongo migrations are rare enough that when they happen, they're usually rewrites anyway, because the data model semantics (relational constraints, joins, transactions) don't survive the translation regardless of how clean your layers were.

The Anatomy of Over-Engineering

The Repository Trap

Consider a standard web startup feature: "list a user's active orders." Clean Architecture version:

// Domain layer
public interface IOrderRepository
{
    Task<IEnumerable<Order>> GetActiveByUserIdAsync(UserId userId);
}

// Application layer
public class GetActiveOrdersUseCase
{
    private readonly IOrderRepository _repo;
    public GetActiveOrdersUseCase(IOrderRepository repo) => _repo = repo;

    public async Task<IEnumerable<OrderDto>> Handle(UserId userId)
    {
        var orders = await _repo.GetActiveByUserIdAsync(userId);
        return orders.Select(OrderDto.FromDomain);
    }
}

// Infrastructure layer: EF Core implementation of IOrderRepository
// Interface adapters: controller binding use case to HTTP route
// Presentation: DTO → JSON

Eight artifacts. One database query. The repository interface exists to abstract away Entity Framework — an abstraction over a tool that is itself already an abstraction over SQL. You have built a wrapper around a wrapper and called it decoupling.

The vertical slice version:

// Features/Orders/GetActiveOrders.cs
app.MapGet("/users/{userId}/orders/active", async (Guid userId, AppDb db) =>
{
    var orders = await db.Orders
        .Where(o => o.UserId == userId && o.Status == OrderStatus.Active)
        .OrderByDescending(o => o.CreatedAt)
        .ToListAsync();
    return Results.Ok(orders.Select(o => new OrderResponse(o)));
});

Route, query, and response shape in one file. When the feature changes, one file changes. When the feature dies, one file dies. This is what maintainability actually looks like for a web product: the blast radius of change is proportional to the change, not to your layer count.

The Use Case Ceremony

"Use case per endpoint" sounds disciplined. In practice it produces classes whose entire body is a pass-through: validate trivially, call repository, map to DTO. The use case layer earns its keep only when there is genuine orchestration — multi-step business transactions, sagas, cross-aggregate invariants. Most endpoints in a web startup are not that. Treating them as if they were means every trivial read incurs the ceremony of a complex write.

The Dependency Inversion Cargo

Dependency inversion is a real tool with a real purpose: keeping slow, flaky, or expensive dependencies out of fast tests. But its cargo cult application — interface for every concrete class, injected via DI container, resolved through composition root gymnastics — produces codebases where "follow the code" requires an IDE and faith. If your only concrete dependency is one database, and your tests can use a real database in Docker (which, with modern containers, they can), most of those interfaces are dead weight.

The Trade-Offs, Honestly

We are not arguing for spaghetti. The honest framing is a spectrum:

DimensionFull Clean ArchitectureVertical Slices
Time to first featureWeeksDays
Cost of trivial changesHigh (multi-layer)Low (single file)
Cost of complex domain logicContainedCan sprawl if unmanaged
Database swap readinessTheoreticalDeliberately deferred
SuitabilityLong-lived systems, volatile deps, large teamsWeb products, small teams, evolving requirements

The last row is the entire argument. Clean Architecture optimizes for a future you cannot predict, at the price of a present you can measure. Vertical slices optimize for the present and keep the future option open — because refactoring toward structure when complexity appears is cheap, while refactoring away from premature structure is expensive and demoralizing.

The critical insight: indirection is a purchase, not a default. Every abstraction layer is bought with latency, onboarding cost, and refactoring friction. Buy it when the business complexity forces your hand — when you genuinely have two persistence mechanisms, when a domain rule genuinely spans multiple aggregates, when a test genuinely cannot run against the real dependency. Not before.

Rules of Thumb We Build By

  1. Colocate by feature, not by layer. Route, query, validation, and response logic for a feature live together. A new engineer can find everything about "orders" in one directory.
  2. Extract on the second occurrence, not the first. Duplication is cheaper than the wrong abstraction. Wait until the pattern is real before you name it.
  3. No interface without a second implementation or a test-isolation reason. IUserService backed only by UserService is ceremony.
  4. Domain logic earns its own module when it gets hairy. Pricing rules, state machines, invariants spanning aggregates — yes, isolate those. A list endpoint — no.
  5. Test against real infrastructure where cheap. Dockerized Postgres beats a mock repository for catching the bugs users actually hit.
  6. Architecture reviews ask one question: "What business decision could change that would make this structure pay for itself?" If there's no answer, delete the structure.

The Cultural Root: Architecture Astronaut Syndrome

Joel Spolsky named this in 2001: architecture astronauts solve the general case so abstractly they never solve the specific one. Clean Architecture's popularity in startup circles is astronaut culture wearing a respectable uniform. It flatters engineers — layers signal sophistication, interfaces signal rigor — while the product roadmap starves.

The tell is always the same: ask the team which user-facing feature the abstraction layer enabled this quarter. Silence. Ask how many files the last "simple" change touched. The number tells you everything.

Startups die of unshipped features far more often than they die of wrong databases. Your architecture should be optimized for the actual failure mode: shipping value fast, cheaply, and repeatably while the product's real shape emerges. Structure that emerges from evidence beats structure imported from a book.

Takeaways

  • Clean Architecture solves problems most web startups don't have, at a cost they pay every day.
  • The database-swap justification is empirically dead; don't build for it.
  • Vertical slices — colocated route, query, and UI logic — minimize change blast radius and onboarding cost.
  • Introduce indirection only when business complexity forces it. Preemptive abstraction is debt with good PR.
  • Refactor toward structure when evidence appears. You lose nothing; premature structure costs you everything.

Ship the feature. Keep the code honest. Add the layer when the layer earns it.

If you're staring at an eight-layer codebase wondering why nothing ships — or starting fresh and wanting architecture that matches your actual product — talk to us at Kreasi Kita. We build pragmatic, maintainable production systems, and we'll tell you plainly which patterns your product needs and which it doesn't.

●Kreasi Kita Engineering & Design

Ready to build a high-performance web experience?

We engineer modern, ultra-fast websites and custom web applications with Next.js, tailored UI/UX design, and zero bloat.

Start a Conversation

More articles