A simple diagram generator API, built using Plantuml and Quarkus.
There is an accompanying front-end for this application which can be found at diagonal-fe.
- JDK
- Maven
- Graphviz
To run using Maven:
mvn compile quarkus:dev
To build and run in a container:
mvn package
docker build -f src/main/docker/Dockerfile.jvm -t monodot/diagonal .
docker run -i --name diagonal --rm -p 8080:8080 monodot/diagonal
And to test locally - this will save the image to a file, target/output.png
:
curl -v -H "Content-Type: source/plain" \
-H "skin: modern" \
--data-binary @samples/sequence.puml \
--output target/output.png \
http://localhost:8080/diagram/standard
curl -v -H "Content-Type: application/json" \
--data-binary @src/test/data/samplerequest.json \
http://localhost:8080/diagrams/standard
To build and run as a native image in a container (NB: this is not working right now unfortunately! dang!):
export GRAALVM_HOME=/opt/java/graalvm
mvn package -Pnative
docker build -f src/main/docker/Dockerfile.native -t monodot/diagonal .
docker run -i --name diagonal --rm -p 8080:8080 monodot/diagonal