Templates / sequenceDiagram
User login sequence
A login flow with token issuance and a failure branch. Useful for documenting auth endpoints and session behavior.
Preview
Mermaid 11 renderer
Rendering preview...
Mermaid source
sequenceDiagram
sequenceDiagram
autonumber
actor User
participant App as Web app
participant API as Auth API
participant DB as User store
User->>App: Enter email and password
App->>API: POST /sessions
API->>DB: Look up user record
DB-->>API: User + password hash
alt Credentials valid
API-->>App: 201 session + JWT
App-->>User: Redirect to dashboard
else Credentials invalid
API-->>App: 401 unauthorized
App-->>User: Show error message
endMore templates
flowchartArchitecture
Microservices architecture
A service map with an API gateway, core services, and shared infrastructure. A solid starting point for README architecture sections.
stateDiagram-v2Process
Order state machine
Lifecycle states for an e-commerce order, from creation to fulfillment, with cancellation and refund paths.
erDiagramData
E-commerce data model
A compact entity-relationship model for customers, orders, and products with keys and attributes.