Layered (n-tier) architecture template

Presentation, application, domain, persistence and database layers, with cross-cutting concerns and the rules that keep layers clean.

Use this templateFree, opens in your browser. No sign-up.

Layered (n-tier) architecture template
Presentation layer
Application / service layer
Domain (business) layer
Persistence layer
Database layer
Cross-cutting concerns
Rules
Web UI (React)
Mobile app
REST controllers
Admin console
OrderService
CustomerService
BillingService
Validation + DTO mapping
Order + Invoice entities
Pricing rules
Discount policies
Domain events
Order repository
Customer repository
ORM (Hibernate)
Cache adapter
PostgreSQL
Redis
Logging + tracing
Authentication + authorization
Configuration
Error handling
Transactions
Caching policy
Each layer calls only the layer below it
Dependencies point down, never up
Domain layer has no framework imports
Avoid the sinkhole: layers that only pass calls through
Layered architecture
The layered (n-tier) architecture template as it opens in Kelvo: 18 boxes, 10 sticky notes and 9 links, in 7 sections.

What's on the board

Presentation layer
Web UI (React) · Mobile app · REST controllers · Admin console
Cross-cutting concerns
Logging + tracing · Authentication + authorization · Configuration · Error handling · Transactions · Caching policy
Application / service layer
Validation + DTO mapping · OrderService · CustomerService · BillingService
Domain (business) layer
Order + Invoice entities · Pricing rules · Discount policies · Domain events
Persistence layer
Customer repository · Order repository · ORM (Hibernate) · Cache adapter
Database layer
PostgreSQL · Redis
Rules
Each layer calls only the layer below it · Dependencies point down, never up · Domain layer has no framework imports · Avoid the sinkhole: layers that only pass calls through

How to use this template

  1. Click Use this template. It opens in the Kelvo app as a new board, saved in your browser.
  2. Double-click any box to change its text. Replace the examples with your own content.
  3. Sketch, then convert. Draw boxes and arrows with the pen, select the strokes and click Convert sketch: they become real boxes and links.
  4. Ask Kelvo right on the board (Pro). With Pro, type @kelvo and what you want in any box or text, for example “@kelvo add error handling”, and press Enter. The change is made there and the request disappears; ⌘Z undoes it.
  5. One page per level. Put the C4 context view on one page and the container view on the next, so each diagram stays readable.

Good for

  • architect
  • layered architecture
  • n-tier
  • software design
  • Agreeing on boundaries and responsibilities between services
  • Recording why a design was chosen (and what was rejected)
  • Comparing integration options side by side

Related templates

  • Hexagonal architecture (ports & adapters) template previewHexagonal architecture (ports & adapters)

    Keep business logic independent: driving adapters call inbound ports, the core uses outbound ports that adapters implement.

  • C4 system context diagram template previewC4 system context diagram

    C4 level 1: the system in scope, the people who use it and the external systems it depends on, with a legend.

  • C4 container diagram template previewC4 container diagram

    C4 level 2: the apps, APIs, databases and queues inside the system boundary, with the technology on each link.

  • Microservices with API gateway template previewMicroservices with API gateway

    Clients behind an API gateway, services that each own their database, and an event bus for asynchronous work.

  • Event-driven architecture template previewEvent-driven architecture

    Producers publish facts to a broker; independent consumers react — with the design rules that keep it reliable.

  • LLM application architecture template previewLLM application architecture

    Production building blocks around a model: gateway, guardrails, orchestrator, cache, vector DB, tools and observability.

All solution architecture diagram templates · All templates

Use the layered (n-tier) architecture template