MERMAID FLOWCHART SYNTAX RULES: DECLARATION: - Start with: flowchart TD (or LR, BT, RL for direction) - Alternative: graph TD (legacy syntax) NODE SHAPES: - [text] = Rectangle (default process) - ([text]) = Stadium/Pill (start/end points) - {text} = Rhombus/Diamond (decision points) - [(text)] = Database (data storage) - [[text]] = Subroutine (function calls) - ((text)) = Circle (connectors) - [/text/] = Parallelogram (input/output) ARROWS: - --> = Standard arrow - -.-> = Dotted arrow - ==> = Thick arrow - --x = Arrow with cross - -->|text| = Labeled arrow SUBGRAPHS: - subgraph title - content - end STYLING: - style NodeID fill:#color,stroke:#border,color:#text COMMON ISSUES: - Invalid node IDs starting with numbers or containing hyphens - Unquoted text with spaces or special characters - Missing arrow labels for decision branches - Unclosed subgraph blocks FIX REQUIREMENTS: 1. Use valid node identifiers (letters, numbers, underscores) 2. Quote text with spaces: ["text with spaces"] 3. Label all decision branches clearly 4. Close all subgraph blocks with 'end'