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](https://private-user-images.githubusercontent.com/29687692/258389020-165cef2c-1aeb-482c-9bf7-2dbfd9817b36.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1OTQxNzcsIm5iZiI6MTcyNTU5Mzg3NywicGF0aCI6Ii8yOTY4NzY5Mi8yNTgzODkwMjAtMTY1Y2VmMmMtMWFlYi00ODJjLTliZjctMmRiZmQ5ODE3YjM2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA2VDAzMzc1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc5MTVjMTczMjQ3YWU1YWYwN2Q4ODBhZjU4ZDc4MjAyM2I4MjgyNDcwMzZjMjQ1MzI2Yzc2Y2E1ZTA4ZGVlNGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.vxBwRet9w6RwXH1vw09rvV-e7SovT-GvNyjH1pLrwM0)
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.
Install Docker and ensure that it's running. It's also recommended that you use at least GPT-4, or GPT-3.5-turbo.
-
Install docker and docker-compose
-
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.
- Run the command in the following order
docker-compose -f docker-compose.dev.yml build
docker-compose -f docker-compose.dev.yml up
- if you want to stop the docker container setup
docker-compose -f docker-compose.dev.yml down
- 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
- How did we achieve integration with 15+ Diagram generation different frameworks here comes the Kroki
- 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
- You will be able to download your diagram or SVG
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.
if you are looking to contribute or have found some issues raise a pull request or create an issue
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.