Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,89 @@ Example of usage:
This example renders the following image:
![Example](http://www.plantuml.com/plantuml/png/ZOvFIyGm4CNl-HIrfowupMLFdbQgjnKN_vnbcWxRm6GICXDalxtPWaKHnTDxCypxpTkBGjOIg1bsR_U40Ld5N7bsL2PiPjKaDzPcUEzFNkSo5i7i8YkozYu6cmZuaj-AJkH7E-osnylgzU5W0uXYjfKyr0HunjodUclC4RD4xj8Yj-H1hfls02DIMyrZKXyPgBb3STalKxinAwHpd-v7z0NTp97YwVm7wFaiYg6JHVxxtJmXVI-yjlWTyQNEnkoHfnBe0m00)

## Edgy Enterprise Design
Edgy is an Open Source tool for collaborative Enterprise Design. The library is an adaption of the EDGY Tools for PlantUML usage.

The Sprites are based on the [Enterprise Design with EDGY](https://www.enterprise.design/). They'll be rendered as SVG sprites, so you need a quite actual PlantUML distribution.

Use it by including the file that contains the sprite, eg: `!include <edgy/edgy>`.
The library is not complete yet, but it's a good start.

In general, the procedures for elements and facets do have the form of
```
$elementorfacet("label", alias, lighterColor)
```
* ```"label"``` is the name of the element or facet. It is mandatory.
* ```alias``` is used for linking elements and facets. It is optional.
* ```lighterColor``` is used as a boolean value (!) to use a lighter color for the element or facet. It is optional.
* Facets are drawn with lighter colors than Elements as default.
* ```0``` is false. Any other value is true. Or use ```%true()``` and ```%false()``` (see [Boolean expression in Preprocessing](https://plantuml.com/de/preprocessing#55eb000153a81c72)).

### Facets
Facets do have the edgy facet name followed with ```Facet``` as tail, to distinguish them from elements.
The following facets are implemented: ```$baseFacet```,```$identityFacet```,```$brandFacet```,```$experienceFacet```,```$productFacet```,```$architectureFacet```,```$organisationFacet```

### Elements
Elements do have the edgy element name.
The following elements are implemented:
Base: ```$people```,```$outcome```,```$activity```,```$object```
Identity: ```$purpose```,```$story```,```$content```
Brand: ```$brand```
Experience: ```$task```,```$channel```,```$journey```
Product: ```$product```
Architecture: ```$capability```,```$asset```,```$process```
Organisation: ```$organisation```

Elements can be nested into facets:
```
$architectureFacet("Architecture") {
$capability("Capability")
}
```

However, it is also possible to nest elements if needed:
```
$capability("Customer Interaction") {
$capability("Passenger Services", pass, 1) {
$capability("Passenger Information", info)
}
}
```

### Links
Links do have the form of
```
$link(fromAlias, toAlias, "label")
```
* ```fromAlias``` is the starting element or facet. It is mandatory.
* ```toAlias``` is the target element or facet. It is mandatory.
* ```"label""``` is a label written on the connection. This is optional.

There are only three sort of links:
* ```$link``` is a unidirectional link between elements or facets.
* ```$flow``` is a directed flow between elements or facets.
* ```$tree``` is a hierarchical representation of elements as a tree relationship.

Generally, all links do have the possibility to give the rendere a hint in which direction the link should be drawn. This is done by adding ```Up```, ```Down```, ```Left```, ```Right``` as a tail to the link name (e.g. ```$linkUp```, ```$linkDown```, ```$linkLeft```, ```$linkRight```).

### Concrete example of usage:
```
@startuml
!include <edgy/edgy>

$identityFacet("This is the Identity facet", identity) {
$content(" This is the Content element", content)
$purpose("This is the Purpose element", purpose)
$story("This is the Story element", story)
}

$link(content, purpose)
$link(content, story)
$link(purpose, story)

@enduml
```

## Elastic library

The Elastic library consists of [Elastic](https://www.elastic.co) icons.
Expand Down
2 changes: 2 additions & 0 deletions edgy/INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VERSION=0.5.0
SOURCE=https://github.com/boessu/plantuml-stdlib
304 changes: 304 additions & 0 deletions edgy/edgy.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,304 @@
@startuml
'''''''''''''''''''''''''''''''''''''
'''''' Edgy Enterprise Design '''''''
'''''''''''''''''''''''''''''''''''''

'''''' Basic colors '''''''
!$BASE="#d9d9d9"
!$BASE_LIGHT="#e6e6e6"
!$IDENTITY="#4dff9a"
!$IDENTITY_LIGHT="#80ffb7"
!$ARCHITECTURE="#8caeff"
!$ARCHITECTURE_LIGHT="#a6c0ff"
!$EXPERIENCE="#ff73a4"
!$EXPERIENCE_LIGHT="#ff99bd"
!$ORGANISATION="#4de2ff"
!$ORGANISATION_LIGHT="#80eaff"
!$PRODUCT="#db73ff"
!$PRODUCT_LIGHT="#e599ff"
!$BRAND="#ffc44d"
!$BRAND_LIGHT="#ffd580"

skinparam StereotypeAlignment left

skinparam rectangle<<element>> {
RoundCorner 25
BorderColor $BASE_LIGHT
}

'''''' basic visual procedures ''''''
' procedures to build skinparam for facets
!procedure $facetSkinParam($stereotype, $color)
skinparam rectangle<<$stereotype>> {
Shadowing false
StereotypeFontSize 0
RoundCorner 50
FontColor #444444
BorderColor $color
BorderStyle dashed
BorderThickness 3
}
!endprocedure

' sprite procedures
!procedure $activitysprite($name, $linecolor, $fillcolor)
sprite $b##$name##Icon <svg viewBox="0 0 160 26">
<path d="M20.667 25H1V1h19.667L29 13l-8.333 12z" fill="$linecolor"/>
<path d="M18.667 23H3V3h15.667L27 13L18.667 23z" fill="$fillcolor"/>
<text x="17" y="10" font-size="10" fill="#262626">$name</text>
</svg>
!endprocedure
!procedure $outcomesprite($name, $linecolor, $fillcolor)
sprite $b##$name##Icon <svg viewBox="0 0 160 28">
<circle cx="14" cy="14" r="13" fill="$linecolor"/>
<circle cx="14" cy="14" r="11" fill="$fillcolor"/>
<text x="17" y="10" font-size="10" fill="#262626">$name</text>
</svg>
!endprocedure
!procedure $objectsprite($name, $linecolor, $fillcolor)
sprite $b##$name##Icon <svg viewBox="0 0 160 26">
<path d="M1 1h24v24H1z" fill="$linecolor"/>
<path d="M3 3h20v20H3z" fill="$fillcolor"/>
<text x="17" y="10" font-size="10" fill="#262626">$name</text>
</svg>
!endprocedure

''''''''''''''''''''''''''''''''''''''''''''''''''
'''''' Edgy Sprites & skinparams for Facets ''''''
' Base
$facetSkinParam("base", $BASE)
$activitysprite("Activity", "#262626", "#fff")
$outcomesprite("Outcome", "#262626", "#fff")
$objectsprite("Object", "#262626", "#fff")
sprite $bPeopleIcon <svg viewBox="0 0 160 32">
<path d="m16,19c-3.308,0-6-2.692-6-6v-4c0-3.308,2.692-6,6-6s6,2.692,6,6v4c0,3.308-2.692,6-6,6Zm0-14c-2.206,0-4,1.794-4,4v4c0,2.206,1.794,4,4,4s4-1.794,4-4v-4c0-2.206-1.794-4-4-4Z" fill="#262626"/>
<path d="m16,5C13.794 5 12 6.794 12 9v4c0 2.206 1.794 4 4 4s4-1.794 4-4v-4c0-2.206-1.794-4-4-4Z" fill="#fff"/>
<path d="M4 29v-2.5c0-2.75 2.25-5 5-5h14c2.75 0 5 2.25 5 5V29H4z" fill="#fff"/>
<path d="M29 30H3v-3.5a6.01 6.01 0 0 1 6-6h14a6.01 6.01 0 0 1 6 6V30zM5 28h22v-1.5c0-2.206-1.794-4-4-4H9c-2.206 0-4 1.794-4 4V28z" fill="#262626"/>
<text x="17" y="10" font-size="10" fill="#262626">People</text>
</svg>

' Experience
$facetSkinParam("experience", $EXPERIENCE)
$activitysprite("Journey", "#fff", "#ff005a")
$outcomesprite("Task", "#fff", "#ff005a")
$objectsprite("Channel", "#fff", "#ff005a")
sprite $bExperienceLogo <svg viewBox="0 0 32 32">
<path d="M21.167 3.282c-2.38 0-3.944.802-5.167 1.871-1.223-1.07-2.787-1.871-5.167-1.871-.385 0-.793.021-1.214.062-1.666.163-3.266.981-4.506 2.303C3.75 7.1 2.936 9.046 2.757 11.275l-.006.08v.88l.006.078c.166 2.129 1.221 4.282 3.419 6.983 1.875 2.304 4.502 4.929 7.826 8.252l.584.584L16 29.546l1.414-1.414.587-.587c3.324-3.322 5.949-5.947 7.824-8.25 2.198-2.7 3.253-4.854 3.419-6.982l.006-.078v-.88l-.006-.08c-.179-2.228-.994-4.174-2.357-5.628-1.24-1.323-2.841-2.141-4.507-2.303-.42-.041-.829-.062-1.213-.062h0z" fill="#fff"/>
<path d="m21.167,5.282c.318,0,.657.017,1.019.052,2.204.215,4.753,2.233,5.064,6.101v.722c-.289,3.701-4.329,7.639-11.25,14.56-6.921-6.921-10.961-10.859-11.25-14.56v-.722c.31-3.867,2.859-5.886,5.063-6.101.362-.035.701-.052,1.019-.052,2.547,0,3.769,1.101,5.167,2.767,1.399-1.667,2.62-2.767,5.167-2.767Z" fill="#ff0056"/>
</svg>

' Identity
$facetSkinParam("identity", $IDENTITY)
$activitysprite("Story", "#fff", "#00e664")
$outcomesprite("Content", "#fff", "#00e664")
$objectsprite("Purpose", "#fff", "#00e664")
sprite $bIdentityLogo <svg viewBox="0 0 32 32">
<path d="M17 2C10.383 2 5 7.383 5 14a11.93 11.93 0 0 0 2.264 7.006C4.892 21.129 3 23.098 3 25.5 3 27.981 5.019 30 7.5 30s4.5-2.019 4.5-4.5c0-.208-.015-.412-.043-.613C13.491 25.6 15.2 26 17 26c6.617 0 12-5.383 12-12S23.617 2 17 2z" fill="#fff"/>
<g fill="#00ea4e">
<circle cx="17" cy="14" r="10"/><circle cx="7.5" cy="25.5" r="2.5"/>
</g>
</svg>

' Architecture
$facetSkinParam("architecture", $ARCHITECTURE)
$activitysprite("Process", "#fff", "#2664ff")
$outcomesprite("Capability", "#fff", "#2664ff")
$objectsprite("Asset", "#fff", "#2664ff")
sprite $bArchitectureLogo <svg viewBox="0 0 32 32">
<path d="M16 1.172l-1.414 1.414-10 10-.586.586V29.5h24V13.172l-.586-.586-10-10L16 1.172h0z" fill="#fff"/>
<path d="M26 14L16 4 6 14v13.5h20V14z" fill="#034cee"/>
</svg>

' Brand
$facetSkinParam("brand", $BRAND)
$objectsprite("Brand", "#fff", "orange")
sprite $bBrandLogo <svg viewBox="0 0 32 32">
<path d="M21.988 1.544l-1.948.885L16 4.265l-4.04-1.836-1.948-.885-.752 2.004-1.559 4.154-4.154 1.559-2.004.752.885 1.948 1.836 4.04-1.836 4.04-.885 1.948 2.004.752L7.701 24.3l1.559 4.154.752 2.004 1.948-.885L16 27.737l4.04 1.836 1.948.885.752-2.004 1.559-4.154 4.154-1.559 2.004-.752-.885-1.948-1.836-4.04 1.836-4.04.885-1.948-2.004-.752-4.154-1.559-1.559-4.154-.752-2.004h0z" fill="#fff"/>
<path d="M16 6.461l4.867-2.211 1.878 5.005 5.005 1.878L25.539 16l2.211 4.867-5.005 1.878-1.878 5.005L16 25.539l-4.867 2.211-1.878-5.005-5.005-1.878L6.461 16 4.25 11.133l5.005-1.878 1.878-5.005L16 6.461z" fill="orange"/>
<path d="M16 10a6 6 0 1 1 0 12 6 6 0 1 1 0-12m0-2a8.01 8.01 0 0 0-8 8 8.01 8.01 0 0 0 8 8 8.01 8.01 0 0 0 8-8 8.01 8.01 0 0 0-8-8h0z" fill="#fff"/>
</svg>

' Organisation
$facetSkinParam("organisation", $ORGANISATION)
$objectsprite("Organisation", "#fff", "#00caf4")
sprite $bOrganisationLogo <svg viewBox="0 0 32 32">
<path d="M24.711 17.044l-3.293-5.968A5.96 5.96 0 0 0 22 8.501a6.01 6.01 0 0 0-6-6 6.01 6.01 0 0 0-6 6 5.96 5.96 0 0 0 .582 2.575l-3.293 5.968A6.01 6.01 0 0 0 2 23a6.01 6.01 0 0 0 6 6c2.003 0 3.778-.987 4.869-2.5h6.262C20.221 28.013 21.997 29 24 29a6.01 6.01 0 0 0 6-6 6.01 6.01 0 0 0-5.289-5.956zM16 15.746l2.072 3.755h-4.143l2.072-3.755z" fill="#fff"/>
<path d="M24 19c-.162 0-.321.011-.478.029l-4.418-8.008A3.98 3.98 0 0 0 20 8.499a4 4 0 1 0-8 0 3.98 3.98 0 0 0 .896 2.522l-4.418 8.008A3.97 3.97 0 0 0 8 19a4 4 0 1 0 0 8 4 4 0 0 0 3.708-2.5h8.584A4 4 0 0 0 28 23a4 4 0 0 0-4-4zm-12.896 1.478l4.418-8.008a3.97 3.97 0 0 0 .478.029c.162 0 .321-.011.478-.029l4.418 8.008c-.249.306-.453.65-.604 1.022h-8.584c-.15-.372-.355-.715-.604-1.022z" fill="#00caf4"/>
</svg>

' Product
$facetSkinParam("product", $PRODUCT)
$objectsprite("Product", "#fff", "#cf00ff")
sprite $bProductLogo <svg viewBox="0 0 32 32">
<path d="M26 21.774V10.227L16 4.453 6 10.226v11.547l10 5.774 10-5.773z" fill="#cf00ff"/>
<path d="M27 8.494L17 2.721l-1-.577-1 .577L5 8.494l-1 .577v13.856l1 .577 10 5.773 1 .577 1-.577 10-5.773 1-.577V9.071l-1-.577zM6.041 10.203l-.041.07v-.047l.041-.023z" fill="#fff"/>
<path d="M16 4.453l9.041 5.22L16 14.892 6.959 9.673 16 4.453zM6 21.773V11.428l9 5.196V26.97l-9-5.197zm11 5.197V16.624l9-5.196v10.345l-9 5.197z" fill="#cf00ff"/>
</svg>

'''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''' procedures to build facets and elements ''''''
' element and facet builder
!procedure $elementBuilder($name, $label, $alias, $islight, $fillcolor, $fillcolorlight, $facet=0, $noSprite=0)
!if ($islight)
!$filling=$fillcolorlight
!else
!$filling=$fillcolor
!endif
!if ($alias=="")
!$id=""
!else
!$id="as " + $alias
!endif
!if ($facet)
!$stereotype=%lower($name)
!if ($noSprite)
!$sprite = ""
!else
!$sprite = "<<$b"+$name+"Logo>>"
!endif
!else
!$stereotype=element
!if ($noSprite)
!$sprite = ""
!else
!$sprite = "<<$b"+$name+"Icon*0.5>>"
!endif
!endif
rectangle "$label" $sprite <<$stereotype>> $id $filling
!endprocedure

!procedure $facetBuilder($name,$fillcolor,$alias,$label)
!if ($alias=="")
rectangle "==$label" <<$b##$name##Logo>> <<%lower($name)>> $fillcolor
!else
rectangle "==$label" <<$b##$name##Logo>> <<%lower($name)>> as $alias $fillcolor
!endif
!endprocedure

' base elements
!procedure $baseFacet($label, $alias="", $islight=1)
$elementBuilder("Base", $label, $alias, $islight, $BASE, $BASE_LIGHT, 1, 1)
!endprocedure
!procedure $people($label, $alias="", $islight=0)
$elementBuilder("People", $label, $alias, $islight, $BASE, $BASE_LIGHT)
!endprocedure
!procedure $outcome($label, $alias="", $islight=0)
$elementBuilder("Outcome", $label, $alias, $islight, $BASE, $BASE_LIGHT)
!endprocedure
!procedure $activity($label, $alias="", $islight=0)
$elementBuilder("Activity", $label, $alias, $islight, $BASE, $BASE_LIGHT)
!endprocedure
!procedure $object($label, $alias="", $islight=0)
$elementBuilder("Object", $label, $alias, $islight, $BASE, $BASE_LIGHT)
!endprocedure

!procedure $identityFacet($label, $alias="", $islight=1)
$elementBuilder("Identity", $label, $alias, $islight, $IDENTITY, $IDENTITY_LIGHT, 1, 0)
!endprocedure
!procedure $purpose($label, $alias="", $islight=0)
$elementBuilder("Purpose", $label, $alias, $islight, $IDENTITY, $IDENTITY_LIGHT)
!endprocedure
!procedure $story($label, $alias="", $islight=0)
$elementBuilder("Story", $label, $alias, $islight, $IDENTITY, $IDENTITY_LIGHT)
!endprocedure
!procedure $content($label, $alias="", $islight=0)
$elementBuilder("Content", $label, $alias, $islight, $IDENTITY, $IDENTITY_LIGHT)
!endprocedure

!procedure $brandFacet($label, $alias="", $islight=1)
$elementBuilder("Brand", $label, $alias, $islight, $BRAND, $BRAND_LIGHT, 1, 0)
!endprocedure
!procedure $brand($label, $alias="", $islight=0)
$elementBuilder("Brand", $label, $alias, $islight, $BRAND, $BRAND_LIGHT)
!endprocedure

!procedure $experienceFacet($label, $alias="", $islight=1)
$elementBuilder("Experience", $label, $alias, $islight, $EXPERIENCE, $EXPERIENCE_LIGHT, 1, 0)
!endprocedure
!procedure $task($label, $alias="", $islight=0)
$elementBuilder("Task", $label, $alias, $islight, $EXPERIENCE, $EXPERIENCE_LIGHT)
!endprocedure
!procedure $channel($label, $alias="", $islight=0)
$elementBuilder("Channel", $label, $alias, $islight, $EXPERIENCE, $EXPERIENCE_LIGHT)
!endprocedure
!procedure $journey($label, $alias="", $islight=0)
$elementBuilder("Journey", $label, $alias, $islight, $EXPERIENCE, $EXPERIENCE_LIGHT)
!endprocedure

!procedure $productFacet($label, $alias="", $islight=1)
$elementBuilder("Product", $label, $alias, $islight, $PRODUCT, $PRODUCT_LIGHT, 1, 0)
!endprocedure
!procedure $product($label, $alias="", $islight=0)
$elementBuilder("Product", $label, $alias, $islight, $PRODUCT, $PRODUCT_LIGHT)
!endprocedure

!procedure $architectureFacet($label, $alias="", $islight=1)
$elementBuilder("Architecture", $label, $alias, $islight, $ARCHITECTURE, $ARCHITECTURE_LIGHT, 1, 0)
!endprocedure
!procedure $capability($label, $alias="", $islight=0)
$elementBuilder("Capability", $label, $alias, $islight, $ARCHITECTURE, $ARCHITECTURE_LIGHT)
!endprocedure
!procedure $asset($label, $alias="", $islight=0)
$elementBuilder("Asset", $label, $alias, $islight, $ARCHITECTURE, $ARCHITECTURE_LIGHT)
!endprocedure
!procedure process($label, $alias="", $islight=0)
$elementBuilder("Process", $label, $alias, $islight, $ARCHITECTURE, $ARCHITECTURE_LIGHT)
!endprocedure

!procedure $organisationFacet($label, $alias="", $islight=1)
$elementBuilder("Organisation", $label, $alias, $islight, $ORGANISATION, $ORGANISATION_LIGHT, 1, 0)
!endprocedure
!procedure $organisation($label, $alias="", $islight=0)
$elementBuilder("Organisation", $label, $alias, $islight, $ORGANISATION, $ORGANISATION_LIGHT)
!endprocedure

'''''''''''''''''''''''''''''''''''''''
'''''' procedures to build links ''''''
!procedure $link($from, $to, $label="")
$from -- $to : "$label"
!endprocedure
!procedure $linkUp($from, $to, $label="")
$from -up- $to : "$label"
!endprocedure
!procedure $linkDown($from, $to, $label="")
$from -down- $to : "$label"
!endprocedure
!procedure $linkLeft($from, $to, $label="")
$from -left- $to : "$label"
!endprocedure
!procedure $linkRight($from, $to, $label="")
$from -right- $to : "$label"
!endprocedure
!procedure $flow($from, $to, $label="")
$from --> $to : "$label"
!endprocedure
!procedure $flowUp($from, $to, $label="")
$from -up-> $to : "$label"
!endprocedure
!procedure $flowDown($from, $to, $label="")
$from -down-> $to : "$label"
!endprocedure
!procedure $flowLeft($from, $to, $label="")
$from -left-> $to : "$label"
!endprocedure
!procedure $flowRight($from, $to, $label="")
$from -right-> $to : "$label"
!endprocedure
!procedure $tree($from, $to, $label="")
$from --* $to : "$label"
!endprocedure
!procedure $treeUp($from, $to, $label="")
$from -up-* $to : "$label"
!endprocedure
!procedure $treeDown($from, $to, $label="")
$from -down-* $to : "$label"
!endprocedure
!procedure $treeLeft($from, $to, $label="")
$from -left-* $to : "$label"
!endprocedure
!procedure $treeRight($from, $to, $label="")
$from -right-* $to : "$label"
!endprocedure

@enduml