---
topic: system-design
author: Crashtech Editorial
published: Nov 13, 2026 · read: 3 min
---

The Nine Layers of a Modern Software Stack, and Which Ones You Can Skip

Presentation, edge, API, messaging, logic, data access, storage, analytics, infrastructure: what each layer does and which ones a small product can skip.

– –

Architecture diagrams love completeness, and beginners read them as a shopping list. They are a map instead. Each layer exists to solve a particular problem. If you do not have that problem yet, you do not need the layer yet.

The nine layers, from the user down

  1. 1. Presentation (UI/UX)

    How users interact: layout, visuals, usability, client-side behaviour. Web, mobile or desktop. Always present.

  2. 2. Edge and delivery (optional)

    CDNs and edge networks that put content closer to users, cutting latency and absorbing load. Add when global performance or traffic spikes matter.

  3. 3. Integration layer (API)

    How parts of the system talk: REST, GraphQL, RPC. Defines contracts between the frontend and backend and between services.

  4. 4. Messaging and async processing (optional)

    Queues and event streams for background work: emails, uploads, syncing, fan-out. Add when work should not block the request.

  5. 5. Business logic

    The rules and workflows that make the product the product: pricing, permissions, order flow. The part worth protecting from framework churn.

  6. 6. Data access

    The bridge between logic and storage: repositories, query builders, an ORM. Handles queries, transactions and mapping securely and efficiently.

  7. 7. Data storage

    Where data lives: relational and document databases, object storage, search indexes, caches. Structured and unstructured.

  8. 8. Analytics and ML (optional)

    Reporting, insight, prediction and intelligent features. Add when you need to learn from data, not just store it.

  9. 9. Infrastructure

    The compute, networking and runtime that run everything: servers, containers, cloud services, deployment pipelines.

What a small product actually needs

LayerDay oneAdd when…
PresentationYesAlways
APIYesAlways, even if it is one internal module boundary
Business logicYesAlways
StorageYesAlways
InfrastructureYesAlways
Data accessImplicit (one ORM)Queries get complex or you swap databases
Edge/CDNOften a static hostGlobal users or heavy static assets
MessagingNoBackground jobs, spikes, multiple consumers
Analytics/MLNoReporting, recommendations, forecasting
Layers are responsibilities, not services

You can have all nine layers in one repository and one deployable. Splitting into services is a separate decision. The layers just make the seams visible, so that when a part needs to scale or change independently, you know where to cut.

Advertisement

Rules that keep layers honest

  • Dependencies point downward. UI calls API, API calls logic, logic calls data access. Storage details should not leak up into the UI.
  • Keep business rules out of the controller and the database. Logic buried in a SQL trigger or a React component is logic you cannot test or move.
  • Do not skip layers. A UI component writing SQL is a shortcut that becomes a rewrite.
  • Make optional layers earn their place. Every added layer is another thing to run, monitor and explain to new hires.

Do

Start with the five layers every app has, keep the boundaries clean inside one codebase, and add edge, messaging or analytics when measured pain asks for them.

Don't

Copy a hyperscaler’s reference diagram for a product with two hundred users. You inherit the operational cost of every layer and none of the problems they solve.

Takeaway

A software stack is a set of answers to recurring questions: how do users interact, how do parts communicate, where do rules live, where does data live, what runs it all. Know the nine questions, answer the five you must, and defer the four you can, until the product gives you a reason.

Advertisement

Frequently asked questions

Do I need all nine layers to build a product?

No. Presentation, API, business logic, storage and infrastructure are present in almost every application, even if they sit in one codebase. Edge delivery, messaging, a separate data access layer and analytics or ML are optional and usually added when a specific problem, such as latency, background work or reporting, demands them.

What is the difference between the data access layer and the data storage layer?

The storage layer is where data lives: databases, object stores, caches. The data access layer is the code between your business logic and that storage, such as repositories or an ORM, which handles queries, transactions and mapping. Keeping them separate lets you change one without rewriting the other.

When should I add a messaging layer?

When work should not block the request: sending emails, processing uploads, syncing to other systems, or fanning events out to several consumers. A queue decouples producers from consumers and absorbs spikes. If everything finishes within the request in milliseconds, you probably do not need one yet.

Does a layered stack mean microservices?

No. Layers describe responsibilities, not deployment units. A well-structured monolith has all of these layers inside one codebase and one deploy. You can split services later along the boundaries the layers already made visible.

Sources & further reading

/* Comments */