D2 is now open source – a new, modern language that turns text to diagrams

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • d2

    D2 is a modern diagram scripting language that turns text to diagrams.

  • that's not contradictory. we plan to do this in the next month or so, but text-to-diagram reflects current state, so it'll say it's not supported until it's publicly released. if this is a blocker, feel free to watch this issue to be notified! https://github.com/terrastruct/d2/issues/99

  • text-to-diagram-site

    Compare syntax, layouts, outputs between languages for generating diagrams with text.

  • This looks great, but sequence diagrams are one of the things I use most with PlantUML. It's probably just me, but I find these super useful to document various caching scenarios, and I use them all the time to help explain various payment processing flows.

    https://text-to-diagram.com/ says the sequence diagrams aren't supported, but your github description says

    > D2 intends to integrate with a variety of layout engines, e.g. dot, as well as single-purpose layout types like sequence diagrams. You can choose whichever layout engine you like and works best for the diagram you're making.

    Can you explain a bit more about this, if I wanted to create a sequence diagram with D2 today is there a simple path to follow to do this?

    Thanks for the work on the project!

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • d2-vscode

    VSCode extension for D2 files.

  • Really like the syntax - I find it much more intuitive than Mermaid. Going to give this a try.

    VS Code extension, too: https://github.com/terrastruct/d2-vscode

  • kroki

    Creates diagrams from textual descriptions!

  • When it comes to generating diagrams that look nice from just about any diagram scripting language, I tend to go to "Kroki!". Hopefully they'll do some work to support D2 as well, although going from D2 -> PlantUML is something you can do in the meantime.

    * https://kroki.io/

  • erd

    Translates a plain text description of a relational database schema to a graphical entity-relationship diagram.

  • I like it and the comparison site on https://text-to-diagram.com

    I just wanted to drop a reference to Burnt Sushi's ERD tool [0]. It only does one diagram type: Entity Relationship Diagram. It's wonderful. Human-first syntax, code comments, and some simple formatting settings like colors and font sizes that help make more complex diagram pleasing and informative.

    [0] https://github.com/BurntSushi/erd

  • ilograph-standard-libraries

    Standard libraries for use with Ilograph Interactive Diagrams (https://app.ilograph.com)

  • Only a small part of it: the standard diagramming libraries (or, presently, library): https://github.com/billy-pilger/ilograph-standard-libraries

  • obsidian-graphviz

    Graphviz plugin for obsidian md.

  • This is a great idea; my go-to approach is the "I'll use PowerPoint to do that and take a screenshot" mindset since I don't have a need for publication quality output.

    I really like the comparison site that you have created - it's great for learning these languages. I would love to see a plugin for Obsidian for the times where I need to add a custom drawing to my notes. It looks like there already are plugins for PlantUML[1] and graphviz[2] today.

    [1] https://github.com/QAMichaelPeng/obsidian-graphviz

    [2] https://github.com/joethei/obsidian-plantuml

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • obsidian-plantuml

    Generate PlantUML Diagrams inside Obsidian.md

  • This is a great idea; my go-to approach is the "I'll use PowerPoint to do that and take a screenshot" mindset since I don't have a need for publication quality output.

    I really like the comparison site that you have created - it's great for learning these languages. I would love to see a plugin for Obsidian for the times where I need to add a custom drawing to my notes. It looks like there already are plugins for PlantUML[1] and graphviz[2] today.

    [1] https://github.com/QAMichaelPeng/obsidian-graphviz

    [2] https://github.com/joethei/obsidian-plantuml

  • dsl

    Discontinued Structurizr DSL

  • 1. not currently, but it's on the roadmap!

    2. with any integration, if there's enough demand, we'll do it. Once we add interactivity to diagrams, it should be trivial to emulate. However I should mention that Simon Brown (the creator of C4) has his own DSL for C4 https://github.com/structurizr/dsl)! We have no intention of competing with it.

    3. Currently the options to tune are limited. The Terrastruct app has granular layout control via drag-and-drop, and we're working to bring some of that to native/open-source.

  • dagre-es

    The dagrejs library exported as ES modules.

  • I think Mermaid itself uses this fork, which is still active;

    https://github.com/tbo47/dagre-es

  • saddle-data-graph

    where does it come from, where does it go?

  • Is it possible to integrate this with a library like networkx? D2 has great layouts and seems very simple to create ad-hoc graphs, but it would also be nice to support graph data structures that you can slice up how you want, like this https://github.com/hammeiam/saddle-data-graph/blob/master/Sa...

  • dagre

    Directed graph layout for JavaScript

  • dagrejs has a section on "Recommended Reading" which lists which algorithms from which papers they implement.

    https://github.com/dagrejs/dagre/wiki#recommended-reading

  • diagrams

    :art: Diagram as Code for prototyping cloud system architectures

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts