Templates / flowchart
Request throttling logic
Rate-limiting decision logic with quota checks and retry hints. A template for API behavior documentation.
Preview
Mermaid 11 renderer
Rendering preview...
Mermaid source
flowchart
flowchart TD
req[Incoming request] --> auth{Valid API key?}
auth -->|no| deny401[Return 401]
auth -->|yes| quota{Quota remaining?}
quota -->|yes| serve[Process request]
quota -->|no| burst{Burst allowance left?}
burst -->|yes| serveSlow[Process at reduced priority]
burst -->|no| deny429[Return 429 + Retry-After]
serve --> log[Record usage]
serveSlow --> logMore 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.