C4_Container.puml split across multiple files
updated styles to be flat boundary is now a dashed rectangle updated README with new image urlspull/1/head
parent
79fe8601af
commit
732db12aa0
@ -0,0 +1,99 @@
|
||||
' Colors
|
||||
' ##################################
|
||||
|
||||
!define ELEMENT_FONT_COLOR #FFFFFF
|
||||
|
||||
' Styling
|
||||
' ##################################
|
||||
|
||||
!define TECHN_FONT_SIZE 12
|
||||
|
||||
skinparam defaultTextAlignment center
|
||||
|
||||
skinparam wrapWidth 200
|
||||
skinparam maxMessageSize 150
|
||||
|
||||
skinparam rectangle {
|
||||
StereotypeFontSize 12
|
||||
shadowing false
|
||||
}
|
||||
|
||||
skinparam Arrow {
|
||||
Color #666666
|
||||
FontColor #666666
|
||||
FontSize 12
|
||||
}
|
||||
|
||||
skinparam rectangle<<boundary>> {
|
||||
Shadowing false
|
||||
StereotypeFontSize 0
|
||||
FontSize 12
|
||||
FontColor #444444
|
||||
BorderColor #444444
|
||||
BorderStyle dashed
|
||||
}
|
||||
|
||||
' Layout
|
||||
' ##################################
|
||||
|
||||
!definelong LAYOUT_AS_SKETCH
|
||||
skinparam backgroundColor #EEEBDC
|
||||
skinparam handwritten true
|
||||
skinparam defaultFontName "Comic Sans MS"
|
||||
center footer <font color=red>Warning:</font> Created for discussion, needs to be validated
|
||||
!enddefinelong
|
||||
|
||||
!define LAYOUT_TOP_DOWN top to bottom direction
|
||||
!define LAYOUT_LEFT_RIGHT left to right direction
|
||||
|
||||
' Boundaries
|
||||
' ##################################
|
||||
|
||||
!define Boundary(e_alias, e_label) rectangle "==e_label" <<boundary>> as e_alias
|
||||
!define Boundary(e_alias, e_label, e_type) rectangle "==e_label [e_type]" <<boundary>> as e_alias
|
||||
|
||||
' Relationship
|
||||
' ##################################
|
||||
|
||||
!define Rel_(e_alias1, e_alias2, e_label, e_direction="") e_alias1 e_direction e_alias2 : "===e_label"
|
||||
!define Rel_(e_alias1, e_alias2, e_label, e_techn, e_direction="") e_alias1 e_direction e_alias2 : "===e_label\n//<size:TECHN_FONT_SIZE>[e_techn]</size>//"
|
||||
|
||||
!define Rel(e_from,e_to, e_label) Rel_(e_from,e_to, e_label, "-->")
|
||||
!define Rel(e_from,e_to, e_label, e_techn) Rel_(e_from,e_to, e_label, e_techn, "-->")
|
||||
|
||||
!define Rel_Back(e_to, e_from, e_label) Rel_(e_to, e_from, e_label, "<--")
|
||||
!define Rel_Back(e_to, e_from, e_label, e_techn) Rel_(e_to, e_from, e_label, e_techn, "<--")
|
||||
|
||||
!define Rel_Neighbor(e_from,e_to, e_label) Rel_(e_from,e_to, e_label, "->")
|
||||
!define Rel_Neighbor(e_from,e_to, e_label, e_techn) Rel_(e_from,e_to, e_label, e_techn, "->")
|
||||
|
||||
!define Rel_Back_Neighbor(e_to, e_from, e_label) Rel_(e_to, e_from, e_label, "<-")
|
||||
!define Rel_Back_Neighbor(e_to, e_from, e_label, e_techn) Rel_(e_to, e_from, e_label, e_techn, "<-")
|
||||
|
||||
!define Rel_D(e_from,e_to, e_label) Rel_(e_from,e_to, e_label, "-DOWN->")
|
||||
!define Rel_D(e_from,e_to, e_label, e_techn) Rel_(e_from,e_to, e_label, e_techn, "-DOWN->")
|
||||
!define Rel_Down(e_from,e_to, e_label) Rel_D(e_from,e_to, e_label)
|
||||
!define Rel_Down(e_from,e_to, e_label, e_techn) Rel_D(e_from,e_to, e_label, e_techn)
|
||||
|
||||
!define Rel_U(e_from,e_to, e_label) Rel_(e_from,e_to, e_label, "-UP->")
|
||||
!define Rel_U(e_from,e_to, e_label, e_techn) Rel_(e_from,e_to, e_label, e_techn, "-UP->")
|
||||
!define Rel_Up(e_from,e_to, e_label) Rel_U(e_from,e_to, e_label)
|
||||
!define Rel_Up(e_from,e_to, e_label, e_techn) Rel_U(e_from,e_to, e_label, e_techn)
|
||||
|
||||
!define Rel_L(e_from,e_to, e_label) Rel_(e_from,e_to, e_label, "-LEFT->")
|
||||
!define Rel_L(e_from,e_to, e_label, e_techn) Rel_(e_from,e_to, e_label, e_techn, "-LEFT->")
|
||||
!define Rel_Left(e_from,e_to, e_label) Rel_L(e_from,e_to, e_label)
|
||||
!define Rel_Left(e_from,e_to, e_label, e_techn) Rel_L(e_from,e_to, e_label, e_techn)
|
||||
|
||||
!define Rel_R(e_from,e_to, e_label) Rel_(e_from,e_to, e_label, "-RIGHT->")
|
||||
!define Rel_R(e_from,e_to, e_label, e_techn) Rel_(e_from,e_to, e_label, e_techn, "-RIGHT->")
|
||||
!define Rel_Right(e_from,e_to, e_label) Rel_R(e_from,e_to, e_label)
|
||||
!define Rel_Right(e_from,e_to, e_label, e_techn) Rel_R(e_from,e_to, e_label, e_techn)
|
||||
|
||||
' Layout Helpers
|
||||
' ##################################
|
||||
|
||||
!define Lay_D(e_from, e_to) e_from -[hidden]D- e_to
|
||||
!define Lay_U(e_from, e_to) e_from -[hidden]U- e_to
|
||||
!define Lay_R(e_from, e_to) e_from -[hidden]R- e_to
|
||||
!define Lay_L(e_from, e_to) e_from -[hidden]L- e_to
|
||||
@ -0,0 +1,45 @@
|
||||
!includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Container.puml
|
||||
' uncomment the following line and comment the first to use locally
|
||||
' !include C4_Container.puml
|
||||
|
||||
' Scope: A single container.
|
||||
' Primary elements: Components within the container in scope.
|
||||
' Supporting elements: Containers (within the software system in scope) plus people and software systems directly connected to the components.
|
||||
' Intended audience: Software architects and developers.
|
||||
|
||||
' Colors
|
||||
' ##################################
|
||||
|
||||
!define COMPONENT_BG_COLOR #85BBF0
|
||||
|
||||
' Styling
|
||||
' ##################################
|
||||
|
||||
skinparam rectangle<<component>> {
|
||||
StereotypeFontColor ELEMENT_FONT_COLOR
|
||||
FontColor #000000
|
||||
BackgroundColor COMPONENT_BG_COLOR
|
||||
BorderColor #78A8D8
|
||||
}
|
||||
|
||||
' Layout
|
||||
' ##################################
|
||||
|
||||
!definelong LAYOUT_WITH_LEGEND
|
||||
hide stereotype
|
||||
legend right
|
||||
|= |= Type |
|
||||
|<PERSON_BG_COLOR> | person |
|
||||
|<EXTERNAL_PERSON_BG_COLOR> | external person |
|
||||
|<SYSTEM_BG_COLOR> | system |
|
||||
|<EXTERNAL_SYSTEM_BG_COLOR> | external system |
|
||||
|<CONTAINER_BG_COLOR> | container |
|
||||
|<COMPONENT_BG_COLOR> | component |
|
||||
endlegend
|
||||
!enddefinelong
|
||||
|
||||
' Elements
|
||||
' ##################################
|
||||
|
||||
!define Component(e_alias, e_label, e_techn) rectangle "==e_label\n//<size:TECHN_FONT_SIZE>[e_techn]</size>//" <<component>> as e_alias
|
||||
!define Component(e_alias, e_label, e_techn, e_descr) rectangle "==e_label\n//<size:TECHN_FONT_SIZE>[e_techn]</size>//\n\n e_descr" <<component>> as e_alias
|
||||
@ -0,0 +1,81 @@
|
||||
!includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4.puml
|
||||
' uncomment the following line and comment the first to use locally
|
||||
' !include C4.puml
|
||||
|
||||
' Scope: A single software system.
|
||||
' Primary elements: The software system in scope.
|
||||
' Supporting elements: People and software systems directly connected to the software system in scope.
|
||||
' Intended audience: Everybody, both technical and non-technical people, inside and outside of the software development team.
|
||||
|
||||
' Colors
|
||||
' ##################################
|
||||
|
||||
!define PERSON_BG_COLOR #08427B
|
||||
!define EXTERNAL_PERSON_BG_COLOR #686868
|
||||
!define SYSTEM_BG_COLOR #1168BD
|
||||
!define EXTERNAL_SYSTEM_BG_COLOR #999999
|
||||
|
||||
' Styling
|
||||
' ##################################
|
||||
|
||||
skinparam rectangle<<person>> {
|
||||
StereotypeFontColor ELEMENT_FONT_COLOR
|
||||
FontColor ELEMENT_FONT_COLOR
|
||||
BackgroundColor PERSON_BG_COLOR
|
||||
BorderColor #073B6F
|
||||
}
|
||||
|
||||
skinparam rectangle<<external_person>> {
|
||||
StereotypeFontColor ELEMENT_FONT_COLOR
|
||||
FontColor ELEMENT_FONT_COLOR
|
||||
BackgroundColor EXTERNAL_PERSON_BG_COLOR
|
||||
BorderColor #8A8A8A
|
||||
}
|
||||
|
||||
skinparam rectangle<<system>> {
|
||||
StereotypeFontColor ELEMENT_FONT_COLOR
|
||||
FontColor ELEMENT_FONT_COLOR
|
||||
BackgroundColor SYSTEM_BG_COLOR
|
||||
BorderColor #3C7FC0
|
||||
}
|
||||
|
||||
skinparam rectangle<<external_system>> {
|
||||
StereotypeFontColor ELEMENT_FONT_COLOR
|
||||
FontColor ELEMENT_FONT_COLOR
|
||||
BackgroundColor EXTERNAL_SYSTEM_BG_COLOR
|
||||
BorderColor #8A8A8A
|
||||
}
|
||||
|
||||
' Layout
|
||||
' ##################################
|
||||
|
||||
!definelong LAYOUT_WITH_LEGEND
|
||||
hide stereotype
|
||||
legend right
|
||||
|= |= Type |
|
||||
|<PERSON_BG_COLOR> | person |
|
||||
|<EXTERNAL_PERSON_BG_COLOR> | external person |
|
||||
|<SYSTEM_BG_COLOR> | system |
|
||||
|<EXTERNAL_SYSTEM_BG_COLOR> | external system |
|
||||
endlegend
|
||||
!enddefinelong
|
||||
|
||||
' Elements
|
||||
' ##################################
|
||||
|
||||
!define Person(e_alias, e_label) rectangle "==e_label" <<person>> as e_alias
|
||||
!define Person(e_alias, e_label, e_descr) rectangle "==e_label\n\n e_descr" <<person>> as e_alias
|
||||
|
||||
!define Person_Ext(e_alias, e_label) rectangle "==e_label" <<external_person>> as e_alias
|
||||
!define Person_Ext(e_alias, e_label, e_descr) rectangle "==e_label\n\n e_descr" <<external_person>> as e_alias
|
||||
|
||||
!define System(e_alias, e_label) rectangle "==e_label" <<system>> as e_alias
|
||||
!define System(e_alias, e_label, e_descr) rectangle "==e_label\n\n e_descr" <<system>> as e_alias
|
||||
|
||||
!define System_Ext(e_alias, e_label) rectangle "==e_label" <<external_system>> as e_alias
|
||||
!define System_Ext(e_alias, e_label, e_descr) rectangle "==e_label\n\n e_descr" <<external_system>> as e_alias
|
||||
|
||||
' Boundaries
|
||||
' ##################################
|
||||
|
||||
!define System_Boundary(e_alias, e_label) rectangle "==e_label [System]" <<boundary>> as e_alias
|
||||
@ -1,5 +1,7 @@
|
||||
@startuml
|
||||
!includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Container.puml
|
||||
!includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Component.puml
|
||||
' uncomment the following line and comment the first to use locally
|
||||
' !include C4_Component.puml
|
||||
|
||||
LAYOUT_WITH_LEGEND
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
@startuml
|
||||
!includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Container.puml
|
||||
' uncomment the following line and comment the first to use locally
|
||||
' !include C4_Container.puml
|
||||
|
||||
LAYOUT_WITH_LEGEND
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
# C4Model Core Diagrams
|
||||
|
||||
The following samples are reproductions with C4-PlantUML from [C4 model core diagrams](http://c4model.com/#coreDiagrams) created by [Simon Brown](http://simonbrown.je/).
|
||||
|
||||
## System Context Diagram
|
||||
|
||||
Source: [C4_Context Diagram Sample.puml](samples/C4model.com/C4_Context%20Diagram%20Sample.puml)
|
||||
|
||||

|
||||
|
||||
## Container Diagram
|
||||
|
||||
Source: [C4_Container Diagram Sample.puml](samples/C4model.com/C4_Container%20Diagram%20Sample.puml)
|
||||
|
||||

|
||||
|
||||
## Component Diagram
|
||||
|
||||
Source: [C4_Component Diagram Sample.puml](samples/C4model.com/C4_Component%20Diagram%20Sample.puml)
|
||||
|
||||

|
||||
Loading…
Reference in New Issue