{"id":15628373,"url":"https://github.com/tomwright/mermaid-server","last_synced_at":"2025-05-16T04:04:00.870Z","repository":{"id":36964728,"uuid":"253629264","full_name":"TomWright/mermaid-server","owner":"TomWright","description":"Go implementation of a HTTP server to allow remote generation of mermaid-js diagrams without any pre-requisites installed locally.","archived":false,"fork":false,"pushed_at":"2024-12-20T22:08:02.000Z","size":293,"stargazers_count":375,"open_issues_count":13,"forks_count":54,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-16T04:03:59.892Z","etag":null,"topics":["diagram","diagram-generator","http","mermaid","mermaid-charting-language","mermaid-cli","mermaid-diagrams","mermaidjs"],"latest_commit_sha":null,"homepage":"","language":"Go","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/TomWright.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"TomWright","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://www.buymeacoffee.com/TomWright"]}},"created_at":"2020-04-06T22:23:12.000Z","updated_at":"2025-05-13T14:44:14.000Z","dependencies_parsed_at":"2024-01-14T06:22:24.972Z","dependency_job_id":"d28d1963-35c6-4ccf-99bd-fb9314bb6952","html_url":"https://github.com/TomWright/mermaid-server","commit_stats":{"total_commits":69,"total_committers":6,"mean_commits":11.5,"dds":0.4057971014492754,"last_synced_commit":"f38a1cd478c49995b4736623621be984b7ee671b"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomWright%2Fmermaid-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomWright%2Fmermaid-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomWright%2Fmermaid-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomWright%2Fmermaid-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomWright","download_url":"https://codeload.github.com/TomWright/mermaid-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254464891,"owners_count":22075570,"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":["diagram","diagram-generator","http","mermaid","mermaid-charting-language","mermaid-cli","mermaid-diagrams","mermaidjs"],"created_at":"2024-10-03T10:22:17.202Z","updated_at":"2025-05-16T04:04:00.846Z","avatar_url":"https://github.com/TomWright.png","language":"Go","readme":"# mermaid-server\n\nUse mermaid-js to generate diagrams in a HTTP endpoint.\n\nWhile this currently serves the diagrams via HTTP, it could easily be manipulated to server diagrams via other means.\n\n## Basic usage\n\n### Docker\n\nRun the container:\n```\ndocker run -d --name mermaid-server -p 80:80 tomwright/mermaid-server:latest\n```\n\n### Manually as a go command\n\nStart the HTTP server:\n```\ngo run cmd/app/main.go --mermaid=./mermaidcli/node_modules/.bin/mmdc --in=./in --out=./out\n```\n\n### Diagram creation\n\nUse the query param 'type' to change between 'png' and 'svg' defaults to 'svg'.\n\n#### POST\n\nSend a CURL request to generate a diagram via `POST`:\n```\ncurl --location --request POST 'http://localhost:80/generate' \\\n--header 'Content-Type: text/plain' \\\n--data-raw 'graph LR\n\n    A--\u003eB\n    B--\u003eC\n    C--\u003eD\n    C--\u003eF\n'\n```\n\n#### GET\n\nSend a CURL request to generate a diagram via `GET`... send in url encoded data under the `data` query param:\n```\ncurl --location --request GET 'http://localhost:80/generate?data=graph%20LR%0A%0A%20%20%20%20A--%3EB%0A%20%20%20%20B--%3EC%0A%20%20%20%20C--%3ED%0A%20%20%20%20C--%3EF%0A'\n```\n\n![Example request in Postman](example.png \"Example request in Postman\")\n\n### Caching\n\nAll generated diagram input and output will be cached for 1 hour. The cache time is reset whenever a cached diagram is accessed.\n \n","funding_links":["https://github.com/sponsors/TomWright","https://www.buymeacoffee.com/TomWright"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomwright%2Fmermaid-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomwright%2Fmermaid-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomwright%2Fmermaid-server/lists"}