Skip to content

stereobooster/diagrams-as-code

Repository files navigation

diagrams-as-code

Port of https://github.com/dmytrostriletskyi/diagrams-as-code

Installation

pnpm add diagrams-as-code 

Usage

import { readFileSync } from "node:fs"; import { render } from "diagrams-as-code"; const filePath = "./examples/message-collecting-gcp.yaml"; console.log(render(readFileSync(filePath, "utf8")));

TODO

  • implement c4
  • implement ilograph
  • try elk instead of Graphviz
  • online demo, like this one
  • embed SVG files instead of using urls (otherwise images can be blocked by Content Security Policy)
  • don't use raw.githubusercontent.com