コンテンツにスキップ
アーキテクチャ図

アーキテクチャ図

(Architecture Diagram)

サンプル

@startuml
package "ユーザー側" {
  [Webブラウザ]
}
database データベース
cloud 外部API
package "サーバー側" {
  [Webブラウザ] --> [Webサーバー]
  [Webサーバー] --> [アプリケーションサーバー]
  [アプリケーションサーバー] --> データベース
  [アプリケーションサーバー] --> 外部API
}
@enduml
PlantUML図
PlantUMLソース
@startuml
package "ユーザー側" {
  [Webブラウザ]
}
database データベース
cloud 外部API
package "サーバー側" {
  [Webブラウザ] --> [Webサーバー]
  [Webサーバー] --> [アプリケーションサーバー]
  [アプリケーションサーバー] --> データベース
  [アプリケーションサーバー] --> 外部API
}
@enduml

全体の設定

タイトル

タイトルを定義できます。

title 新基盤構築計画
PlantUML図
PlantUMLソース
@startuml
title 新基盤構築計画
package "ユーザー側" {
  [Webブラウザ]
}
database データベース
cloud 外部API
package "サーバー側" {
  [Webブラウザ] --> [Webサーバー]
  [Webサーバー] --> [アプリケーションサーバー]
  [アプリケーションサーバー] --> データベース
  [アプリケーションサーバー] --> 外部API
}
@enduml

ヘッダ

ヘッダを定義できます。

header 新基盤構築計画
PlantUML図
PlantUMLソース
@startuml
header 新基盤構築計画
package "ユーザー側" {
  [Webブラウザ]
}
database データベース
cloud 外部API
package "サーバー側" {
  [Webブラウザ] --> [Webサーバー]
  [Webサーバー] --> [アプリケーションサーバー]
  [アプリケーションサーバー] --> データベース
  [アプリケーションサーバー] --> 外部API
}
@enduml

フッタ

フッタを定義できます。

footer フッタ
PlantUML図
PlantUMLソース
@startuml
footer フッタ
package "ユーザー側" {
  [Webブラウザ]
}
database データベース
cloud 外部API
package "サーバー側" {
  [Webブラウザ] --> [Webサーバー]
  [Webサーバー] --> [アプリケーションサーバー]
  [アプリケーションサーバー] --> データベース
  [アプリケーションサーバー] --> 外部API
}
@enduml

キャプション

キャプションを定義できます。

caption キャプション
PlantUML図
PlantUMLソース
@startuml
caption キャプション
package "ユーザー側" {
  [Webブラウザ]
}
database データベース
cloud 外部API
package "サーバー側" {
  [Webブラウザ] --> [Webサーバー]
  [Webサーバー] --> [アプリケーションサーバー]
  [アプリケーションサーバー] --> データベース
  [アプリケーションサーバー] --> 外部API
}
@enduml

すべて組み合わせると…

PlantUML図
PlantUMLソース
@startuml
header 新基盤構築計画
title 新基盤構築計画
caption キャプション
footer フッタ
package "ユーザー側" {
  [Webブラウザ]
}
database データベース
cloud 外部API
package "サーバー側" {
  [Webブラウザ] --> [Webサーバー]
  [Webサーバー] --> [アプリケーションサーバー]
  [アプリケーションサーバー] --> データベース
  [アプリケーションサーバー] --> 外部API
}

コンポーネント

[]で囲むか、componentに続けてコンポーネント名を記載する事でコンポーネントを定義できます。

[コンポーネント名]
PlantUML図
PlantUMLソース
@startuml
[コンポーネント名]
@enduml
component コンポーネント名
PlantUML図
PlantUMLソース
@startuml
component コンポーネント名
@enduml

パッケージ

アーキテクチャ図では、関連する要素の論理的なグループとしてパッケージを使うようです。

package Sample {
  component コンポーネント名
}
PlantUML図
PlantUMLソース
@startuml
package Sample {
  component コンポーネント名
}
@enduml

ノード

物理的または論理的な実行環境を表します。

node ノード名
PlantUML図
PlantUMLソース
@startuml
node ノード名
@enduml

データストア

database データストア
PlantUML図
PlantUMLソース
@startuml
database データストア
package Sample {
  component コンポーネント名
}
@enduml

クラウド

cloud "クラウド"
PlantUML図
PlantUMLソース
@startuml
cloud "クラウド"
@enduml

単方向の関連

[ブラウザ] --> [サーバ]
PlantUML図
PlantUMLソース
@startuml
[ブラウザ] --> [サーバ]
@enduml

双方向の関連

[ブラウザ] <-> [サーバ]
PlantUML図
PlantUMLソース
@startuml
[ブラウザ] <-> [サーバ]
@enduml

抽象的な依存

[ブラウザ] ..> [サーバ]
PlantUML図
PlantUMLソース
@startuml
[ブラウザ] ..> [サーバ]
@enduml

ラベル

[ブラウザ] --> [サーバ] : HTTP通信
PlantUML図
PlantUMLソース
@startuml
[ブラウザ] --> [サーバ] : HTTP通信
@enduml

太線

[ブラウザ] == [サーバ]
PlantUML図
PlantUMLソース
@startuml
[ブラウザ] == [サーバ]
@enduml