Home - k2works/intercept-booster-2-sample GitHub Wiki


title: Home description: published: true date: 2025-03-22T05:46:06.747Z tags: editor: markdown dateCreated: 2025-03-22T02:39:59.898Z

PlantUML埋め込み例

1. シーケンス図

@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another Message
@enduml

2. クラス図

@startuml
class Car {
    +String model
    +int year
    +getInfo()
}
class Engine {
    +int horsepower
    +type
}
Car -> Engine : has
@enduml

3. アクティビティ図

@startuml
start
:Start Process;
if (Is it OK?) then (yes)
    :Process it;
else (no)
    :Fix it;
endif
:Finish;
stop
@enduml

4. 状態遷移図

@startuml
[*] --> State1
State1 -> State2 : Transition
State2 --> [*]
@enduml

5. コンポーネント図

@startuml
package "Web Application" {
    [Frontend] --> [Backend]
    [Backend] --> [Database]
}
@enduml

Mermaid埋め込み例

1. フローチャート

graph TD
    Start --> Check[Is it valid?]
    Check -->|Yes| Process[Process it]
    Check -->|No| End[Stop]
    Process --> End

2. シーケンス図

sequenceDiagram
    participant Alice
    participant Bob
    Alice->>Bob: Hi Bob!
    Bob-->>Alice: Hello!
    Alice->>Bob: How are you?
    Bob-->>Alice: Good, thanks!

3. ガントチャート

gantt
    title Project Plan
    dateFormat  YYYY-MM-DD
    section Design
    Task1 :a1, 2023-10-01, 10d
    Task2 :after a1, 15d
    section Development
    Dev Task1 :2023-10-15, 20d
    Dev Task2 :after a1, 25d

4. 状態遷移図

stateDiagram
    [*] --> Idle
    Idle --> Working : Start
    Working --> Idle : Stop
    Working --> Error : Fail
    Error --> Idle : Reset

5. エンティティリレーション図 (ER図)

erDiagram
    CUSTOMER ||--o{ ORDER : places
    ORDER ||--|{ LINE-ITEM : contains
    CUSTOMER {
        string name
        string address
    }
    ORDER {
        int id
        date orderDate
    }
    LINE-ITEM {
        int quantity
        float price
    }

6. パイチャート

pie
    title Sample Pie Chart
    "Category A" : 40
    "Category B" : 25
    "Category C" : 35

注意点

  • PlantUML:

    • レンダリングにはPlantUML対応ツールを使用してください。例: IntelliJ IDEAのプラグイン、VS CodeのPlantUML拡張など。
    • Javaランタイム環境が必要である点に注意。
  • Mermaid:

    • GitHubやVS Codeの「Markdown Preview Mermaid Support」拡張でプレビュー可能。
    • IntelliJ IDEA 2024.2.5 Ultimate Editionもサポートしています。

さまざまなユースケースに応じてサンプルを試してください!