Templates / stateDiagram-v2
Job queue lifecycle
Background job states with retry backoff and a dead-letter terminal state.
Preview
Mermaid 11 renderer
Rendering preview...
Mermaid source
stateDiagram-v2
stateDiagram-v2
[*] --> Queued
Queued --> Running : worker picks up
Running --> Succeeded : exit 0
Running --> Failed : error thrown
Failed --> Queued : retry with backoff
Failed --> Dead : max retries reached
Succeeded --> [*]
Dead --> [*]More templates
flowchartArchitecture
Microservices architecture
A service map with an API gateway, core services, and shared infrastructure. A solid starting point for README architecture sections.
sequenceDiagramProcess
User login sequence
A login flow with token issuance and a failure branch. Useful for documenting auth endpoints and session behavior.
stateDiagram-v2Process
Order state machine
Lifecycle states for an e-commerce order, from creation to fulfillment, with cancellation and refund paths.