frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text

https://github.com/mermaid-js/mermaid
148•olalonde•2d ago

Comments

smusamashah•8h ago
I have an almost exhaustive list [1] of browser based text to diagram tools. Some specialised tools (like https://sequencediagram.org/) so much better at what they do than any generic ones like mermaid.

[1] https://xosh.org/text-to-diagram/

edoceo•7h ago
70! That is awesome
codetrotter•7h ago
70!? That’s more than a Googol!
edoceo•3h ago
You're catching more heck than me but, for real it's a great competitive cross cut. Maybe my remarks seemed flippant but, curated list like this is what I wish Google or AI could deliver. It's quality content.
andrewl•5h ago
I like Mermaid fine, but nothing is perfect. I will look at your list. The tool I always wanted would let me paste in the SQL of my database schema and output a diagram of the tables and relationships. That's SQL and not Markdown or JSON or any other format.

Note that DrawDB (www.drawdb.app) does this, although it does not yet handle views. But I have been happy with what it offers so far. Still, I would welcome suggestions of other tools.

picklesman•4h ago
Check out dbdiagram.io though I don’t know if it handles views either, I never tried.
MathMonkeyMan•4h ago
If it's sqlite compatible, then there a many solutions. In general it's trickier.

plug: https://github.com/dgoffredo/sqliteviz

Not web based, though.

kanodiaashu•5h ago
This list is so cool!
bradly•5h ago
This is a great resource. Thank you for the effort. Do you know of something similar for charting/data-viz libraries?
smhanov•4h ago
I wish WebSequenceDiagrams was further up your list. I guess I have some work to do.

When I made it, nothing like mermaid, plantUML,lucid charts existed. The syntax of most tools was based on Java or graphviz and overly verbose. I was writing an email to a colleague at BlackBerry and wrote out the sequence diagrams as text. I spent the next week making a script to convert it to an image and put it online. Many other tools have since adopted the syntax and I'm happy it has become so widespread.

paul_h•2h ago
Great tech - thanks for your pioneering work. I made https://vsm-book.com/app as a tool to support a meeting and leave a lasting artifact. WebSequenceDiagrams (and https://bramp.github.io/js-sequence-diagrams/ which also credits yours) was very much in my mind, though my grammer is much less elegant.
butz•1h ago
I was wondering, are there any tools that could help to draw decent looking genealogical tree ? My main issue are the updates, where adding one of the ancestors or newborns causes full rework of entire tree. I'd like to feed data to some script and have it render a family tree, with all the regular updates.
fastasucan•58m ago
But they are browser based.
kacesensitive•7h ago
i have been quite enjoying https://www.eraser.io/diagramgpt
jagged-chisel•7h ago
Like PlantUML?
mdaniel•7h ago
Nicer looking but fewer diagram types

Also, AFAIK, their "render locally" story is "boot up headless chrome, good luck" which isn't great

gertlex•6h ago
Another comment mentioned along the lines of, "it's the goto used by developers in readmes", and I suspect it's more specifically javascript-adjacent developers (as is the case where I work)

The "render locally" situation was enough friction to keep me happy with my .jpgs and .pngs generated from various sources and/or screenshotting.

mdaniel•6h ago
I don't know if this helps you but the Mermaid plugin in JetBrains has an export feature which can save you a step. But I find Mermaid diagrams so limiting and the syntax more immature than PlantUML so it's very rare that I bother

The "in readmes" is a special case because the markdown rendering in both GitHub and GitLab support it without drama

twodave•5h ago
There are plugins for VS Code that enable local rendering when previewing markdown files. Fairly nice for editing dev wiki files!
JoachimSchipper•2h ago
Picking anything but PlantUML's default theme will make PlantUML look less 90's-Java. As a minimalistic solution, I already like "skinparam monochrome true" https://plantuml.com/skinparam#:~:text=Black%20and%20White. (You can go further with CSS and themes and...)
aeonik•5h ago
Except it has trouble rendering text on the CLI version when producing SVGs.
cogogo•7h ago
Little weird to see this on the lead page… mermaid has been around for a long time. And in general I’ve found its real world use pretty lacking.
prepend•7h ago
I use it and see it many times per month as it’s the preferred way of sticking graphics and diagrams in markdown in git repos and generated static sites.

It’s so handy for putting a sequence diagram in your docs and then tracking the changes over time using git.

I’m curious what other software developers use if not this. I’ve tried specific graph and drawing tools like lucid and Visio, but the simplicity of mermaid is nice. And I don’t know anything else that shows git blame for who changed what in my diagram, when.

billyp-rva•6h ago
> And I don’t know anything else that shows git blame for who changed what in my diagram, when.

You could do this with any diagrams-as-code tool, no?

matthew16550•6h ago
Mermaid is sort of a defacto standard because github auto renders it inside markdown files.
_tom_•6h ago
I think he's saying you can click and edit on the diagram, which mermaid doesn't support. This does propagate back into the source.

I think you are talking about "just change the text and regenerate", which achieves much the same goal.

I'm not sure in what cases the former is better.

heluser•4h ago
Re what other developers use. I tried mermaid and other text to diagram tools for work, but, as mentioned above, found them lacking. Most companies / teams I know of use something like excalidraw or miro. Definitely matches your simplicity requirements, but, obviously, no git blame
mpalmer•4h ago
I love it when this happens, people almost always reply with something cool they did with it, or discovered. The link isn't new, often the comments are.
jen729w•2h ago
Its real-world use is drawing diagrams on a web page! I much prefer diagram-as-code to diagram-as-screenshot. e.g. https://sbs.johnnydecimal.com/14.23+OPS1#diagram
wadewatts•7h ago
I love Mermaid diagrams. I let my coding LLMs generate diagrams during architecture design and then afterward for accuracy— Sequence Diagrams, CSD’s, Flowcharts, DFDs, and ERDs. Couldn’t be simpler. I’m happy.
bredren•4h ago
Yes, I think this is why mermaid is hard to beat right now. LLMs seem to understand the syntax well.

I’ve used AI to build mermaid diagrams during ongoing system design discussions from transcripts as they progress.

I’ve rendered them, shared them and then the group can look at them and iterate very quickly.

A bunch of the rendering tools aren’t great, but some are and decent basic styling makes a big difference.

behnamoh•7h ago
I liked Mermaid but unfortunately LLMs don't understand it well, so I switched to Latex tikz which LLMs know pretty well. At least I know Gemini 2.5 Pro does a good job at tikz. 3.7 and o1 were meh.
aryonoco•4h ago
deepseek r1 understands mermaid very well and can correct all the mistakes of Gemini and Claude
DrPhish•3h ago
I can second this. I’ve been using R1 to both straight up generate mermaid as well as making custom mermaid syntax generators for dynamic diagramming
NightMKoder•6h ago
IMO mermaid is awesome, but for two somewhat indirect reasons:

- There’s an almost wysiwig editor for mermaid at https://www.mermaidchart.com/play . It’s very convenient and appropriately changes the layout as you draw arrows!

- Notion supports inline mermaid charts in code blocks (with preview!) It’s awesome for putting some architecture diagrams in Eng docs.

jdougan•5h ago
Obsidian also supports inline mermaid charts in markdown code blocks. One of those features I don't see mentioned much.
novia•4h ago
github / gitlab too!
fastball•3h ago
Supernotes too!
patrickk•2h ago
LLMs (I use ChatGPT) can take a generic process description, spit out the result in mermaid, which can then be imported and refined in something like draw.io. Yes, you’ll have to correct a few things by hand, but it drastically speeds things up. Last time I check draw.io is supported in obsidian.
SkyPuncher•1h ago
Github supports inline mermaid charts, too!

I've been starting to include them in my bigger PRs and reviewers really like them.

LifeIsBio•6h ago
One of my favorite applications of multimodal LLMs thus far is the ability to:

1. Draw a DAG of whatever pipeline I’m working on with pen and paper.

2. Take a photo of the graph, mistakes and all.

3. Ask ChatGPT to translate the image into mermaid.js

Given how complicated the pipelines are that I’m working with and the sloppiness of the hand drawn image, it’s truly amazing how well this workflow works.

codazoda•6h ago
Care to share your prompt(s)?

I draw a fair bit on a Kindle Scribe. I’d love to try this, but I bet your prompt would be helpful.

LifeIsBio•3h ago
There's really not much to share. I rewrite the prompt each time, but here's was a recent one:

> I have an image of a hand drawn workflow diagram. I’d like to turn it into a mermaid.js file.

(with the image attached)

lubujackson•3h ago
Alternatively, ask the LLM to create a mermaid DAG of your current code.
LifeIsBio•3h ago
That's an interesting idea. A lot of times what I'm drawing is a blend of what the code is versus what I want it to be post-refactor.
jillesvangurp•3h ago
I recently did a variation of this where instead of drawing, I just drafted a quick few bullet points and text describing at a high level what the system should do. And then I asked chat GPT to identify use cases and generate sequence diagrams for each use case in puml format (plantuml). Shockingly effective and it took about five minutes. This was a technical proposal that I shared with a few partner companies to provide a detailed plan to a customer. It came after several online meetings spaced over a few weeks of us negotiating the details. Pretty important document and it was well received. Plantuml looks decent enough that you can get away with sticking the resulting diagrams in a document.

I'm a busy person. I don't have hours of time that I can take out of my schedule to generate what I regard as write only documentation (nobody will ever read or truly value it) that ticks the box of "we have stuff to point at when somebody asks (which nobody ever will)", which has a lowish value. Sometimes it's nice to have. The above is a fine example. People will glance at it, give me a little thumbs up, and then give me permission to proceed as planned and bill accordingly. Job done. It's not a reference design that anyone will ever look at for more than a few seconds.

After a few decades in the industry, I'm extremely skeptical of the value of diagrams vs. the time required to produce them. I just don't see it. A lot of good software gets produced without them. You don't need blueprints for your blueprints, which is what source code is (a blueprint for automatically compiling into working software). People value such traits as structure, readability, conciseness in source code for a reason: it allows them to treat source code as design assets. I don't write UML, I stub out data classes and interfaces instead. And then I refactor them over and over again. Diagrams just slow me down.

But a few minutes is about on the threshold of me wasting braincycles on producing them and enrich documentation that I'm writing anyway in text form. Quickly jot down some notes. Don't waste any time whatsoever obsessing about the awkward syntax of these micro languages, and just get the essentials nailed. I bet I can get it down to like a minute or so with better LLMs and larger context windows. "Examine this project, produce an overview diagram of all the database tables". That's a prompt I'd write. In the same way, letting LLMs document code is a great use of time.

nine_k•1h ago
> write only documentation (nobody will ever read or truly value it)

But what's the point of producing such documentation? I could imagine that the process of creating it could be somehow beneficial (committing to memory, finding discrepancies, etc). If it's not, why can't it just be skipped?

baq•1h ago
Documentation is a tool for creating shared understanding. If you don’t need to share your understanding, don’t write docs.

Note however that sharing understanding works on the people axis and on the time axis. Docs allow you to share your current understanding with your future self. They’d better be general enough to be true then, though.

Nowadays I find Gemini pro to be able to accurately document a complex workflow within minutes just by looking at the sources and sometimes even just logs, so value of low level docs is questionable. High level requirements - essentially how it’s supposed to work and what for - is very valuable, as it allows you and the model to cross check whether things work as they were intended.

donatj•5h ago
I don't love Mermaid and generally find it less well designed than something like Graphviz/dot. I generally find a lot of the syntax needlessly strict for something non-programmer humans are meant to interact with, but the big seller for me with Mermaid is that it works inline on GitHub.

I end up creating a lot of sequence diagrams and having them as editable mermaid is very convenient. I do wish GitHub giant mermaid navigation controls floating over the bottom right corner obscuring things.

taklimakan•3h ago
I was under the impression mermaid is a wrapper around graphviz dot.
nine_k•1h ago
No, it's an independent, JS-only implementation, and it's way, way less featureful.
xamde•8m ago
I believe it uses an cross compiled version of dot in js
ding444•5h ago
This is built into Obsidian, and I love it for making quick diagrams in my notes.

Mapping out database tables while I’m conceptualizing an idea is what I use it more most often. I also use sequence diagrams to map process flow or try e flow of information.

ngm7•4h ago
I'm slightly surprised excalidraw (https://excalidraw.com/) is not in the comments. I use it regularly to convey ideas to my devs and designers. Plus, it exports to json! Someone wrote a library to convert mermaid to excalidraw as well.

We're now experimenting with creating design questions to ask in interviews with excalidraw/mermaid

davely•4h ago
I did a system design interview awhile back using Excalidraw. I really enjoyed it (though I also frequently use it for normal work stuff, so was familiar with it).
nine_k•1h ago
I love excalidraw. But does it have an editable, diffable textual representation? Can it be generated with little ceremony, and laid out automatically?
iammrpayments•3h ago
I remember I use this last year when trying to draw my auth flow. I tried using excalidraw but it gets laggy if your chart is too big, besides I find it easier to type the chart than using the mouse.
zoba•3h ago
Claude Artifacts will generate mermaid diagrams for you.
paul_h•2h ago
I just used Mermaid for multiple sequence diagrams from build-steps sequences in a video talk I did on comparing build systems - https://www.youtube.com/watch?v=L67ri_xe2oQ (slides - https://paulhammant.com/google-style-dag-build-systems/). The new boost for me was GPT4o. It was able to quickly make what I wanted from the build logs alone, though it took some hand tweaking too. A new (or very old) problem after that was not taking sufficient save points (URL bookmarks) and sometimes making the same edit twice cos I'd lost a URL. That there was a second save of the PNG form for each (https://kroki.io/mermaid/svg/...) added to the keep-track-of-changes problem for me, especially when I'm very tired me :(
azthecx•32m ago
Interesting slides, it's always nice to see different ways to set up these kinds of systems and with a practical git repo to boot!
smurpy•2h ago
Check out Kroki for a multi-syntax wrapper around a bunch of text driven diagram generators —- including Mermaid, PlantUML, Ditaa, GraphViz, SVGBob, etc, etc

https://kroki.io/

jldugger•48m ago
All I really want is something that can diagram out 30+ microservices and interconnections without getting ugly.

graphviz does okay, but I kinda want some extra levels of grouping to keep services in the same k8s namespace close together.

noisem4ker•25m ago
Are clusters not enough?

They can be nested.

https://graphviz.org/Gallery/directed/cluster.html

https://github.com/ReneNyffenegger/about-Graphviz/blob/maste...

Why Algebraic Effects?

https://antelang.org/blog/why_effects/
115•jiggawatts•4h ago•52 comments

How to Make a Living as a Writer

https://thewalrus.ca/how-to-make-a-living-as-a-writer/
62•pepys•3h ago•33 comments

Postgres IDE in VS Code

https://techcommunity.microsoft.com/blog/adforpostgresql/announcing-a-new-ide-for-postgresql-in-vs-code-from-microsoft/4414648
798•Dowwie•16h ago•320 comments

Ask HN: Go deep into AI/LLMs or just use them as tools?

29•pella_may•51m ago•21 comments

Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text

https://github.com/mermaid-js/mermaid
149•olalonde•2d ago•63 comments

Find Your People

https://foundersatwork.posthaven.com/find-your-people
503•jl•15h ago•194 comments

Root for your friends

https://josephthacker.com/personal/2025/05/13/root-for-your-friends.html
174•rez0123•8h ago•50 comments

Show HN: HNRelevant – Add a "related" section to Hacker News

https://github.com/imdj/HNRelevant
54•imadj•6h ago•7 comments

Show HN: Genetic Boids Web Simulation

https://attentionmech.github.io/genetic-boids/
124•vimgrinder•12h ago•28 comments

The world of Japan's PC-98 computer

https://strangecomforts.com/the-strange-world-of-japans-pc-98-computer/
92•ecliptik•11h ago•31 comments

A Comedian Saves a Model Railroad with Purchase of a New Jersey Home

https://www.wsj.com/lifestyle/model-railroad-james-murray-ac709a96
11•fortran77•3d ago•2 comments

Modification of acetaminophen to reduce liver toxicity and enhance drug efficacy

https://www.societyforscience.org/regeneron-sts/2025-student-finalists/chloe-lee/
163•felineflock•7h ago•91 comments

Jupiter was formerly twice its current size, had a much stronger magnetic field

https://phys.org/news/2025-05-jupiter-current-size-stronger-magnetic.html
5•pseudolus•2d ago•0 comments

Show HN: I built a more productive way to manage AI chats

https://contextch.at
100•tapeo•11h ago•39 comments

Show HN: DoubleMemory – more efficient local-first read-it-later app

https://doublememory.com
122•randomor•13h ago•35 comments

Positional preferences, order effects, prompt sensitivity undermine AI judgments

https://www.cip.org/blog/llm-judges-are-unreliable
124•joalstein•14h ago•62 comments

A Pregnancy Souvenir: Cells That Are Not Your Own (2015)

https://www.nytimes.com/2015/09/15/science/a-pregnancy-souvenir-cells-that-are-not-your-own.html
10•Tomte•41m ago•2 comments

Diary: J. M. Coetzee, (1) Mother Tongue

https://books.substack.com/p/diary-j-m-coetzee-1-mother-tongue
14•Caiero•4d ago•2 comments

A boy who came back: the near-death, and changed life, of my son Max

https://www.theguardian.com/lifeandstyle/2025/may/24/the-boy-who-came-back-the-near-death-and-changed-life-of-my-son-max
5•ljf•44m ago•0 comments

Show HN: Web Apps for Python Devs with Auto-Generated UI

https://davia.ai/
22•ruben-davia•6h ago•4 comments

Caesar's Last Breath

https://charliesabino.com/caesars-last-breath/
141•charliesabino•17h ago•64 comments

Why I no longer have an old-school cert on my HTTPS site

https://rachelbythebay.com/w/2025/05/22/ssl/
292•mcbain•21h ago•281 comments

Show HN: SweepIQ – A simple AI tool to help you learn more, faster

https://www.sweepiq.com
13•felixthecat23•5h ago•7 comments

Valve takes another step toward making SteamOS a true Windows competitor

https://arstechnica.com/gaming/2025/05/valve-adds-steamos-compatible-game-label-as-it-prepares-to-expand-beyond-steam-deck/
82•austinallegro•2h ago•54 comments

How to live on $432 a month in America

https://shagbark.substack.com/p/how-to-live-on-432-a-month-in-america
278•cactusplant7374•15h ago•428 comments

A Formal Proof of Complexity Bounds on Diophantine Equations

https://arxiv.org/abs/2505.16963
70•badmonster•11h ago•8 comments

A Bead Too Far: Rethinking Global Connections Before Columbus

https://peterfrankopan.substack.com/p/a-bead-too-far-rethinking-global
41•themgt•17h ago•5 comments

Visual Studio Code: Text Buffer Reimplementation (2018)

https://code.visualstudio.com/blogs/2018/03/23/text-buffer-reimplementation
42•stefankuehnel•3d ago•1 comments

Show HN: High-resolution surface analysis with Lidar data

https://github.com/r-follador/delta-relief
21•folli•2d ago•0 comments

UndoDB – The interactive time travel debugger for Linux C/C++ for debugging

https://undo.io/
57•droideqa•11h ago•27 comments