Sequence diagram (Mermaid)
Sequence diagrams are the most consistently useful thing Mermaid draws. This one covers the syntax you will use ninety percent of the time: participants, arrows, activations, alt and loop.
#What this example shows
autonumber, which numbers the messages so a review can refer to step 4.
alt and else, for a path that depends on a condition.
A note anchored across two participants, which is where timing rules belong.
#A worked example
Open it, edit it, or copy the source below.
The source, which you can paste into a new diagram and edit:
#Making it your own
Add par and end to show two things happening at once.
Use participant rather than actor for systems; actor draws a stick figure.
Put expiry and retry rules in notes rather than in message labels.
#Related
Copy it. Change one line. See what happens.
