-
-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: add support for Structurizr #510
Comments
Yes that would be great but as far as I know the rendering engine is not Open Source. Could you please confirm @simonbrowndotje? As an alternative, you can still use C4 diagrams using C4 PlantUML, for instance: |
Great idea about C4-PlantUML @Mogztter -- Structurizr is interesting because it has multiple output formats and has a special architecture-oriented DSL but perhaps it's not OSS. |
Correct, the structurizr.com renderer is not open source, but the Structurizr DSL and Structurizr CLI are open source. The DSL allows you to create a software architecture model, while the CLI provides an export to a number of open source tools, including PlantUML, Mermaid, and WebSequenceDiagrams. These exporters are open source too (and provided by the Structurizr Java extensions project). |
Thanks for your reply Simon! I think we will start with one output format. @simonbrowndotje In your opinion, which provider between Mermaid, PlantUML and GraphViz produces the best output? It's probably a trick question since you are trying to provide the best possible output for each one of them but still... 🤔 I've never had the opportunity to tell you but Structurizr is amazing, keep up the good work 👌 |
Thank you! 🙂 Yes, that's correct, and the StructurizrPlantUMLWriter is probably the best output of PlantUML and Mermaid (the Graphviz libary is only used for automatic layout, it doesn't produce full diagrams). Edited: there's a test/demo page at https://structurizr.com/dsl with different output formats |
Awesome, I will do that 👍 Also if you think of other integrations between Kroki and Structurizr, feel free to ping me. |
@Mogztter I was curious if you were able to connect the two excellent Kroki and Structurizr projects. Thanks for checking! |
No haven't time yet, I was looking at integrating other diagram librairies (such as https://github.com/mingrammer/diagrams). Will try to take some time to work on it next week. |
Just FYI ... when using the |
@simonbrowndotje That will be extremely useful, thanks for the head-ups. Is it possible to disable To avoid abuse on the public instance, I disable all I/O operations. Then, users can allow/whitelist operations on their local installation. |
Not at the moment, but I could certainly add that ... theme support should also be disabled for the same reason. Just out of interest, how would the integration work? A DSL file can define a number of views ... which view would Kroki render? Edit: I'm guessing just a request parameter specifying the view key? |
Yes @simonbrowndotje that would be great -- using a request parameter to specify the view (something like ?view=X) would be handy. Thanks for considering this @Mogztter - between Kroki and Structurizr we'll have a great opportunity to give architects tools that would actually improve communications by integrating diagrams everywhere a URL can embedded. @simonbrowndotje I love your videos and lectures on the topic of communicating design and directing developer intent through architecture diagrams. Keep it up! |
👍🏻
For now, the API does not support any kind of request parameters so I guess we will use the default/first view. |
@Mogztter when you have a minute, if you update Kroki to pass the URL as a CGI parameter (environment variable) it means that any tool that wants to use it could do so. For example, when you call any tool, set the following environment variables:
With the above two environment variables set, each tool could add "support" for Kroki just by checking the environment to see if they are being called in "Kroki Context". That way, if @simonbrowndotje wanted to add a feature specific to Kroki he could use the environment variable to do so. |
@shah Please open a new issue if you want to discuss about another changes otherwise the conversation gets sidetracked and it becomes hard to follow.
@simonbrowndotje I just noticed that |
There isn't I'm afraid. |
Thanks for your quick response!
Not great but at least it's predictable. What do you think? |
@shah we still need to decide what do you when we receive a Structurizr diagram with multiple views. |
Thanks for confirming @Mogztter - my opinion, until #827 is implemented, is to take the first view (which might be "random" according to Simon). For anyone that cannot wait for #827 and does not want a random view from a set of views, they can just create a file with a single view. Then, when #827 is done Kroki can support multiple, configurable, views through URL parameters or POST. |
@simonbrowndotje I've added the following dependencies: <dependency>
<groupId>com.structurizr</groupId>
<artifactId>structurizr-dsl</artifactId>
<version>1.14.0</version>
</dependency>
<dependency>
<groupId>com.structurizr</groupId>
<artifactId>structurizr-plantuml</artifactId>
<version>1.6.3</version>
<exclusions>
<exclusion>
<groupId>com.structurizr</groupId>
<artifactId>structurizr-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.structurizr</groupId>
<artifactId>structurizr-core</artifactId>
<version>1.9.7</version>
</dependency> But it adds ~80Mb of dependencies 😓 Looking at the dependency tree, it seems that
I'm only using the following imports:
Is it possible to disable the "script" feature in order to remove the Thanks! |
If I remove It seems that The code will also throw an exception with a descriptive message if the script engine is not found. |
v1.15.0 of the DSL library removes those dependencies. 👍 Just FYI though, structurizr-plantuml is deprecated in favour of structurizr-export (this unified version is much more full-featured, and all export formats now work in the same way). |
Wow, thanks Simon! |
Structurizr.com would be a great addition to Kroki.
The text was updated successfully, but these errors were encountered: