/mermaid-api

An API service for linking and rendering mermaid.js diagrams for markdown

Primary LanguageJavaScript

mermaid-api

An online service that produces a rendered SVG image of a Mermaid mmd raw source file.
This is deployed on GCP as a serverless function and exposed via a custom domain and External HTTPS load-abalancer.

The API takes a single URL query parameter url - which can point to any publically hosted valid mmd source file.
The API call syntax is as follows:

https://labops.sh/mmd?url=<url>

This makes it simple and useful to embed live diagrams-as-code into your Markdown README files or presentation slides via URL import.

For testing syntax and developing a diagram, there is a helpful live Mermaid editor here:
https://mermaid.live

Additional documentation on available diagrams and syntax:
https://mermaid-js.github.io/

Examples

All examples below are rendered live from source and embedded directly into this markdown


Flow Diagram

https://labops.sh/mmd?url=https://apnex.io/mermaid-api/examples/flow.mmd


Sequence Diagram

https://labops.sh/mmd?url=https://apnex.io/mermaid-api/examples/sequence.mmd


Class Diagram

https://labops.sh/mmd?url=https://apnex.io/mermaid-api/examples/class.mmd


State Diagram

https://labops.sh/mmd?url=https://apnex.io/mermaid-api/examples/state.mmd


Gantt Chart

https://labops.sh/mmd?url=https://apnex.io/mermaid-api/examples/gantt.mmd


Pie Chart

https://labops.sh/mmd?url=https://apnex.io/mermaid-api/examples/pie.mmd


Entity Relationship Graph

https://labops.sh/mmd?url=https://apnex.io/mermaid-api/examples/er.mmd