mirror of
https://github.com/plantuml-stdlib/C4-PlantUML.git
synced 2022-10-18 01:14:54 +00:00
Merge pull request #3 from coldacid/feature/enterprise
Add enterprise boundaries
This commit is contained in:
Vendored
+14
-1
@@ -145,6 +145,19 @@
|
||||
],
|
||||
"description": "Add a System Boundary to C4 diagram"
|
||||
},
|
||||
"C4_Enterprise_Boundary": {
|
||||
"scope": "diagram",
|
||||
"prefix": [
|
||||
"Enterprise Boundary",
|
||||
"Boundary for Enterprise"
|
||||
],
|
||||
"body":[
|
||||
"Enterprise_Boundary(${1:alias}, \"${2:label}\"){",
|
||||
"\t$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Add an Enterprise Boundary to C4 diagram"
|
||||
},
|
||||
"C4_Relationship": {
|
||||
"scope": "diagram",
|
||||
"prefix": "Relationship",
|
||||
@@ -195,7 +208,7 @@
|
||||
"scope": "diagram",
|
||||
"prefix": [
|
||||
"Boundary with type"
|
||||
]
|
||||
],
|
||||
"body": [
|
||||
"Boundary(${1:alias}, \"${2:label}\", \"${3:type}\"){",
|
||||
"\t$0",
|
||||
|
||||
@@ -27,7 +27,6 @@ skinparam Arrow {
|
||||
skinparam rectangle<<boundary>> {
|
||||
Shadowing false
|
||||
StereotypeFontSize 0
|
||||
FontSize 12
|
||||
FontColor #444444
|
||||
BorderColor #444444
|
||||
BorderStyle dashed
|
||||
@@ -50,7 +49,7 @@ center footer <font color=red>Warning:</font> Created for discussion, needs to b
|
||||
' ##################################
|
||||
|
||||
!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
|
||||
!define Boundary(e_alias, e_label, e_type) rectangle "==e_label\n<size:TECHN_FONT_SIZE>[e_type]</size>" <<boundary>> as e_alias
|
||||
|
||||
' Relationship
|
||||
' ##################################
|
||||
|
||||
+1
-1
@@ -46,4 +46,4 @@ endlegend
|
||||
' Boundaries
|
||||
' ##################################
|
||||
|
||||
!define Container_Boundary(e_alias, e_label) rectangle "==e_label [Container]" <<boundary>> as e_alias
|
||||
!define Container_Boundary(e_alias, e_label) Boundary(e_alias, e_label, "Container")
|
||||
+2
-1
@@ -78,4 +78,5 @@ endlegend
|
||||
' Boundaries
|
||||
' ##################################
|
||||
|
||||
!define System_Boundary(e_alias, e_label) rectangle "==e_label [System]" <<boundary>> as e_alias
|
||||
!define Enterprise_Boundary(e_alias, e_label) Boundary(e_alias, e_label, "Enterprise")
|
||||
!define System_Boundary(e_alias, e_label) Boundary(e_alias, e_label, "System")
|
||||
@@ -73,9 +73,9 @@ Rel(web_app, twitter, "Gets tweets from", "HTTPS")
|
||||
|
||||
## Supported Diagram Types
|
||||
|
||||
* System Context diagram
|
||||
* System Context & System Landscape diagrams
|
||||
* Import: `!includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Context.puml`
|
||||
* Macros: `Person`, `Person_Ext`, `System`, `System_Ext`, `Boundary`, `System_Boundary`
|
||||
* Macros: `Person`, `Person_Ext`, `System`, `System_Ext`, `Boundary`, `System_Boundary`, `Enterprise_Boundary`
|
||||
* Container diagram
|
||||
* Import: `!includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Container.puml`
|
||||
* Additional Macros: `Container`, `Container_Boundary`
|
||||
@@ -83,7 +83,7 @@ Rel(web_app, twitter, "Gets tweets from", "HTTPS")
|
||||
* Import: `!includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Component.puml`
|
||||
* Additional Macros: `Component`
|
||||
|
||||
Take a look at each of the [C4 Model Core Diagram Samples](samples/C4CoreDiagrams.md).
|
||||
Take a look at each of the [C4 Model Diagram Samples](samples/C4CoreDiagrams.md).
|
||||
|
||||
## Snippets for Visual Studio Code
|
||||
|
||||
|
||||
@@ -1,21 +1,31 @@
|
||||
# C4 Model Core Diagrams
|
||||
# C4 Model 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
|
||||
## Core Diagrams
|
||||
|
||||
### System Context Diagram
|
||||
|
||||
Source: [C4_Context Diagram Sample - bigbankplc.puml](C4_Context%20Diagram%20Sample%20-%20bigbankplc.puml)
|
||||
|
||||

|
||||
|
||||
## Container Diagram
|
||||
### Container Diagram
|
||||
|
||||
Source: [C4_Container Diagram Sample - bigbankplc.puml](C4_Container%20Diagram%20Sample%20-%20bigbankplc.puml)
|
||||
|
||||

|
||||
|
||||
## Component Diagram
|
||||
### Component Diagram
|
||||
|
||||
Source: [C4_Component Diagram Sample - bigbankplc.puml](C4_Component%20Diagram%20Sample%20-%20bigbankplc.puml)
|
||||
|
||||

|
||||

|
||||
|
||||
## Supplementary Diagrams
|
||||
|
||||
### System Landscape Diagram
|
||||
|
||||
Source: [C4_Context Diagram Sample - bigbankplc-landscape.puml](C4_Context%20Diagram%Sample%20-%20bigbankplc-landscape.puml)
|
||||
|
||||

|
||||
@@ -0,0 +1,42 @@
|
||||
@startuml
|
||||
!includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Context.puml
|
||||
' uncomment the following line and comment the first to use locally
|
||||
' !include C4_Context.puml
|
||||
|
||||
'LAYOUT_TOP_DOWN
|
||||
'LAYOUT_AS_SKETCH
|
||||
LAYOUT_WITH_LEGEND
|
||||
|
||||
title System Landscape diagram for Big Bank plc
|
||||
|
||||
Person(customer, "Personal Banking Customer", "A customer of the bank, with personal bank accounts.")
|
||||
|
||||
Enterprise_Boundary(c0, "Big Bank plc") {
|
||||
System(banking_system, "Internet Banking System", "Allows customers to view information about their bank accounts, and make payments.")
|
||||
|
||||
System_Ext(atm, "ATM", "Allows customers to withdraw cash.")
|
||||
System_Ext(mail_system, "E-mail system", "The internal Microsoft Exchange e-mail system.")
|
||||
|
||||
System_Ext(mainframe, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.")
|
||||
|
||||
Person_Ext(customer_service, "Customer Service Staff", "Customer service staff within the bank.")
|
||||
Person_Ext(back_office, "Back Office Staff", "Administration and support staff within the bank.")
|
||||
}
|
||||
|
||||
Rel_Neighbor(customer, banking_system, "Uses")
|
||||
Rel_R(customer, atm, "Withdraws cash using")
|
||||
Rel_Back(customer, mail_system, "Sends e-mails to")
|
||||
|
||||
Rel_R(customer, customer_service, "Asks questions to", "Telephone")
|
||||
|
||||
Rel_D(banking_system, mail_system, "Sends e-mail using")
|
||||
Rel_R(atm, mainframe, "Uses")
|
||||
Rel_R(banking_system, mainframe, "Uses")
|
||||
Rel_D(customer_service, mainframe, "Uses")
|
||||
Rel_U(back_office, mainframe, "Uses")
|
||||
|
||||
Lay_D(atm, banking_system)
|
||||
|
||||
Lay_D(atm, customer)
|
||||
Lay_U(mail_system, customer)
|
||||
@enduml
|
||||
@@ -0,0 +1,42 @@
|
||||
@startuml "enterprise"
|
||||
!includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Context.puml
|
||||
' uncomment the following line and comment the first to use locally
|
||||
' !include C4_Context.puml
|
||||
|
||||
LAYOUT_TOP_DOWN
|
||||
'LAYOUT_AS_SKETCH
|
||||
LAYOUT_WITH_LEGEND
|
||||
|
||||
Person(customer, "Customer", "A customer of Widgets Limited.")
|
||||
|
||||
Enterprise_Boundary(c0, "Widgets Limited") {
|
||||
Person(csa, "Customer Service Agent", "Deals with customer enquiries.")
|
||||
|
||||
System(ecommerce, "E-commerce System", "Allows customers to buy widgts online via the widgets.com website.")
|
||||
|
||||
System(fulfilment, "Fulfilment System", "Responsible for processing and shipping of customer orders.")
|
||||
}
|
||||
|
||||
System(taxamo, "Taxamo", "Calculates local tax (for EU B2B customers) and acts as a front-end for Braintree Payments.")
|
||||
|
||||
System(braintree, "Braintree Payments", "Processes credit card payments on behalf of Widgets Limited.")
|
||||
|
||||
System(post, "Jersey Post", "Calculates worldwide shipping costs for packages.")
|
||||
|
||||
Rel_R(customer, csa, "Asks questions to", "Telephone")
|
||||
|
||||
Rel_R(customer, ecommerce, "Places orders for widgets using")
|
||||
|
||||
Rel(csa, ecommerce, "Looks up order information using")
|
||||
|
||||
Rel_R(ecommerce, fulfilment, "Sends order information to")
|
||||
|
||||
Rel_D(fulfilment, post, "Gets shipping charges from")
|
||||
|
||||
Rel_D(ecommerce, taxamo, "Delegates credit card processing to")
|
||||
|
||||
Rel_L(taxamo, braintree, "Uses for credit card processing")
|
||||
|
||||
Lay_D(customer, braintree)
|
||||
|
||||
@enduml
|
||||
Reference in New Issue
Block a user