#diagram #webservice

bin+lib diagramer

A sequence diagram generator service

1 unstable release

0.1.0 Feb 18, 2023

#114 in Visualization

MIT license


Rust 896 SLoC JavaScript 134 SLoC Tera 131 SLoC // 0.0% comments


A sequence diagram generator webservice in Rust🦀 based on rocket🚀.


  • Fast simple JSON-API
  • SVG export
  • Mermaid diagram code export
  • Small frontend with live update
  • Client implementation


Start diagramer directly

cargo run

or build a release version via

cargo build --release

API usage

With client

The client library is implemented in the module diagramer::client.

use diagramer::client::Client;

let client = Client::new();
let session = client.new_session("http://localhost:8000").await;
println!("New session url {}", session.session_url()); 
session.add_link("a", "b", Some("Request")).await;
session.add_link("b", "c", Some("Forward")).await;
session.add_link("c", "a", Some("Response")).await;

The network based stress test also uses the client implementation.

Direct HTTP access

Create a new session

curl -XPOST ''

With a session ID and a URI to the session

  "id": "2888964795923373081",
  "uri": "/api/session/2888964795923373081"

Add a link from a to b with label with a label

curl -XPOST -H 'Content-Type: application/json' '' -d '{"from":"a", "to":"b", "label":"with a label"}'

Get a JSON representation of the session

curl ''
  "id": 2888964795923373000,
  "links": [
      "timestamp": 1676679312120,
      "from": "a",
      "to": "b",
      "label": "with a label",
      "id": 2
  "last_link": 2,
  "mermaid_url": "/api/session/2888964795923373081/mermaid",
  "svg_url": "/api/session/2888964795923373081/svg"


~1.5M SLoC