Sequence Diagram Builder
Generate UML sequence diagrams using sequencediagram.org text syntax.
Quick Start
Create a sequence diagram by:
- Gather requirements about the interaction flow to visualize
- Define participants (actors, systems, databases, etc.)
- Map out the message flow between participants
- Add conditional logic, loops, and notes as needed
- Generate a .txt file with the diagram syntax
Output Format
Always save diagrams as .txt files. The user can open these files at https://sequencediagram.org to view and export to various formats (PNG, PDF, SVG).
Syntax Reference
For complete syntax details including participants, messages, control structures, notes, styling, and more, see @references/syntax.md.
Common Patterns
For complex diagrams or specific scenarios, see @references/examples.md for pre-built patterns:
- API request/response flows
- Authentication sequences
- Database transaction patterns
- Microservices communication
- Error handling flows
Workflow
- Understand the interaction: Ask clarifying questions about what needs to be visualized
- Identify participants: Determine all actors, systems, and components involved
- Map message flow: Document the sequence of interactions
- Add structure: Include conditionals, loops, and parallel flows as needed
- Add documentation: Use notes to clarify complex steps
- Generate file: Create a .txt file with the complete diagram syntax
- Validate: Review the output for completeness and clarity
Tips
- Use descriptive participant names that match the user's terminology
- Break complex flows into separate diagrams rather than one overwhelming diagram
- Add notes for business logic or important details not captured in messages
- Use
spaceorspace Nto add vertical spacing for readability - Consider using
participantgroupfor related participants - Use
titleto give the diagram a clear name - Test the output at sequencediagram.org to ensure it renders correctly