Unsaved
Ready
Loading Monaco Editor...
Preview
Styling
All Documentation templates

System Component Overview — Mermaid Block Diagram

Block diagram showing a system architecture with frontend, backend, infrastructure, and third-party services.

What this diagram shows

This Mermaid block diagram is a four-row system map. The frontend block spans the width and holds the Next.js app, a React Native app, and an admin dashboard. Below it, the backend block holds the REST API, background workers, and a cron scheduler. The data block holds PostgreSQL, Redis, and S3. The external block holds Stripe, SendGrid, and Cloudflare. Edges say the clients call the API, the API uses Postgres and Redis, workers use Postgres and S3, and the scheduler calls the workers.

Use it as the first figure in an architecture doc, before any sequence diagram. It answers what exists. It does not answer the order of calls. The columns value is 3, so each band is three cells, and space:3 inserts a blank row between bands. That spacing is why the groups do not visually merge.

Stripe, email, and the CDN have no edges in the template. They are present as neighbors. Add edges if the picture should say who calls them, or a reader will assume the API talks to all three.

Mermaid syntax in this template

block-beta sets columns 3. block:id[Label]:3 makes a group that spans the row. Children are nested until end. Arrows use the child ids.

  • columns 3

    The grid width. A span of 3 fills the row. Change columns and the :3 spans must change too.

  • block:frontend["Frontend"]:3

    A named group with a label and a column span. WebApp, MobileApp, and AdminPanel sit inside it.

  • space:3

    An empty row of three columns between groups. Delete it if you want the bands to touch.

  • WebApp --> API

    Edges refer to inner ids, not the group id. The group is a visual container, not a node you call.

Variations and ways to customize it

Connect the external services

The bottom band is unlabeled in terms of callers. Draw the edges you actually have so Stripe is not implied.

API --> Stripe
Worker --> SendGrid
WebApp --> Cloudflare

Add a queue between API and workers

The scheduler points at the worker directly. If the API enqueues jobs, put a queue cell in the data band and point both the API and the scheduler at it.

Queue["Job Queue"]
API --> Queue
Queue --> Worker

Split admin onto a private API

Admin currently shares the public API node. A second API id inside the backend block is the honest picture if admin has its own service.

Diagram type

Block Diagram

Tags

architecturecomponentssystem designinfrastructureoverview
Open in Editor

Frequently asked questions

Which clients call the API?

The Next.js app, the React Native app, and the admin dashboard. All three edges land on the same REST API node. Workers are not called by the clients; the scheduler calls the workers.

Who talks to S3?

Background workers. The API node is drawn to Postgres and Redis only. Add an edge if the API uploads directly.

Why are Stripe and SendGrid not connected?

They sit in the external band with no arrows. The template names them without assigning a caller. Add API --> Stripe or Worker --> SendGrid when you know which box owns the call.

What does columns 3 do?

It sets the grid to three cells. Each band uses :3 to span a full row, and space:3 inserts a blank row. Inner nodes then share that row.

Related templates and guides

All Documentation templates