sequenceDiagram
autonumber
actor User
participant Browser
participant API
User->>Browser: Click "Save"
Browser->>+API: POST /posts
Note right of API: validate, store
API-->>-Browser: 201 Created
alt saved
Browser->>User: Show "Saved"
else error
Browser->>User: Show error
end
->>solid arrow,-->>dashed (replies),-xfor a lost message,-)async+and-on the arrows open and close an activation barNote right of X: text, alsoleft ofandover A,Balt/else/endfor branches,loop/endto repeat,opt/endfor optional bitsautonumbernumbers the messages
The source goes in a ```mermaid fence and the browser draws it, which is how the one above is rendered right here.