{"id":13510119,"url":"https://github.com/yuzutech/kroki","last_synced_at":"2025-05-13T23:07:22.063Z","repository":{"id":37663402,"uuid":"165063056","full_name":"yuzutech/kroki","owner":"yuzutech","description":"Creates diagrams from textual descriptions!","archived":false,"fork":false,"pushed_at":"2025-05-08T21:06:47.000Z","size":67438,"stargazers_count":3229,"open_issues_count":122,"forks_count":243,"subscribers_count":26,"default_branch":"main","last_synced_at":"2025-05-08T22:20:36.860Z","etag":null,"topics":["api","blockdiag","bpmn","bytefield","c4","diagrams","ditaa","erd","excalidraw","graphviz","hacktoberfest","images","mermaid","pikchr","plantuml","svgbob","text","uml","umlet","wavedrom"],"latest_commit_sha":null,"homepage":"https://kroki.io","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuzutech.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"mogztter"}},"created_at":"2019-01-10T13:17:19.000Z","updated_at":"2025-05-08T21:06:51.000Z","dependencies_parsed_at":"2023-02-14T05:01:18.510Z","dependency_job_id":"a3013be3-4c8b-4f58-93a9-14e6b95c069d","html_url":"https://github.com/yuzutech/kroki","commit_stats":null,"previous_names":[],"tags_count":52,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuzutech%2Fkroki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuzutech%2Fkroki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuzutech%2Fkroki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuzutech%2Fkroki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuzutech","download_url":"https://codeload.github.com/yuzutech/kroki/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254041205,"owners_count":22004679,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","blockdiag","bpmn","bytefield","c4","diagrams","ditaa","erd","excalidraw","graphviz","hacktoberfest","images","mermaid","pikchr","plantuml","svgbob","text","uml","umlet","wavedrom"],"created_at":"2024-08-01T02:01:24.797Z","updated_at":"2025-05-13T23:07:17.051Z","avatar_url":"https://github.com/yuzutech.png","language":"JavaScript","funding_links":["https://github.com/sponsors/mogztter"],"categories":["JavaScript","Java","HarmonyOS","hacktoberfest","api"],"sub_categories":["Windows Manager"],"readme":"= image:https://kroki.io/assets/logo.svg[Kroki,200,link={uri-kroki}]\n:uri-kroki: https://kroki.io/\n:uri-kroki-docs: https://docs.kroki.io/\n:uri-maven: https://maven.apache.org/\n\nifdef::env-github[]\nimage:https://github.com/yuzutech/kroki/workflows/CI/badge.svg?branch=master[GitHub Actions build status, link=https://github.com/yuzutech/kroki/actions]\nimage:https://img.shields.io/badge/zulip-join_chat-brightgreen.svg[Zulip chat, link=https://kroki.zulipchat.com/]\nendif::[]\n\n{uri-kroki}[Kroki] provides a unified API with support for BlockDiag (BlockDiag, SeqDiag, ActDiag, NwDiag, PacketDiag, RackDiag), BPMN, Bytefield, C4 (with PlantUML), D2, DBML, Diagrams.net (experimental), Ditaa, Erd, Excalidraw, GraphViz, Mermaid, Nomnoml, Pikchr, PlantUML, SvgBob, Symbolator, UMLet, Vega, Vega-Lite, WaveDrom and WireViz... and more to come!\n\n== Quickstart\n\nThis section offers a basic tutorial for evaluating Kroki.\nMore comprehensive installation instructions are in the {uri-kroki-docs}[Kroki documentation].\n\n== Usage\n\nKroki uses a simple algorithm (deflate + base64) to encode your diagram in the URL:\n\n`GET /plantuml/svg/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000`\n\nYou can also call Kroki with `POST`:\n\n POST /\n\n[source,json]\n----\n{\n  \"diagram_source\": \"Bob -\u003e Alice : hello\",\n  \"diagram_type\": \"plantuml\",\n  \"output_format\": \"svg\"\n}\n----\n\nIn this case, you don't need to encode your diagram.\n\nIt's also possible to send your diagram as plain text using the `Content-Type` header.\nThe output format will be specified using the `Accept` header and the diagram source will be sent as the request body:\n\n POST /plantuml\n\n[source]\n----\nAccept: image/svg+xml\nContent-Type: text/plain\n\nBob -\u003e Alice : hello\n----\n\nYou can also define the output format in the URL if you don't want to add an `Accept` header:\n\n POST /plantuml/svg\n\n[source]\n----\nContent-Type: text/plain\n\nBob -\u003e Alice : hello\n----\n\nThe same concept applies when sending the diagram as JSON:\n\n POST /plantuml/svg\n[source,json]\n----\n{\n  \"diagram_source\": \"Bob -\u003e Alice : hello\"\n}\n----\n\n== Project layout\n\nKroki has a modular architecture:\n\nserver::\nA Java web server (powered by _Vert.x_) that acts as a gateway.\nKroki server is built using {uri-maven}[Maven].\n\numlet::\nA tiny Java API on top of _UMlet_ (mini) to generate diagrams.\n\nnomnoml::\nA Node.js CLI on top of the _Nomnoml_ diagram library.\n\nvega::\nA Node.js CLI on top of the _vega_ diagram library. Also supports Vega-Lite concise grammar.\n\nmermaid::\nA companion web server written in JavaScript (powered by _micro_) that provides _Mermaid_ diagram library.\n\nbpmn::\nA companion web server written in JavaScript (powered by _micro_) that provides _bpmn-js_ diagram library.\n\nbytefield::\nA Node.js CLI on top of the _bytefield-svg_ diagram library.\n\nwavedrom::\nA Node.js CLI on top of the _wavedrom_ diagram library.\n\nexcalidraw::\nA companion web server written in JavaScript (powered by _micro_) that provides _Excalidraw_.\n\ndiagrams.net::\nA companion web server written in JavaScript (powered by _micro_) that provides _diagrams.net_.\n\n== Build\n\nInstall `task` command-line: https://taskfile.dev/installation/\n\n=== Gateway Server\n\nThe first step is to build the project using Maven:\n\n $ task mavenBuild\n\n=== Docker Images\n\nTo build all the Docker images, use the following command:\n\n $ sudo task dockerBuildImages\n\nNOTE: `sudo` might not be needed depending on your distribution and `docker` configuration.\n\n== Run\n\nOnce the Docker images are built, you can run Kroki using `docker`:\n\n $ docker run -d -p 8000:8000 yuzutech/kroki\n\n=== Companion Containers\n\nIf you want to use one of the following diagram libraries then you will also need to start the corresponding companion container:\n\nyuzutech/kroki-mermaid::\nMermaid\n\nyuzutech/kroki-bpmn::\nBPMN\n\nyuzutech/kroki-excalidraw::\nExcalidraw\n\nyuzutech/kroki-diagramsnet (experimental)::\ndiagrams.net\n\nYou can use `docker-compose` to run multiple containers:\n\n.docker-compose.yml\n[source,yml]\n----\nservices:\n  core:\n    image: yuzutech/kroki\n    environment:\n      - KROKI_MERMAID_HOST=mermaid\n      - KROKI_BPMN_HOST=bpmn\n      - KROKI_EXCALIDRAW_HOST=excalidraw\n    ports:\n      - \"8000:8000\"\n  mermaid:\n    image: yuzutech/kroki-mermaid\n    expose:\n      - \"8002\"\n  bpmn:\n    image: yuzutech/kroki-bpmn\n    expose:\n      - \"8003\"\n  excalidraw:\n    image: yuzutech/kroki-excalidraw\n    expose:\n      - \"8004\"\n  # experimental!\n  diagramsnet:\n    image: yuzutech/kroki-diagramsnet\n    expose:\n      - \"8005\"\n----\n\n $ docker-compose up -d\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuzutech%2Fkroki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuzutech%2Fkroki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuzutech%2Fkroki/lists"}