DEVELOPER EXPERIENCE

JSONFlowJSON diagrams rendered as React SVG

Diagrams as data, not a DSL.

JSONFlow turns typed JSON nodes, edges and a direction into SVG from React. The same model and direction keep a deterministic layout. The core package and the React package are MIT licensed.

diagram.json
{
  "direction": "LR",
  "nodes": ["api", "queue", "db"]
}
API→Queue→DB
JSONFIRSTSVGRENDERERREACTPACKAGEMIT
01

JSON-first model

Describe a diagram with typed JSON nodes, edges and a direction instead of a diagram language.

02

React SVG renderer

Render SVG from the React package.

03

Deterministic layout

Keep layout deterministic for top-bottom, left-right, right-left and bottom-top.

04

Light & dark themes

Use the built-in light and dark themes, or supply a custom theme.

05

Live playground

Try a document in the live playground.

06

MIT licensed

Use the core package and the React package under the MIT license.

WHERE TEAMS USE IT

A diagram the application can store as data

Keep the model in JSON

Nodes, edges and direction are typed JSON. There is no diagram language to parse, and the document can live with the rest of the application data.

Expect the same layout next time

Direction is top-bottom, left-right, right-left or bottom-top. For a given model and direction, the layout is deterministic.

Render it where the UI already is

The React package draws SVG. Light, dark and custom themes are included. The playground is the place to try a document before embedding it. Both packages are MIT licensed.

Questions about JSONFlow

Do I need a diagram DSL?

No. The model is JSON: nodes, edges and a direction.

Will the layout change between renders?

Not for the same model and the same direction. Layout is deterministic for top-bottom, left-right, right-left and bottom-top.

What does the license allow?

The core package and the React package are MIT licensed. The public price is zero.

How can I try a diagram?

Open the live playground on this site, or render the SVG with the React package. Light, dark and custom themes are part of the project.

DEVELOPER EXPERIENCE

Ship the next diagram as JSON and SVG.