A worked example, rendered from real sample data. Sign in to run the tool on your own input.
login
auth
profile{
"diagram": "sequenceDiagram\n participant Client as 🖥️ Client\n participant API as 📡 API\n participant Auth as 🔐 Auth\n participant DB as 💾 DB\n\n Client->>API: POST /login (username, password)\n API->>Auth: Verify credentials\n Auth->>DB: Query user\n DB-->>Auth: User record\n Auth-->>API: Token generated\n API-->>Client: {token, user}\n\n Client->>API: GET /profile (Authorization: token)\n API->>Auth: Validate token\n Auth-->>API: Token valid ✓\n API->>DB: GET user profile\n DB-->>API: Profile data\n API-->>Client: Profile JSON",
"format": "mermaid",
"title": "Authentication Flow",
"actors": [
"Client",
"API",
"Auth Service",
"Database"
],
"steps": [
"Login request",
"Verify credentials",
"Generate token",
"Profile request",
"Return profile"
]
}
Generate sequence diagrams showing interaction flows between components and actors. Part of the DevTools Surf developer suite. Browse more tools in the Diagrams & Workflows collection.