Templates / stateDiagram-v2
Order state machine
Lifecycle states for an e-commerce order, from creation to fulfillment, with cancellation and refund paths.
Preview
Mermaid 11 renderer
Rendering preview...
Mermaid source
stateDiagram-v2
stateDiagram-v2
[*] --> Created
Created --> Paid : payment confirmed
Created --> Cancelled : timeout / user cancels
Paid --> Packed : warehouse picks items
Packed --> Shipped : carrier pickup
Shipped --> Delivered : proof of delivery
Paid --> Refunded : refund approved
Delivered --> Refunded : return accepted
Cancelled --> [*]
Refunded --> [*]
Delivered --> [*]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.
erDiagramData
E-commerce data model
A compact entity-relationship model for customers, orders, and products with keys and attributes.