Skip to content

Commit bd1093c

Browse files
committed
Add context and container puml
1 parent 5f4d8f2 commit bd1093c

File tree

2 files changed

+114
-0
lines changed

2 files changed

+114
-0
lines changed

Diff for: images/C4_Component.puml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
' !includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Container.puml
2+
' uncomment the following line and comment the first to use locally
3+
!include C4_Container.puml
4+
5+
' Scope: A single container.
6+
' Primary elements: Components within the container in scope.
7+
' Supporting elements: Containers (within the software system in scope) plus people and software systems directly connected to the components.
8+
' Intended audience: Software architects and developers.
9+
10+
' Colors
11+
' ##################################
12+
13+
!define COMPONENT_BG_COLOR #85BBF0
14+
15+
' Styling
16+
' ##################################
17+
18+
skinparam rectangle<<component>> {
19+
StereotypeFontColor ELEMENT_FONT_COLOR
20+
FontColor #000000
21+
BackgroundColor COMPONENT_BG_COLOR
22+
BorderColor #78A8D8
23+
}
24+
25+
skinparam database<<component>> {
26+
StereotypeFontColor ELEMENT_FONT_COLOR
27+
FontColor #000000
28+
BackgroundColor COMPONENT_BG_COLOR
29+
BorderColor #78A8D8
30+
}
31+
32+
' Layout
33+
' ##################################
34+
35+
!definelong LAYOUT_WITH_LEGEND
36+
hide stereotype
37+
legend right
38+
|= |= Type |
39+
|<PERSON_BG_COLOR> | person |
40+
|<EXTERNAL_PERSON_BG_COLOR> | external person |
41+
|<SYSTEM_BG_COLOR> | system |
42+
|<EXTERNAL_SYSTEM_BG_COLOR> | external system |
43+
|<CONTAINER_BG_COLOR> | container |
44+
|<COMPONENT_BG_COLOR> | component |
45+
endlegend
46+
!enddefinelong
47+
48+
' Elements
49+
' ##################################
50+
51+
!define Component(e_alias, e_label, e_techn) rectangle "==e_label\n//<size:TECHN_FONT_SIZE>[e_techn]</size>//" <<component>> as e_alias
52+
!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
53+
54+
!define ComponentDb(e_alias, e_label, e_techn) database "==e_label\n//<size:TECHN_FONT_SIZE>[e_techn]</size>//" <<component>> as e_alias
55+
!define ComponentDb(e_alias, e_label, e_techn, e_descr) database "==e_label\n//<size:TECHN_FONT_SIZE>[e_techn]</size>//\n\n e_descr" <<component>> as e_alias

Diff for: images/C4_Container.puml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
' !includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Context.puml
2+
' uncomment the following line and comment the first to use locally
3+
!include C4_Context.puml
4+
5+
' Scope: A single software system.
6+
' Primary elements: Containers within the software system in scope.
7+
' Supporting elements: People and software systems directly connected to the containers.
8+
' Intended audience: Technical people inside and outside of the software development team; including software architects, developers and operations/support staff.
9+
10+
' Colors
11+
' ##################################
12+
13+
!define CONTAINER_BG_COLOR #438DD5
14+
15+
' Styling
16+
' ##################################
17+
18+
skinparam rectangle<<container>> {
19+
StereotypeFontColor ELEMENT_FONT_COLOR
20+
FontColor ELEMENT_FONT_COLOR
21+
BackgroundColor CONTAINER_BG_COLOR
22+
BorderColor #3C7FC0
23+
}
24+
25+
skinparam database<<container>> {
26+
StereotypeFontColor ELEMENT_FONT_COLOR
27+
FontColor ELEMENT_FONT_COLOR
28+
BackgroundColor CONTAINER_BG_COLOR
29+
BorderColor #3C7FC0
30+
}
31+
32+
' Layout
33+
' ##################################
34+
35+
!definelong LAYOUT_WITH_LEGEND
36+
hide stereotype
37+
legend right
38+
|= |= Type |
39+
|<PERSON_BG_COLOR> | person |
40+
|<EXTERNAL_PERSON_BG_COLOR> | external person |
41+
|<SYSTEM_BG_COLOR> | system |
42+
|<EXTERNAL_SYSTEM_BG_COLOR> | external system |
43+
|<CONTAINER_BG_COLOR> | container |
44+
endlegend
45+
!enddefinelong
46+
47+
' Elements
48+
' ##################################
49+
50+
!define Container(e_alias, e_label, e_techn) rectangle "==e_label\n//<size:TECHN_FONT_SIZE>[e_techn]</size>//" <<container>> as e_alias
51+
!define Container(e_alias, e_label, e_techn, e_descr) rectangle "==e_label\n//<size:TECHN_FONT_SIZE>[e_techn]</size>//\n\n e_descr" <<container>> as e_alias
52+
53+
!define ContainerDb(e_alias, e_label, e_techn) database "==e_label\n//<size:TECHN_FONT_SIZE>[e_techn]</size>//" <<container>> as e_alias
54+
!define ContainerDb(e_alias, e_label, e_techn, e_descr) database "==e_label\n//<size:TECHN_FONT_SIZE>[e_techn]</size>//\n\n e_descr" <<container>> as e_alias
55+
56+
' Boundaries
57+
' ##################################
58+
59+
!define Container_Boundary(e_alias, e_label) Boundary(e_alias, e_label, "Container")

0 commit comments

Comments
 (0)