Excalidraw architecture diagram examples

Diagrams generated with excalidraw-cli. The guide walks through the commands.

From the README

An iOS app architecture, from a SwiftUI view and ViewModel through Core Data and an API service to a remote database
iOS app architecture. A SwiftUI view and ViewModel talking to Core Data and an API service.
A LeetCode problem-solving flow, from reading the problem through tests, debugging, and submit
LeetCode problem-solving flow. From reading the problem through tests, debugging, and submit, exported in dark mode.
A short three-node flow with Input, Process, and Result
Simple flow. Input, Process, and Result.

Recreate a diagram from source

These four examples ship with the agent skill. The site build generates each editable file and PNG/SVG download from the DSL shown. To run one yourself:

excalidraw-cli create retry-pattern.dsl -o retry-pattern.excalidraw
excalidraw-cli convert retry-pattern.excalidraw --format png

API request with caching

An API gateway checks the cache, calls a service on a miss, and returns a response. Source: api-flow.dsl.

# API request flow with caching
@direction LR

[Client] -> [API Gateway] -> {Cached?}
{Cached?} -> "yes" -> [[Cache]] -> [Response]
{Cached?} -> "no" -> [Service] -> [[Database]] -> [[Cache]] -> [Response]
[Response] -> [Client]
An API gateway checks the cache, calls a service on a miss, and returns a response.

Download: .excalidrawPNGSVGDSL

Input validation

Validate an input, then follow the success or error branch. Source: decision-tree.dsl.

# Decision tree with branching
(Start) -> [Receive Input] -> {Valid?}
{Valid?} -> "yes" -> [Process Data] -> [Save Result] -> (Success)
{Valid?} -> "no" -> [Log Error] -> (Failed)
Validate an input, then follow the success or error branch.

Download: .excalidrawPNGSVGDSL

Retry with backoff

Retry an operation with backoff until it succeeds or reaches the retry limit. Source: retry-pattern.dsl.

# Retry pattern with exponential backoff
(Start) -> [Attempt Operation] -> {Success?}
{Success?} -> "yes" -> [Return Result] -> (Done)
{Success?} -> "no" -> {Retries < Max?}
{Retries < Max?} -> "yes" -> [Wait (backoff)] -> [Increment Retry] -> [Attempt Operation]
{Retries < Max?} -> "no" -> [Throw Error] -> (Failed)
Retry an operation with backoff until it succeeds or reaches the retry limit.

Download: .excalidrawPNGSVGDSL

A simple process

A small linear process, from initialization to completion. Source: simple-flow.dsl.

# Simple linear flow
(Start) -> [Initialize] -> [Process] -> [Complete] -> (End)
A small linear process, from initialization to completion.

Download: .excalidrawPNGSVGDSL