Architecture diagrams in Confluence
An architecture diagram shows the services and resources of a system and the connections between them.
Last updated
When to use it
Use an architecture diagram for the overview of a cloud system: the web app, the API, the database, the queue, grouped by where they run. Services have icons and sit inside groups; edges connect a named side of one service to a side of another.
Example
This is the code of the Web application template: web app, API, database and file storage in one cloud.
architecture-beta
group cloud(cloud)[Cloud]
service web(internet)[Web app] in cloud
service api(server)[API] in cloud
service db(database)[Database] in cloud
service files(disk)[File storage] in cloud
web:R -- L:api
api:R -- L:db
api:B -- T:files
Vellnar Diagrams draws it like this:
Change a line and the diagram changes with it. Nobody needs the original drawing file, because there is none: the code is the diagram.
Add it to a Confluence page
- Edit a Confluence page and type
/mermaidwhere the diagram should go. - Select Mermaid diagram. The editor opens with the template list.
- Pick a template, or choose Start blank and paste the code above. The preview follows every keystroke.
- Choose Save. The diagram appears on the page.
The documentation covers the editor, the settings and the exports.
Templates
The Templates button in the editor has 6 architecture diagrams ready to use:
- Web application: Web app, API, database and file storage in one cloud.
- Microservices: A gateway in front of two services with their own databases.
- Data pipeline: Sources, collector, data lake, warehouse and dashboards.
- Serverless: CDN, functions, queue, table store and object storage.
- Multi-tenant SaaS: Pooled tenants on shared resources and a dedicated tier for large customers.
- Observability pipeline: Metrics, logs and traces from workloads through one collector.
Syntax
The code of a architecture diagram starts with architecture-beta. The Mermaid documentation describes every element of the syntax. Vellnar Diagrams draws it with Mermaid 12.3; if a line has an error, the editor marks the line and keeps the last valid diagram on screen.
More
- Mermaid in Confluence: how diagrams as code work in a page, and every diagram type.
- Security: the app asks for no permissions and sends nothing outside Atlassian.