Architecture

Microservices architecture template

API gateway, four services, a database per service and an event bus

Preview of the Microservices architecture template

What’s inside

Nodes
11
Packs
NetworkCloudSecurityStackData
Category
Architecture

Works on the Free plan: 15 diagram nodes + 150 notes, text, stickers & mind map topics per diagram.

This template shows a microservices architecture with an API gateway in front. Web and mobile clients call the gateway over HTTPS, the gateway verifies tokens with an identity provider and routes each request to one of four services, and every service owns its data: users-db and orders-db in PostgreSQL, inventory-db in a document database.

Services do not call each other for everything. When an order is placed, orders-service publishes an OrderPlaced event to the event bus, and payments-service and inventory-service subscribe to it. Each service card shows its language and its interface, so the picture also works as a map of who owns which code.

When to use it

  • Splitting a monolith and agreeing which service owns which data.
  • Onboarding engineers to a system with many services and one entry point.
  • Reviewing synchronous calls and events before they turn into a distributed monolith.
  • Planning a gateway, identity or messaging change that touches every service.

How to use it

  1. Rename the services and the databases, and set the language and interface caption on each service card.

  2. Add the services you have from the Stack pack and connect each one to its own database from the Data pack.

  3. Draw events as dashed edges from publishers to the event bus and from the bus to subscribers, labelled with the event name.

  4. Share the diagram with the teams that own each service, and save a revision whenever a service or an event is added.

Questions

Can I import my Docker Compose or Kubernetes files?

Yes. Paste a docker-compose.yml into the free Docker Compose to diagram tool, or manifests into the Kubernetes YAML to diagram tool, and your services, ports and volumes are drawn as editable nodes. Use this template when you want the logical view, with ownership and events, rather than the deployment view.

Should every microservice have its own database?

It is the usual rule, because it keeps services independent: one service can change its schema without breaking the others, and the others read its data through its API or its events. The template shows that pattern; a shared database is drawn the same way if that is how your system works.

Can my AI agent update this diagram when we add a service?

Yes. Connect your AI agent to Archboard over MCP and ask it to add a service, its database and the events it publishes. People who have the diagram open see the change live, and you can undo a change your agent made on your behalf in one step.

Related templates

Related use case

C4 architecture diagrams

Open a canvas in a minute

Sign in with Google or GitHub. Free for a single seat. Upgrade when the team joins.