cheatsheet / current
Flowchart
Use Mermaid flowchart for process logic, branching, pipelines, decision trees, and system flows.
Flowchart
Use Mermaid flowchart for process logic, branching, pipelines, decision trees, and system flows.
Basic template
flowchart TD
A[Start] --> B{Decision}
B -->|Yes| C[Do work]
B -->|No| D[Stop]
Core syntax
- Start with
flowchart TD,LR,BT, orRL - Common node shapes:
A[Step]rectangleB(End)roundedC{Decision}diamondD[(Database)]cylinder
- Connect with
--> - Label an edge with
-->|label| - Group related nodes with
subgraph
Common example
flowchart LR
subgraph Intake
A[Receive file] --> B[Validate columns]
end
B -->|Valid| C[Transform data]
B -->|Invalid| E[Reject and notify]
C --> D[(Warehouse)]
D --> F[Build report]
Good for
- Business processes
- ETL pipelines
- Troubleshooting paths
Watch for
- Flowcharts get noisy when you try to model too much timing or state
- If order over time matters, sequence or gantt may be a better fit