Product Launch
anonymous
1 points
3 comments
Posted21 days agoActive21 days ago
Claude Code
github.commvplibrarydevelopers
Key Features
drawing diagrams using Claude CodeXML parsing
Tech Stack
Claude CodeXML
Key Features
Tech Stack
Great question! The current implementation is relatively straightforward:
Layout: The diagram generation uses fixed coordinate positioning (x, y values) calculated heuristically based on node indices and predefined
spacing. For example, flowcharts use a simple vertical layout with consistent spacing. There's no automatic layout engine - it's manual
coordinate calculation.
Arrow routing: Currently uses simple direct connections between source and target nodes. draw.io handles the actual path rendering, but we don't
leverage draw.io's advanced edge routing algorithms (orthogonal routing, etc.) - arrows just connect the specified entry/exit points.
CJK text sizing: This is actually an area that could use improvement. The current implementation doesn't dynamically calculate text width for
CJK characters. Node widths are set to fixed values (e.g., 120px for flowchart nodes), which works reasonably for short labels but may clip
longer CJK text. draw.io does handle CJK rendering internally, but we're not pre-measuring text to adjust geometry.
So to directly answer: it's mostly heuristic-based with fixed layouts, not leveraging draw.io's internal layout rules. The .drawio XML format
gives us the geometry, and draw.io renders it. Future improvements could include:
- Auto-layout algorithms (dagre.js style)
- Text measurement for proper sizing
- Smarter edge routing
Thanks for the interest!I mention this because in my experience Claude is really good at one‑shotting Mermaid UML diagrams.
Not affiliated with Hacker News or Y Combinator. We simply enrich the public API with analytics.