Skip to content

A simple tool to generate diagrams from descriptions

License

Notifications You must be signed in to change notification settings

agaraman0/Diagram-Magix

Repository files navigation

◐   Diagram Magix   ◑

Easily Generate any kind of Diagram with just a simple description.

GitHub Last Commit GitHub Issues GitHub Pull Requests Github License GitHub Repo stars


If you've ever faced the need of creating diagrams for a specific use case, this project is for you.

Diagram.Generator.-.5.August.2023.1.mp4
Screenshot 2023-08-04 at 7 01 28 AM

with the collective brilliance of the OSS community and the current state of LLMs, it's now possible to generate a diagram just from a description.

⚡️ Usage

Install Docker and ensure that it's running. It's also recommended that you use at least GPT-4, or GPT-3.5-turbo.

📦 Setup

  1. Install docker and docker-compose

  2. Once docker is installed, navigate to the project directory and update your OPENAI_API_KEY inside docker-compose.dev.yml

This will export your OPENAI_API_KEY inside the docker environment and install all the necessary dependencies in that environment.

  1. Run the command in the following order
docker-compose -f docker-compose.dev.yml build
docker-compose -f docker-compose.dev.yml up
  1. if you want to stop the docker container setup
docker-compose -f docker-compose.dev.yml down

🤖 What Differentiates it

  1. Backend has capability to generate diagrams with more then 15+ frameworks as listed below Plantuml, Mermaid, Blockading, Bytefield, Seqdiag, Actdiag, Nwdiag, Packetdiag, Rackdiag, C4-Plantuml, D2, DBML, Ditaa, Excalidraw, Graphviz, Nomnoml, Pikchr, Structurizr, Svgbob, Vega, Vegalite, Wavedrom, Wireviz
  2. How did we achieve integration with 15+ Diagram generation different frameworks here comes the Kroki
  3. As this is dependent on two third party services for that we have fall back mechanism in case even if generation fails it tries to makes sure you are getting at least a beautiful svg
  4. You will be able to download your diagram or SVG

📝 Prompt Design

📈 Performance

Diagram Magix is currently hosted and accessible at www.devf.in . As we are using GPT APIs for recipe generation so currently latency is high somewhere Avg of 50 seconds to 60 seconds. we are currently adding and building it to make it more robust.

✅ Benchmarks

🧗 Roadmap

📣 Call to Action

if you are looking to contribute or have found some issues raise a pull request or create an issue

Thanks

We were thinking of manually integrating multiple frameworks as backend for generating diagrams but all Thanks to FOSS and Kroki for getting all frameworks under single roof.