Examples
Copy any of these into the editor and change them from there.
Everything at once
One file with every kind of diagram: a graph with groups, classes, variables, a component, cards and every arrow, plus a sequence, timeline, charts, git graph, mind map, three Gantt charts in different styles, quadrant and Kanban board. Some panels use their own theme, background and border, and panels: wrap lays them out in rows under the graph. Colours mix palette names, #hex, rgb(), hsl() and CSS names. The file is examples/showcase.yu in the repository.
title: **Shopfront** platform
subtitle: everything yuhwa can draw, in one file
direction: right
theme: paper
panels: wrap
panel-gap: 40
legend: .svc Service | .store Datastore | .ext External | --> async | ..> optional | red Deprecated
footer: yuhwa showcase | {teal: v1.0} | 2026
// variables: replaced in labels, props, settings and panel bodies
$brand: indigo
$db: "Postgres 16"
$warn: rgb(234, 88, 12)
// classes, one built on another
.svc [color: $brand, shape: rounded]
.store [amber, cylinder]
.ext [color: hsl(330 70% 50%), dashed]
.primary .svc [bold, shadow]
.async [dashed, flow: true]
// a component: one service, its database and the edge between them
def service(id, label, lang = Go) {
$id "$label" .svc [sub: $lang]
${id}_db "$label DB" .store
$id -> ${id}_db: SQL
}
// nodes: every shape, sub lines, icons, links and tooltips
user "Customer" [shape: circle, purple, icon: 🙂]
admin "Admin" [ellipse, #0ea5e9]
web "Storefront" [frame: browser shop.example.com] {
**Cart** || 3 items
---
progress: 72% checkout funnel
spark: 3 5 4 6 8 7 9
}
group edge "Edge" [color: slate, dashed] {
cdn "CDN" [hexagon, teal, link: https://example.com, tooltip: cached at 40 PoPs]
waf "WAF" [parallelogram, color: tomato]
}
group core "Core services" [color: #4f46e5] {
gateway "API Gateway" .svc .primary [sub: "auth, rate limit"]
service(orders, Orders, Kotlin)
service(payments, Payments, lang: Rust)
group search "Search" [teal] {
indexer "Indexer" .svc
es "Elasticsearch" .store [color: $warn]
}
}
queue "Event bus" [diamond, lime]
stripe "Stripe" .ext [document]
legacy "Legacy ERP" [box, red, opacity: 0.7]
note "nightly sync,\nbest effort" [note, yellow-100]
metrics "metrics" [meta: live, caps: true] {
stat: 99.98% uptime | 41ms p50
bars: 3 5 4 6 8 9 7
| service | p95 |
|----------|--------|
| orders | 120 ms |
| payments | 88 ms |
✓ health || [[green: ok]]
}
// edges: every arrow, labels, captions and edge props
user -> web: browse
web -> cdn: assets [label-bg: lightyellow, curve: straight]
admin => cdn: purge [color: $brand, width: 3]
cdn -> waf -> gateway
gateway -> orders, payments
gateway <-> indexer: query [curve: orthogonal]
orders --> queue: OrderPlaced .async
queue ..> indexer: reindex [caption: within 2 s]
payments -> stripe: charge [head: dot, color: #db2777]
indexer -- es
queue -> legacy: export [dotted, red]
legacy .. note
stripe == metrics
// panels, in reading order: how it works, how it runs, what comes next
sequence login "Sign in" [numbered, lifeline-style: dotted] {
actor user "Customer" [purple]
participant web, db
participant api "API" [indigo]
user -> web: open /login
web -> api: POST /login
api -> db: find user
db --> api: row [width: 2]
api -> db: audit [red, dotted, head: open]
note api: checks the hash [amber]
--- session ---
api --> web: 200 + cookie [green]
web -> web: render
}
chart p95 "Latency p95" [type: column, unit: ms] {
checkout: 120
search [green]: 48
payments [hsl(330 70% 50%)]: 88
}
chart traffic "Traffic by region" [type: donut, unit: %, theme: midnight, shadow] {
EU: 46
US [indigo]: 31
APAC: 23
}
quadrant prio "Priorities" [background: lightyellow, border: orange, border-style: dashed, radius: 6] {
x-axis Low effort -> High effort
y-axis Low value -> High value
q1 [green]: Quick wins
q2: Big bets
q3: Fill-ins
q4 [red]: Money pit
Search [teal]: 0.25, 0.8
Billing: 0.7, 0.65
Exports [color: tomato]: 0.3, 0.3
}
// three looks for a gantt: a label column, names on solid bars, thin lines
gantt plan "Q1 plan" [today: 2026-01-20, weekends: show] {
--- Design [violet] ---
research "User research" [progress: 100%]: 2026-01-05, 5d
wireframes [done]: after research, 4d
review [milestone]: after wireframes
--- Build [teal] ---
api "Build API" [active, progress: 40%, owner: ana]: 2026-01-14, 2w
ui [crit, owner: kim]: after wireframes api, 10d
launch [milestone, red]: after ui
}
gantt release "Release 2.0" [theme: midnight, today: 2026-02-18, bars: solid, labels: bar, notes: dates, density: compact, arrows: curved, summary: hide] {
--- Beta [sky] ---
beta "Private beta" [progress: 80%]: 2026-02-02, 2w
feedback "Feedback round" [active]: after beta, 1w
--- GA [green] ---
docs "Docs" [progress: 30%]: 2026-02-16, 10d
ga "General availability" [milestone]: after feedback docs
}
gantt hiring "Hiring" [bars: thin, labels: bar, rows: plain, grid: none, scale: week, density: loose] {
sourcing "Sourcing" [blue, progress: 70%]: 2026-01-05, 3w
interviews "Interviews" [indigo]: after sourcing, 4w
offers "Offers" [green]: after interviews, 2w
start "First day" [milestone]: after offers
}
timeline roadmap "Roadmap" [border: 2] {
2026 Q1: Private beta
- 40 design partners
2026 Q2 [green]: **Launch**
2026 Q3 [#0ea5e9]: Mobile app
2026 Q4 [color: rgb(234, 88, 12)]: EU region
}
kanban sprint "Sprint 12" {
Todo [gray]
- Write docs [owner: ana, priority: high]
- **Fix** login [red]
Doing [blue, limit: 2]
- API v2 [ticket: MER-12]
needs the new auth flow
- Search tuning [owner: kim]
- Billing export
Done [green]
- Ship 1.0
}
git release_flow "Release flow" {
commit "init" [tag: v1.0]
branch feature/login [pink]
commit "login form"
commit "oauth"
checkout main
commit "hotfix" [id: fix, highlight, red]
merge feature/login [tag: v1.1]
branch release/1.0 from v1.0 [label: "1.0.x", #0ea5e9]
cherry-pick fix
}
mindmap ideas "Launch plan" [layout: both] {
**Launch**
Marketing [pink]
Blog posts
Newsletter
Product
Beta [#16a34a]
- Pricing page
Sales [shape: pill]
Partners
}Web app
title: Web app
direction: right
.svc [blue]
.store [cylinder, amber]
user "Customer" [circle, purple]
cdn "CDN" [slate]
group app "App" [blue] {
web "Web" .svc
sub: Next.js
api "API" .svc
sub: REST + auth
}
group async "Background" [pink, dashed] {
queue "Jobs" [hexagon, pink]
worker "Worker" .svc
}
user <-> cdn: visits [flow]
cdn -> web
web -> api: fetch
api -> db "Postgres" .store
api --> queue: enqueue
queue --> worker
worker -> db: [constraint: false]Request lifecycle
title: Request lifecycle
direction: down
curve: orthogonal
req "Request" [pill, slate]
auth "Authenticated?" [diamond, amber]
cache "In cache?" [diamond, amber]
hit "Serve cached" [green]
handler "Run handler" [blue]
deny "401" [pill, red]
req -> auth
auth -> deny: no
auth -> cache: yes
cache -> hit: yes
cache -> handler: no
handler -> store "Write cache" [blue]Event-driven services
title: Order events
theme: midnight
.svc [blue]
.topic [hexagon, pink]
orders "Orders" .svc
placed "order.placed" .topic
paid "order.paid" .topic
group consumers "Consumers" [dashed] {
billing "Billing" .svc
mail "Mail" .svc [icon: ✉️]
stock "Inventory" .svc
}
orders => placed: publish [flow]
placed --> billing, stock
billing => paid: publish [flow]
paid --> mail, ordersService status board
Cards hold short facts: status chips, numbers, a small chart.
title: Platform status
subtitle: last 24 hours
theme: terminal
api "api" [meta: eu-west-1, caps] {
uptime || [[green: 99.98%]]
p95 || **182 ms**
errors || {amber: 0.4%}
---
bars: 4 6 5 7 9 8 6 7 10 9
}
db "postgres" [meta: primary, caps] {
connections || 84 / 200
replicas || [[green: 2 healthy]]
---
bars amber: 3 3 4 6 9 7 5 4
}
jobs "jobs" [meta: queue, caps] {
waiting || 12
failed || [[red: 3]]
*retry in 5 min*
}
api <-> db: sql
caption: pooled
api -> jobs: enqueueServer deploy
A product infographic in the terminal theme: terminal output, nested cards, chips, a table with bars and a struck-through list.
title: >landfall
subtitle: bare server to HTTPS in two commands
theme: terminal
direction: right
rank-gap: 120
laptop "~/shop" [meta: your laptop] {
$ `lf setup vps --host <server-ip>`
{green: ✓} docker · ufw · fail2ban · traefik
$ `lf server domain vps example.com`
{green: ✓} new sites get *<site>.example.com*
$ `lf deploy`
*→ compose.yaml: web, db*
{green: ✓} built web · health check passed
{green: ✓} live → **https://shop.example.com**
}
group vps "vps" [caps] {
meta: Ubuntu 24.04 · no agent installed
traefik "Traefik" [meta: $ lf certs] {
Let's Encrypt · HTTP/3 · :443
}
shop "shop.example.com" [meta: compose] {
[[web :3000]] [[db postgres]] || `$ lf volume backup`
backup **daily** → nas
}
blog "blog.example.com" [meta: static] {
[[nginx:alpine]] login in front || `$ lf auth`
}
api "api.example.com" [meta: Dockerfile] {
[[app :8080]] releases {green: ●●●●} || `$ lf rollback`
}
journal "journal" [meta: every change recorded, caps] {
*#5 14:41* env shop STRIPE_KEY=… || {green: ↺}
*#4 14:38* domains shop +www || {green: ↺}
*#3 14:30* deploy shop || {green: ↺}
---
`$ lf history · lf undo`
}
}
group net "the internet" [caps] {
d1 "🔒 shop.example.com"
sub: your shop, live
d2 "🔒 blog.example.com"
sub: static files, nginx
d3 "🔒 api.example.com/health"
sub: {ok: true}
}
dns "dns at your registrar" [caps, dashed] {
A example.com → <server-ip>
A *.example.com → <server-ip>
---
`$ lf domains · lf check`
}
traffic "last 24h" [meta: $ lf traffic, caps] {
| site | requests | 5xx | p95 |
|------|----------|-----|-------|
| shop | 12.4k | 0 | 84 ms |
| blog | 3.1k | 0 | 12 ms |
| api | 48.0k | 2 | 41 ms |
bars: 2 3 2 4 6 8 9 8 7 9 10 9 8 7 6 5
cpu **12%** · mem **41%** · disk **38%**
}
stop "what you stop doing" [shape: text, caps] {
~~hand-writing nginx configs and certbot cron jobs~~
~~paying a PaaS for a side project~~
~~running a daemon you can't read~~
}
laptop -> traefik: ssh
caption: one bash script per command
laptop -> journal: [dotted, head: dot]
traefik -> shop, blog, api
shop -> d1: HTTPS
blog -> d2
api -> d3
d3 -> dns: [dotted, head: none]
d1 -> traffic: [dotted, head: none]Release pipeline
title: release pipeline
subtitle: from commit to release, without a release manager
theme: terminal
commit "conventional commit" [meta: main, caps] {
✓ `feat(api): add search`
✓ `fix: trim header`
*chore: bump deps*
}
group ci "CI pipeline" [caps] {
meta: 3 jobs
checks "checks" [meta: 42s, caps] {
✓ typecheck || [[green: pass]]
✓ tests || [[green: 128]]
✓ build || [[green: ok]]
}
}
release "release" [meta: v0.1.0, caps] {
| commit | bump |
|--------|-------|
| feat | minor |
| fix | patch |
| feat! | major |
---
~~manual tagging~~
}
npm "npm" [shape: text] {
**yuhwa**
*trusted publishing*
}
commit -> checks: push
caption: every commit
checks -> release: green
release -> npm: publish [rotate]Data model
Cards with tables work as entity boxes.
title: Shop schema
direction: right
user "users" [caps] {
| id | uuid |
| email | text |
| name | text |
}
order "orders" [caps] {
| id | uuid |
| user_id | uuid |
| total | numeric |
| status | text |
}
item "order_items" [caps] {
| order_id | uuid |
| sku | text |
| qty | int |
}
user -> order: 1..n
head: open
tail: bar
order -> item: 1..n
head: open
tail: barTeam ownership
One class per team carries its colour to the group and to every node in it, so ownership reads at a glance.
title: Who owns what
subtitle: three teams, one request path
direction: right
theme: pastel
.web [blue]
.platform [purple]
.data [green]
group web "Web team" .web {
meta: 5 people
site "Marketing site" .web
shop "Shop frontend" .web
}
group platform "Platform team" .platform {
meta: 4 people
gw "API gateway" .platform
auth "Auth" .platform
}
group data "Data team" .data {
meta: 3 people
wh "Warehouse" .data [cylinder]
bi "Dashboards" .data
}
site, shop -> gw
gw -> auth
gw ..> wh: events [flow]
wh -> biAnnotated sketch
A note joins the pipeline with a constraint: false edge, so it sits right next to the step it explains.
theme: mono
curve: straight
a "Input" -> b "Parse" -> c "Layout" -> d "Render" -> e "SVG" [document]
note "deterministic:\nsame input, same SVG" [note]
d -- note: [dotted, constraint: false]Product dashboard
Plugins add presentation pieces: window frames, stat tiles, sparklines, progress bars and a footer strip.
title: Shop release **v2.4**
subtitle: what ships on {green: Friday}
footer: **landfall** v2.4 | `eu-central-1` | updated {green: 2 min ago}
theme: midnight
app "Storefront" [frame: browser shop.example.com, blue] {
stat: 99.9% uptime | 42ms p95 | 1.2k rps
---
spark blue: 3 5 4 6 8 7 9 12 10 14
}
ci "Pipeline" [frame: terminal ~/shop, meta: 42s] {
progress green: 72% tests
progress amber: 9/12 deploys
bars purple: 3 5 4 8 6 9
}
flags "Flags" [frame: window Settings] {
new-checkout || [[green: on]]
dark-mode || [[off]]
}
app -> ci: build [flow]
ci -> flagsGit branching
Feature and hotfix branches with release tags. merge draws a merge commit; a colour after branch colours the lane.
title: Release branches
subtitle: features merge into main, hotfixes get a patch tag
git flow "main" {
commit "init" [tag: v1.0.0]
branch feature/search
commit "index products"
commit "search UI"
checkout main
branch hotfix/cart [red]
commit "fix rounding"
checkout main
merge hotfix/cart [tag: v1.0.1]
checkout feature/search
commit "rank by sales"
checkout main
merge feature/search [tag: v1.1.0]
}Git log
direction: down reads like git log --graph: commit ids, branch names at their heads and tags on one line.
theme: terminal
git log "git log --graph --oneline" [direction: down] {
commit "initial import" [id: 9fceb02]
branch release/2.0
commit "bump version" [id: 3a1e5d7]
checkout main
commit "add payments" [id: b7c41f0]
commit "fix flaky test" [id: 0e8d2a9]
checkout release/2.0
commit "changelog" [id: 6d2f3b1, tag: v2.0.0]
checkout main
merge release/2.0 [id: c4a9e12]
}Checkout sequence
A sequence panel without a graph: actors, numbered messages, dashed replies, notes and a divider.
theme: pastel
sequence pay "Card payment" [numbered] {
actor user "Customer" [purple]
participant shop "Shop"
participant psp "Payment provider"
participant bank "Bank"
user -> shop: pay 49.00 €
shop -> psp: create intent
psp -> bank: authorize
bank --> psp: approved
note psp, bank: 3-D Secure may add a step here
--- capture ---
psp --> shop: webhook: succeeded
shop --> user: order confirmed
}Roadmap
Two timelines stacked with panels: column: the quarters and the launch day.
title: Search launch
panels: column
timeline q "2026" {
Q1: Discovery
- 12 customer interviews
Q2 [blue]: Beta
- 3 design partners
Q3 [green]: **GA**
Q4 [amber]: Personalisation
}
timeline day "Launch day" {
08:00: freeze
10:00 [blue]: deploy
- canary 5%
12:00 [green]: 100%
16:00: retro
}Release overview
Graph, roadmap, branches and numbers in one file. panels: grid arranges them in two columns.
title: Checkout v2
subtitle: architecture, plan, branches and numbers in one file
panels: grid
.svc [blue]
web "Web" .svc -> api "API" .svc -> db "Orders" [cylinder, amber]
api -> queue "Events" [pill, teal]: publish [dashed]
timeline plan "Roadmap" {
Jan: Design
Feb [blue]: Build
Mar [green]: **Launch**
}
git branches "Branches" {
commit "v1" [tag: v1.0]
branch checkout-v2
commit "new cart"
commit "payments"
checkout main
merge checkout-v2 [tag: v2.0]
}
chart conv "Conversion" [type: line, unit: %] {
Jan: 2.1
Feb: 2.4
Mar: 3.2
}Shared services
The services live in shared/services.yu. This file imports them, restyles one node and adds its own edges and a chart.
import "./shared/services.yu"
title: Checkout traffic
api [purple]
web -> api
api -> db: SQL
chart rps "Requests / s" [type: column] {
web: 820
api: 640
db: 310
}