Templates / stateDiagram-v2
Token bucket rate limiter states
The two-state lifecycle of a token bucket rate limiter: full and empty, with periodic refill.
Preview
Mermaid 11 renderer
Rendering preview...
Mermaid source
stateDiagram-v2
stateDiagram-v2
[*] --> Full
Full --> Full : request consumes token, bucket not empty
Full --> Empty : token count reaches zero
Empty --> Empty : request rejected
Empty --> Full : refill interval elapsesMore 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.