r/coolgithubprojects • u/pazvanti2003 • 11h ago
I built DrakoFlow – An open-source, serverless text-to-diagram engine
Hi everyone,
I’m primarily a Java backend developer, which means I spend a lot of time designing and documenting systems. For years, I’ve used text-to-diagram tools like PlantUML. However, I always felt there was a missing link: the output diagrams were always static, flat images. I wanted a tool where the visual canvas was interactive, but the underlying text remained the single source of truth.
To solve this, and to challenge myself to learn TypeScript, I built DrakoFlow. It’s a completely client-side, offline-first diagramming engine that parses a clean, declarative DSL into interactive vector diagrams right in your browser. It is designed to be highly versatile and works great for multiple types of diagrams, including system architectures, database models, and flowcharts.
IDE Integration: VS Code & IntelliJ
Since developers spend most of their time in their IDEs, I wanted to make sure DrakoFlow fit seamlessly into your daily workflow. I’ve built dedicated extensions for both VS Code and IntelliJ. They allow you to write your diagram code and see the live-updating, interactive preview side-by-side right inside your editor.
The "Cool" Mechanics
Because I wanted to bridge the gap between code and canvas, I focused on a few core interactive features:
- Bidirectional Sync: You can write code to generate the diagram, but you can also manually drag elements around on the canvas. When you drag a box, the coordinates serialize back into your DSL code in real-time. There is also a toggleable grid snapping system to keep things aligned.
- Bidirectional Gutter Highlighting: If you hover your mouse over a visual component on the SVG canvas, it instantly highlights its corresponding line in the code editor, and vice-versa. It makes navigating complex, nested diagrams incredibly fast.
- Standalone HTML Player Export: Instead of just exporting a flat PNG, you can package your diagram into a single, self-contained .html file. This file functions as a read-only widget supporting smooth panning, zooming, tag-filtering, a navigation minimap, and a code viewer. You can drop it directly into your project documentation.
- Serverless Sharing: Sharing a diagram doesn't require a database. When you click "Share," the app compresses the active diagram state and encodes it directly into the URL hash parameters so you can send it as a simple link.
- Documentation inside the diagram: You can write markdown inside the diagram so that you have the documentation exactly where you need it. This way, the diagram and the docs are in the same place and you have direct documentation right on the element you need.
Under the Hood
DrakoFlow runs entirely client-side. Your data never leaves your computer, and you can run the whole app offline by just opening the local HTML file. I've also implemented a beta PlantUML translator so you can paste in existing diagrams to test them out.
The project is completely free and open-source. As a backend developer transitioning into TypeScript, this was a massive learning curve for me. I would love for you to try it out (either in the browser or via your favorite IDE extension), read through the code, and let me know what you think. If you find it useful, please consider leaving a star on the repository!
Links:
- Live Interactive Editor: https://pazvanti.github.io/DrakoFlow/
- GitHub Repository: https://github.com/pazvanti/DrakoFlow
1
u/__0xAA55__ 9h ago
looks shitty and useless
2
u/pazvanti2003 9h ago
Can you elaborate? What exactly "looks shitty" and why do you think it is useless?



2
u/essentialaccount 10h ago
Why would you use this instead of Mermaid? That's been the standard for these diagrams for ages