Live data from Hacker News

The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

jessems.com

71–80 of 113 posts

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#76
post #68

Swimlanes is a simple implementation of the same concept. https://swimlanes.io/

Yes, this is what I use and I can't recommend it highly enough. I'll try mermaid but I think swimlanes.io is going to win for most use cases. Here's why:

(1) you just open the web app and start typing and you have the beginnings of your diagram within 30 seconds literally.

(2) The web app is elegantly and thoughtfully designed, the diagrams are beautiful, export functionality is there.

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#77
post #59

Earlier quoted context omitted.

And if you start a markdown codeblock like ```mermaid graph TD; A-->B ``` Many things that support markdown (e.g. github, gitlab, typora, ...) will render the resulting graph.

That features is also a feature Mermaid/Markdown renderers have borrowed from existing uses of PlantUML. You've been able to embed PlantUML in a Markdown block in Gitlab (and have it rendered inline as an image) since before MermaidJS ever existed. Github's embedded MermaidJS feature is years late.

unfortunately, you need a PlanetUML server when using a self hosted gitlab install.

running directly in the browser is, imho, the best feature of mermaidjs

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#78

As an aside, I've been pretty impressed at GPT4's ability at generating MermaidJS sequence diagrams for open source projects.

I'm a huge fan of riffing on architecture ideas, with chatgpt/GPT4, and then asking asking for a representation in mermaid syntax.

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#80
post #32
post #20

Earlier quoted context omitted.

As another commenter mentions, the mmdc tool takes care of this. I should have mentioned that in the blog post.

Does it do it without needing to have npm and puppeteer installed at all?

I'm one of the maintainers of the mermaid-cli project, and unfortunately, no.

Mermaid needs a browser's layout engine to run properly [1], but I haven't yet seen a library that will help us without puppeteer.

And yep, NPM (or another Node.JS package manager) is still needed for installation. I was working on trying to bundle all of mermaid-cli's dependencies (aka Node.JS, puppeteer) into one massive single-file exe last weekend, but it's seems we're blocked by missing features in other packages [2].

If anyone has any ideas on how to implement these things easily, feel free to help-out :) I'm also not a big fan of puppeteer, so I'd love to see a way to go without it.

[1]: https://github.com/mermaid-js/mermaid/issues/3650

[2]: https://github.com/mermaid-js/mermaid-cli/issues/467#issueco...

Post reply on HN