This document outlines which diagrams are static images vs Mermaid code, and provides recommendations for future updates.
These diagrams have been converted to static SVG images for better visual quality and Mintlify compatibility:
Used in:
contracts/core-contracts.mdxcontracts/architecture.mdx
Why static:
- Key visual appearing in multiple locations
- Benefits from custom color scheme and precise layout
- Complex hierarchical flow with split calculations
Update process: Edit the SVG file directly or recreate in Figma/Excalidraw
Used in:
x402-integration/escrow-scheme.mdx
Why static:
- Hero diagram introducing core concepts
- Side-by-side comparison benefits from custom layout
- Visual polish important for first impression
Update process: Edit the SVG file directly or recreate in design tool
These diagrams remain as Mermaid code with professional theming applied:
Files:
- All payment flow examples in
contracts/examples.mdx - Escrow scheme sequence in
x402-integration/escrow-scheme.mdx - Overview flow in
x402-integration/overview.mdx
Theme applied:
%%{init: {'theme':'base', 'themeVariables': {
'primaryColor':'#f3f4f6',
'primaryTextColor':'#1f2937',
'primaryBorderColor':'#9ca3af',
'lineColor':'#6b7280',
'actorBkg':'#e0e7ff',
'noteBkgColor':'#fef3c7'
}}}%%Why Mermaid:
- Version-controlled and easy to update
- Clear temporal flow (timeline-based)
- Standard format for sequence diagrams
Files:
- Decision tree in
x402-integration/comparison.mdx - Logic tree in
conditions.mdx - Relationship diagrams in
factories.mdx
Theme applied:
- Consistent color scheme with custom node styling
- Orange (#f59e0b) for escrow decisions
- Blue (#4f46e5) for exact decisions
- Gray (#64748b) for questions/intermediate nodes
Why Mermaid:
- Simple decision flows
- Easy to maintain as logic changes
- Code-based editing workflow
Files:
- Payment state machine in
core-contracts.mdx - Request status states in
core-contracts.mdx
Why Mermaid:
- Perfect for state machines
- Clear state transitions
- Industry standard format
These diagrams would benefit from custom design in future iterations:
- Decision Tree (
comparison.mdx) - Could be a visually compelling infographic - Condition Logic Tree (
conditions.mdx) - Complex nested logic might be clearer with custom layout - Payment State Machine (
core-contracts.mdx) - Hero diagram that could be more polished
- Hero/featured diagrams
- Complex layouts with custom positioning
- Diagrams appearing in multiple locations
- When visual brand consistency is critical
- Sequence diagrams (temporal flows)
- Simple flowcharts and decision trees
- State machines
- Diagrams that change frequently
- Internal documentation
All Mermaid diagrams should use the base theme with these colors:
- Primary: #f3f4f6 (light gray)
- Escrow/Orange: #f59e0b
- Exact/Blue: #4f46e5
- Success/Green: #10b981
- Warning/Yellow: #fef3c7
- Text: #1f2937
- Static images:
/images/diagram-name.svg - ASCII source:
/images/diagram-name-ascii.txt(for reference) - Always include alt text describing the diagram