Ask HN: What would you want from a diagrams-as-code editor?
1 jbreckmckye 4 5/4/2025, 10:03:54 PM
I'm thinking of taking on a new open source project. This would be a native desktop application distributed under something like GPL or MPL2.
As a software engineer I do a lot of architecture and process diagrams but I find existing web editors for things like D2 and Mermaid somewhat cumbersome. I was thinking of building a dedicated, native editor.
Some features I'm thinking of:
- autocomplete and macros for faster composition
- wizards for common diagram types
- save diagrams as editable PNGs / editable SVGs
- generate code for git "architecture" repositories
- create themes for diagrams
- offline documentation for language syntax
- generate diagrams from json (nodes / edges lists)
- some form of LLM assistant integration, e.g. to bootstrap diagrams with a prompt
What features would make something like this worth using, to you?
In other words, the graphical output wouldn't just be a preview of the code, but an editable canvas like Figma or SVG editors.
Mermaid is so terrible to work with I usually have to use ChatGPT to make all but the simplest diagrams. It is not very good at it though and will frequently hallucinate invalid syntax, especially for less common charts like sankeys.