Mermaid: software architecture diagram

Created on 6 Dec 2014  路  13Comments  路  Source: mermaid-js/mermaid

hi @knsv ,

is there a way to create a architecture diagram? something like:


| front-end libraries |
| --- |
| midleware |


| nodejs | other services |


thanks.

Approved Enhancement

All 13 comments

sorry about formatting... :)

something like this:

Java_Client_Server_Architecture_Diagram.jpg

Sorry but there are no such functionality today. This would be something like subgraphs in DOT/grapwiz. I am not ruling it out in the future but there are no work going on right now for achieving that right now.

I am open for suggestions of nifty syntax and implementations! :)

Hi guys,
i have been thinking about a syntax to represent that, and before i venture out in the implementation, i'd like share with you:

graph ||
    A
    B|A
    C|D
    E

the code above wil generate the following diagram:

---------------------------------------------
|                 A                          |
-------------------------------------        |
----------------------------------   |       |
|              B                  |  |       |
----------------------------------    -------  
--------------------    ---------------------
|         C         |  |         D           |
--------------------    ---------------------
---------------------------------------------
|                    E                       |
---------------------------------------------

what do you guys think?

:+1:
I am open for more diagram types! And it is great to have more people contributing!

Some comments:

  • It would be wise to choose another keyword instead of graph, this will be used for identifying the diagram and directing mermaid to the correct parser/renderer. Maybe architecture or something like that.
  • Whats does the '| |' in the top mean, perhaps part of the identifying process?
  • When A shares space with in the second row, should it possible to choose the width somehow?

I have updated the structure to accommodate more diagram types easier. I have also put together i guide for adding a new diagram type ( in the wiki ). This outlines the steps required. It is just a draft so if you encounter anything that is unclear, feel free to ask and/or update the guide.

Another comment, if possible, try to stick with d3 for doing the drawing. It is there already so it should be easy to use. This way we don't have to add another dependency for the library. Other drawing tools can ofc be added if there are good reasons for it.

  • _It would be wise to choose another keyword instead of graph, this will be used for identifying the diagram and directing mermaid to the correct parser/renderer. Maybe architecture or something like that._

i agree. it could be:

architecture <direction>

available directions: v,^,>,<

  • _Whats does the '| |' in the top mean, perhaps part of the identifying process?_

yes. but if we adopt architecture <direction> syntax, it would not be necesssary anymore.

  • _When A shares space with in the second row, should it possible to choose the width somehow?_

i think the simplest way to do that is using style, right?

Sounds good. Even easier would be using parts of the full length
A -- 1
A|B --1/2
A|A|B -- 2/3

You decide on which way to go.

@danilosampaio How is this progressing? Tip: I have come to use flowcharts and subgraphs for similar diagrams which does it quite ok.

hi @knsv,

it's stucked.
i'm on a steep learning curve in the jison and d3 APIs.
Because of this, i'm using other tool for 'block diagrams'.
I'm not sure if the effort is worth, due to the fact
that, apparently, no one else showed interest in this feature.

OK, will close this then. Thanks nevertheless!

3 years have passed, anyone found a good solution to this problem?

and another year has passed. this would be really nice !

one more year

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yk-liu picture yk-liu  路  4Comments

michaeltlombardi picture michaeltlombardi  路  3Comments

visualcurrent picture visualcurrent  路  3Comments

vi picture vi  路  5Comments

lumenwrites picture lumenwrites  路  5Comments