# Usage

## Excalidraw Macro

This macro helps you create figures, diagrams, and notes using Excalidraw. It's a powerful tool for brainstorming and visualizing ideas. This plugin uses a built-in Excalidraw version, therefore, your data will not be seen or stored by excalidraw\.com and will be securely kept in your Confluence instance.

### Insert Excalidraw drawings

Select the **Excalidraw diagrams** macro from the macro list.

![Excalidraw for Confluence](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MjSRPFNta7gqBp3oIeY%2F-MjSVn_RRinFyA8ZF13I%2Fimage.png?alt=media\&token=a0f5adcd-6624-4ed0-b44d-0d7261a8bc70)

Click **Open Editor**.

![Excalidraw for Confluence](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MjSRPFNta7gqBp3oIeY%2F-MjSW4YPqig00yFIBk4b%2Fimage.png?alt=media\&token=4141d05f-3889-4691-be05-eb92a8d4a8d4)

Draw anything you want. To draw perfect shapes like a circle, hold the **Shift** button while drawing.

![Excalidraw for Confluence](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2Fr3eujDqLIj1E5ALgxPux%2Fconfluence-cloud-excalidraw-10.png?alt=media\&token=ceccdf82-2425-4131-b239-061ca22f58bb)

Click **Save and Close**, and wait until the drawing shows up in the dialog. If you don't want to save the changes, click the **X** button on the top right corner.

![Excalidraw for Confluence](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FdrFhgdVmjXBge5Kp8cBM%2Fimage.png?alt=media\&token=f15c2b76-58ca-43b2-a44c-614cadb1e9b3)

Click **Insert** (for new macro contents) or **Save** (for existing macro content).

![Excalidraw for Confluence](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FCFdnjd6mfPUqPkMmSy5z%2Fimage.png?alt=media\&token=48478019-ed12-44a0-8282-c688ef0f8632)

### Adding new shapes from the Excalidraw Libraries website

The Excalidraw Libraries website (<https://libraries.excalidraw.com>) provides a lot of useful shapes. These shapes are contributed by the community.

To add new shapes, visit the website and click the **Download** button to save the collection you need to your computer. The downloaded library file's extension is `.excalidrawlib`.

> **Do not use the Add to Excalidraw button, as the library will not be added to the plugin-hosted Excalidraw Editor.**

![Excalidraw for Confluence](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2F2QOV2e9ArwR3RCQdoHlX%2Fimage.png?alt=media\&token=923886ca-ad9c-4be6-9968-43da33ff7812)

Open the Excalidraw Editor in Confluence, and upload the library file.

![Excalidraw for Confluence](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FOqcphsFQkLsjZnBP6dGL%2Fconfluence-cloud-excalidraw-12.png?alt=media\&token=971e2840-bd06-4d73-8fed-2a77864987e9)

![Excalidraw for Confluence](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FMBMOlC5zqQ8yvCEaGpmT%2Fconfluence-cloud-excalidraw-14.png?alt=media\&token=a6119c72-4f30-462e-a8be-d35018d59512)

You can then drag and drop shapes into the canvas.

![Excalidraw for Confluence](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FXdTiG1db1uoIIiF6cZkT%2Fimage.png?alt=media\&token=8c258a01-f74b-43bb-99ac-e26288f8630a)

### Saving shapes as libraries

Let's say we want to save the following doughnut shape to reuse later. The first step is to select the whole shape.

![Excalidraw for Confluence](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FFiEDcZDg2uZIIgWix879%2Fimage.png?alt=media\&token=0b504dac-f2cb-436c-b763-2f2f136ffdef)

Add the selected shape to your library.

![Excalidraw for Confluence](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FARH3IJpvgk1B0keWZPeY%2Fconfluence-cloud-excalidraw-15.png?alt=media\&token=8ac4bdd4-582e-45bd-b785-dce4f9225c6b)

To save your library locally (for the backup purpose, for example), click the **Export** button.

![Excalidraw for Confluence](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FrVjYzs4FP7prQqU2k54e%2Fimage.png?alt=media\&token=5fef6d93-fdf4-4e49-af66-bde068d2c1b5)

## Draw\.io Integration Macro

This macro helps you to use draw\.io to create multiple kinds of advanced diagrams. The macro uses the embedded version of draw\.io editor. If this is the first time you use draw\.io, please check out their privacy policy.&#x20;

### Insert Draw\.io drawings

Select the **DrawIO diagrams** macro from the macro list.

<figure><img src="https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2Fw6MeIBCn2jDIcbmICO2h%2Fimage.png?alt=media&#x26;token=49524bb9-e361-4832-a9ca-72edbd60a728" alt=""><figcaption><p>Excalidraw for Confluence</p></figcaption></figure>

Click **Open Editor**.

<figure><img src="https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FST32h207vNsMppfgUK5B%2Fimage.png?alt=media&#x26;token=b3d4671d-db0b-4bc4-aff2-943c7d5fea46" alt=""><figcaption><p>Excalidraw for Confluence</p></figcaption></figure>

Draw anything you want.

<figure><img src="https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FDIYms0t7CeNdjTiEn8rN%2Fimage.png?alt=media&#x26;token=126742c3-b3ba-41ca-99d2-7cebcb191168" alt=""><figcaption><p>Excalidraw for Confluence</p></figcaption></figure>

Click **Save & Exit**, and wait until the drawing shows up in the dialog. If you don't want to save the changes, click **Exit**.

<figure><img src="https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2F6maEPLKwg0xiUNckJbRT%2Fimage.png?alt=media&#x26;token=dd3b7d2c-a951-4a18-8b0f-9832049be009" alt=""><figcaption><p>Excalidraw for Confluence</p></figcaption></figure>

Click **Insert** (for new macro contents) or **Save** (for existing macro content).

<figure><img src="https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2Ffm4yJN8jGDfve5HhxRre%2Fimage.png?alt=media&#x26;token=98b6c2db-f6a3-4ffe-b970-1bb2d5f08b5b" alt=""><figcaption><p>Excalidraw for Confluence</p></figcaption></figure>

## BPMN Macro

This macro helps you create BPMN diagrams using a built-in version of bpmn.io. The data is securely kept in your Confluence instance and is not shared with bpmn.io.

### Insert BPMN drawings

Select the **BPMN diagrams** macro from the macro list.

<figure><img src="https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FaMQAbRus4B2QurcoqoFF%2Fimage.png?alt=media&#x26;token=3f8557dd-68e1-43f6-9b9b-59578bc2d318" alt=""><figcaption><p>Excalidraw for Confluence</p></figcaption></figure>

Click **Open Editor**.

<figure><img src="https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FCDpLXcxO7lormfyKBbZS%2Fimage.png?alt=media&#x26;token=72b4f51e-9fb3-46f7-8e3e-0a667a2c9d38" alt=""><figcaption><p>Excalidraw for Confluence</p></figcaption></figure>

<figure><img src="https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2Fmt1h6wOywvNszdDIWaPI%2Fimage.png?alt=media&#x26;token=961a26ea-128a-45c6-89d5-8e3145c2d690" alt=""><figcaption><p>Excalidraw for Confluence</p></figcaption></figure>

Click **Save and Close**, and wait until the drawing shows up in the dialog. If you don't want to save the changes, click the **X** button on the top right corner.

<figure><img src="https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FKw9owln8ZMjXKSa4Lwm2%2Fimage.png?alt=media&#x26;token=7ebcf4bc-e3ea-4b80-b656-38fe7ecbc520" alt=""><figcaption><p>Excalidraw for Confluence</p></figcaption></figure>

Click **Insert** (for new macro contents) or **Save** (for existing macro content).

## Mermaid UML Diagrams Macro

The **Render Mermaid UML Diagrams** macro (<https://mermaid-js.github.io/mermaid/#/>) uses Mermaid to render UML diagrams. It allows you to define UML diagrams in plain-text format just like Markdown.

For a live editor to draft your diagrams, please try <https://mermaidjs.github.io/mermaid-live-editor>.

In the Confluence editor, open the **Select macro** dialog. The macro name is **Render Mermaid UML Diagrams**.

![Mermaid UML Diagrams and Graphviz Diagrams for Confluence Cloud](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MkUmqmP2tthaej48rDr%2F-MkUpZEJm9Cn79WVgL7I%2Fimage.png?alt=media\&token=ed3b1d3b-b29c-4d8c-ae8b-e4581f0b4d50)

Alternatively, type / (**slash**) and select the macro.

![Mermaid UML Diagrams and Graphviz Diagrams for Confluence Cloud](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MkUmqmP2tthaej48rDr%2F-MkUouybkR0GsW4lQCVv%2Fimage.png?alt=media\&token=e114ab55-725a-4de0-8373-555402961671)

A dialog will appear. Type the content of the UML diagram into the macro editor. Here is an example:

```
sequenceDiagram
    participant Alice
    participant Bob
    Alice->>John: Hello John, how are you?
    loop Healthcheck
        John->>John: Fight against hypochondria
    end
    Note right of John: Rational thoughts <br/>prevail!
    John-->>Alice: Great!
    John->>Bob: How about you?
    Bob-->>John: Jolly good!
```

![Mermaid UML Diagrams and Graphviz Diagrams for Confluence Cloud](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MkUmqmP2tthaej48rDr%2F-MkUq01ClfLhF74YdYPm%2Fimage.png?alt=media\&token=c72b37ec-a0da-44a4-96fa-48935ce2d17d)

While editing, you can click **Show preview** to see the result. You can also click **Full Screen Editor** to open the Mermaid editor that will help you design new diagrams easily.

![Mermaid UML Diagrams and Graphviz Diagrams for Confluence Cloud](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MkUmqmP2tthaej48rDr%2F-MkUqJQW_e_LTREul1YO%2Fimage.png?alt=media\&token=74232e73-af67-406e-b11c-b9925fd3cfd5)

Save the page, and the UML diagram will be rendered.

![Mermaid UML Diagrams and Graphviz Diagrams for Confluence Cloud](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2Fsync%2F364b3279ec8b5b00c9f6d01a54add9b0d3f504cf.png?generation=1621504371527864\&alt=media)

## PlantUML Diagrams Macro

The **Render PlantUML Diagrams** macro (<https://plantuml.com/>) uses PlantUML to render UML diagrams. It allows you to define UML diagrams in plain-text format just like Markdown.

For a live editor to draft your diagrams, please try <http://www.plantuml.com/plantuml>.

In the Confluence editor, open the **Select macro** dialog. The macro name is **Render PlantUML Diagrams**.

<figure><img src="https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FJ5Wqpo6wCczGjmxW5wAh%2Fimage.png?alt=media&#x26;token=73c81b6c-5521-47d9-8ce0-03b8f6b0e76d" alt=""><figcaption><p>UML for Confluence</p></figcaption></figure>

A dialog will appear. Type the content of the UML diagram into the macro editor. Here is an example:

```plant-uml
@startuml C4_Elements
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml

Person(personAlias, "Label", "Optional Description")
Container(containerAlias, "Label", "Technology", "Optional Description")
System(systemAlias, "Label", "Optional Description")

Rel(personAlias, containerAlias, "Label", "Optional Technology")
@enduml
```

You can find more examples here <https://plantuml.com/>. The PDF guideline can be downloaded here <https://plantuml.com/guide>.

Save the macro, and the UML diagram will be rendered.

<figure><img src="https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2F1pg4z2J07D5apCGl5YDL%2Fimage.png?alt=media&#x26;token=a450a6b5-f616-4d56-bac4-5a7a4d33ecdf" alt=""><figcaption><p>UML for Confluence</p></figcaption></figure>

## Graphviz Diagrams Macro

The Graphviz layout programs (<https://www.graphviz.org/>) take descriptions of graphs in a simple text language, and make diagrams in useful formats, such as images and SVG for web pages; PDF or Postscript for inclusion in other documents; or display in an interactive graph browser. Graphviz has many useful features for concrete diagrams, such as options for colors, fonts, tabular node layouts, line styles, hyperlinks, and custom shapes.

You can find more Graphviz examples [here](https://graphs.grevian.org/example).

In the Confluence editor, open the **Select macro** dialog. The macro name is **Render Graphviz Diagrams**.

![Mermaid UML Diagrams and Graphviz Diagrams for Confluence Cloud](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2Fsync%2F675c1716db3d9cab21c56465eb9335eecf8cd6bf.png?generation=1621504370679643\&alt=media)

Select the macro, then click **Insert**.

![Mermaid UML Diagrams and Graphviz Diagrams for Confluence Cloud](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2Fsync%2F50043f7644629439eadaa0fbf399b28809d0c34c.png?generation=1621504371001052\&alt=media)

Type the content of the Graphviz diagram into the macro editor. Here is an example:

```dot
graph {
  a -- b;
  b -- c;
  a -- c;
  d -- c;
  e -- c;
  e -- a;
}
```

![Mermaid UML Diagrams and Graphviz Diagrams for Confluence Cloud](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2Fsync%2Ff0bd8766b218835680ffbc8fae25a5941a2f607a.png?generation=1621504370653000\&alt=media)

Save the page, and the Graphviz diagram will be rendered.

![Mermaid UML Diagrams and Graphviz Diagrams for Confluence Cloud](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2Fsync%2Faa8d8862a99c9f892bdde87013fd7b079b93e75e.png?generation=1621504370707190\&alt=media)

## Mindmap

Select the **Mind Map** macro from the macro list.

![Mind Mapping for Confluence](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FedFFQpFiZeeAsnohqPij%2Fimage.png?alt=media\&token=a25be6b8-a51e-4223-ae3e-88bb793fb274)

Click **Open Editor**.

![Mind Mapping for Confluence](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FAZFseGnP1qknJezzmxHZ%2Fimage.png?alt=media\&token=cd929808-ff85-4a32-91bb-5969986ba94a)

The Mind Map Editor now opens and you can start brainstorming! To create a subtopic, use **Tab.** To create a sibling topic, use **Enter**.

![Mind Mapping for Confluence](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FDRpKLY1yFBCMKvGSpjJR%2Fimage.png?alt=media\&token=cf434934-2d7e-42b9-971e-6e6539094e4d)

Click **Save and Close**, and wait until the drawing shows up in the dialog. If you don't want to save the changes, click the **X** button on the top right corner.

![Mind Mapping for Confluence](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FjrWsra3apBAi9xGg5IsZ%2Fimage.png?alt=media\&token=c8bdb9f5-d2ad-4899-b992-a2265657abff)

Click **Insert** (for new macro contents) or **Save** (for existing macro content).

![Mind Mapping for Confluence](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2F4vOLPpenFsa2EGqGxh0Q%2Fimage.png?alt=media\&token=80db585d-f9e4-4f5f-bea3-316679121def)

## Examples

### Mermaid

#### Flowchart

Flowcharts can be rendered with Mermaid. See more <https://mermaid-js.github.io/mermaid/#/flowchart>.

![Input](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MfQKak3knB--HwYWCJF%2F-MfRk3r-aZ5wr1KNon7F%2Fimage.png?alt=media\&token=96e5c582-3e0f-4a81-b27f-f1f6aa3fa38f)

![Render](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MfQKak3knB--HwYWCJF%2F-MfRm7-zDyDMDPaGRBU4%2Fimage.png?alt=media\&token=96d7d112-e259-4ad0-a65f-892480d51157)

#### Sequence diagram

Sequence diagrams can be rendered with Mermaid. See more <https://mermaid-js.github.io/mermaid/#/sequenceDiagram>.

![Input](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MfQKak3knB--HwYWCJF%2F-MfRkuCcrDHX912SRYh-%2Fimage.png?alt=media\&token=2d59f595-793b-479d-bbab-faefd6f17172)

![Render](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MfQKak3knB--HwYWCJF%2F-MfRmf6Yp0CIrgp0v1iN%2Fimage.png?alt=media\&token=e14dd05f-88ac-4580-aa1e-4cc5b018e08b)

#### Class diagram

Class diagrams can be rendered with Mermaid. See more <https://mermaid-js.github.io/mermaid/#/classDiagram>.

![Input](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MfQKak3knB--HwYWCJF%2F-MfRn3mlJrz1YqR05FCh%2Fimage.png?alt=media\&token=a7cca6f2-440a-447e-a94b-5434c7e116c6)

![Render](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MfQKak3knB--HwYWCJF%2F-MfRnPR5JDnBDLWJvXg1%2Fimage.png?alt=media\&token=6a12a53e-4f91-4a0f-a02e-a9f388a6c5f9)

#### State diagram

State diagrams can be rendered with Mermaid. See more <https://mermaid-js.github.io/mermaid/#/stateDiagram>.

![Input](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MfQKak3knB--HwYWCJF%2F-MfRp3169SHX4uJdp1Yc%2Fimage.png?alt=media\&token=fe008351-774c-4a4b-a882-ca121dc86f95)

![Render](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MfQKak3knB--HwYWCJF%2F-MfRpBynG2viGNz43rej%2Fimage.png?alt=media\&token=5e2001c6-a3ff-4efb-bd68-9e9840a99ba6)

#### Entity Relationship diagram

Entity Relationship diagrams can be rendered with Mermaid. See more <https://mermaid-js.github.io/mermaid/#/entityRelationshipDiagram>.

![Input](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MfQKak3knB--HwYWCJF%2F-MfRpqQjT8zOQQf8Q3nk%2Fimage.png?alt=media\&token=93949ea7-a718-4f5e-bc08-b9629c025c22)

![Render](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MfQKak3knB--HwYWCJF%2F-MfRpwIKfFDyRigQSJtG%2Fimage.png?alt=media\&token=90736037-91d4-4422-b756-34f92e03c1d6)

#### User Journey

User Journey can be rendered with Mermaid. See more <https://mermaid-js.github.io/mermaid/#/user-journey>.

![Render](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MfQKak3knB--HwYWCJF%2F-MfRqQFLOuW7X7WTD9sp%2Fimage.png?alt=media\&token=70a9f359-c3ad-48a3-8d07-d81f4470096f)

![Input](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MfQKak3knB--HwYWCJF%2F-MfRqXGELy3h4DHIgEZr%2Fimage.png?alt=media\&token=2b384ae5-7c8a-41a2-a0a2-8d8416bd441b)

#### Gantt chart

Gantt charts can be rendered with Mermaid. See more <https://mermaid-js.github.io/mermaid/#/gantt>.

![Input](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MfQKak3knB--HwYWCJF%2F-MfRrtD1vjpuuDNkExc4%2Fimage.png?alt=media\&token=056c825d-665a-4151-920d-08c7b04174b8)

![Render](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MfQKak3knB--HwYWCJF%2F-MfRrxiC78rgOrLGKNrA%2Fimage.png?alt=media\&token=ada082e3-9934-4e79-98e8-1224640a9e08)

#### Pie chart

Pie charts can be rendered with Mermaid. See more <https://mermaid-js.github.io/mermaid/#/pie>.

![Input](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MfQKak3knB--HwYWCJF%2F-MfRsoBc46muewkcNbc_%2Fimage.png?alt=media\&token=3cc3a2aa-e9dd-4694-a939-d601abaf73f1)

![Render](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MfQKak3knB--HwYWCJF%2F-MfRsyf_O8ESY4dlkk2Z%2Fimage.png?alt=media\&token=e0a58aa1-9403-4f8b-8b5e-81f7a0f3bf10)

### Graphviz

This diagram is rendered with Graphviz.

![Input](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MfRwWqR-mEWO8dowhcO%2F-MfS1gUzu9gFC53VoOAz%2Fimage.png?alt=media\&token=546eaca7-90ca-44dc-ba53-b18184cadbeb)

![Render](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ma7ua4NoSptEMaVrDMS%2F-MfRwWqR-mEWO8dowhcO%2F-MfS26jOEd1zEFuyuxWj%2Fimage.png?alt=media\&token=601e857b-8967-4780-83dc-3f9411c9e2a5)

### PlantUML

#### Sequence diagram

```plant-uml
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: Another authentication Response
@enduml
```

<img src="https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FpMMfCE9PfuILuCxmYkYK%2Fimage.png?alt=media&#x26;token=4c9d0743-30d7-4c32-bdf3-613cdc8eb2aa" alt="" data-size="original">

#### Use Case diagram

```plant-uml
@startuml
left to right direction
actor Guest as g
package Professional {
    actor Chef as c
    actor "Food Critic" as fc
}
package Restaurant {
    usecase "Eat Food" as UC1
    usecase "Pay for Food" as UC2
    usecase "Drink" as UC3
    usecase "Review" as UC4
}
fc --> UC4
g --> UC1
g --> UC2
g --> UC3
@enduml
```

![](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2F3NI3VCPJW8TyYMMBZu05%2Fimage.png?alt=media\&token=56afb633-cfe2-490d-9a15-4e840bd44e5d)

#### Class diagram

```plant-uml
@startuml
Object <|-- ArrayList
Object : equals()
ArrayList : Object[] elementData
ArrayList : size()
@enduml
```

![](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2Fihs2YfrREnZq1nb0SZjp%2Fimage.png?alt=media\&token=c4d53f31-5d91-4d10-b6f4-344f29472f22)

#### Activity diagram

```plant-uml
@startuml
start
repeat
    :read data;
    :generate diagrams;
repeat while (more data?) is (yes)
->no;
stop
@enduml
```

![](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FbEhDopg5ywAIWBQ7kkvS%2Fimage.png?alt=media\&token=bf38b6c6-7929-412c-9701-366b1a78ca39)

#### Component diagram

```plant-uml
@startuml
package "Some Group" {
  HTTP - [First Component]
  [Another Component]
}
node "Other Groups" {
  FTP - [Second Component]
  [First Component] --> FTP
}
cloud {
  [Example 1]
}
database "MySql" {
  folder "This is my folder" {
    [Folder 3]
  }
  frame "Foo" {
    [Frame 4]
  }
}
[Another Component] --> [Example 1]
[Example 1] --> [Folder 3]
[Folder 3] --> [Frame 4]
@enduml
```

![](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2Ff4B7404pvCR6DneebeT9%2Fimage.png?alt=media\&token=6e6170e3-7279-4d82-a1fa-0d18238a1500)

#### Deployment diagram

```plant-uml
@startuml
node node1
node node2
node node3
node node4
node node5
node1 -- node2 : label1
node1 .. node3 : label2
node1 ~~ node4 : label3
node1 == node5
@enduml
```

![](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FNOZvMil0UsnsuiWwDnVC%2Fimage.png?alt=media\&token=003c1b7b-f072-4efb-b374-6d170c4e075d)

#### State diagram

```plant-uml
@startuml
scale 350 width
[*] --> NotShooting
state NotShooting {
  [*] --> Idle
  Idle --> Configuring : EvConfig
  Configuring --> Idle : EvConfig
}
state Configuring {
  [*] --> NewValueSelection
  NewValueSelection --> NewValuePreview : EvNewValue
  NewValuePreview --> NewValueSelection : EvNewValueRejected
  NewValuePreview --> NewValueSelection : EvNewValueSaved
  state NewValuePreview {
    State1 -> State2
  }
}
@enduml
```

![](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2Fi3jcxhFP8YCCE6GKnBUF%2Fimage.png?alt=media\&token=a8bae0de-48dc-4ff8-bcc9-9f9c38b87e14)

#### Timing diagram

```plant-uml
@startuml
robust "Web Browser" as WB
concise "Web User" as WU
@0
WU is Idle
WB is Idle
@100
WU is Waiting
WB is Processing
@300
WB is Waiting
@enduml
```

![](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FIG2WLYHgDzsC68zf8Ccp%2Fimage.png?alt=media\&token=7f858bec-7049-47d0-a5d2-5042ce7bac44)

#### JSON

```plant-uml
@startjson
{
  "firstName": "John",
  "lastName": "Smith",
  "isAlive": true,
  "age": 27,
  "address": {
    "streetAddress": "21 2nd Street",
    "city": "New York",
    "state": "NY",
    "postalCode": "10021-3100"
  },
  "phoneNumbers": [
    {
      "type": "home",
      "number": "212 555-1234"
    },
    {
      "type": "office",
      "number": "646 555-4567"
    }
  ],
  "children": [],
  "spouse": null
}
@endjson
```

<figure><img src="https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FCz40XPdJoElAzYiyTvBD%2Fimage.png?alt=media&#x26;token=81bdce6b-c9c9-4201-9b49-1458f09adc33" alt=""><figcaption></figcaption></figure>

#### Mindmap

```plant-uml
@startmindmap
* Class Templates
**:Example 1
<code>
template <typename T>
class cname{
void f1()<U+003B>
...
}
</code>
;
**:Example 2
<code>
other template <typename T>
class cname{
...
</code>
;
@endmindmap
```

![](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2Fg4dvaW49LBnvzMplWPua%2Fimage.png?alt=media\&token=39524ea8-02da-4ab9-b799-602fe201e72b)

#### Work Breakdown Structure

```plant-uml
@startwbs
* Business Process Modelling WBS
** Launch the project
*** Complete Stakeholder Research
*** Initial Implementation Plan
** Design phase
*** Model of AsIs Processes Completed
**** Model of AsIs Processes Completed1
**** Model of AsIs Processes Completed2
*** Measure AsIs performance metrics
*** Identify Quick Wins
** Complete innovate phase
@endwbs
```

<figure><img src="https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FPEhOVkc3BBi9eMYZ3J7F%2Fimage.png?alt=media&#x26;token=80286182-ca21-461c-8005-22b679bd7d07" alt=""><figcaption></figcaption></figure>

#### Maths

```plant-uml
@startuml
:<math>int_0^1f(x)dx</math>;
:<math>x^2+y_1+z_12^34</math>;
note right
Try also
<math>d/dxf(x)=lim_(h->0)(f(x+h)-f(x))/h</math>
<latex>P(y|\mathbf{x}) \mbox{ or } f(\mathbf{x})+\epsilon</latex>
end note
@enduml
```

![](https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2Fo88OQPAtRL7lb67fflk4%2Fimage.png?alt=media\&token=21c802cf-10c7-461e-9a18-ebebc9499621)

#### Entity Relationship diagram

```plant-uml
@startuml
' hide the spot
hide circle
' avoid problems with angled crows feet
skinparam linetype ortho
entity "Entity01" as e01 {
  *e1_id : number <<generated>>
  --
  *name : text
  description : text
}
entity "Entity02" as e02 {
  *e2_id : number <<generated>>
  --
  *e1_id : number <<FK>>
  other_details : text
}
entity "Entity03" as e03 {
  *e3_id : number <<generated>>
  --
  e1_id : number <<FK>>
  other_details : text
}
e01 ||..o{ e02
e01 |o..o{ e03
@enduml
```

<figure><img src="https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FWrAj62n2pt0NblmYwDGS%2Fimage.png?alt=media&#x26;token=e89e96f0-3ddf-4140-889c-6022f7d3f4f4" alt=""><figcaption></figcaption></figure>

#### C4 diagram

```plant-uml
@startuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
' uncomment the following line and comment the first to use locally
' !include C4_Container.puml

' LAYOUT_TOP_DOWN()
' LAYOUT_AS_SKETCH()
LAYOUT_WITH_LEGEND()

title Container diagram for Internet Banking System

Person(customer, Customer, "A customer of the bank, with personal bank accounts")

System_Boundary(c1, "Internet Banking") {
    Container(web_app, "Web Application", "Java, Spring MVC", "Delivers the static content and the Internet banking SPA")
    Container(spa, "Single-Page App", "JavaScript, Angular", "Provides all the Internet banking functionality to cutomers via their web browser")
    Container(mobile_app, "Mobile App", "C#, Xamarin", "Provides a limited subset of the Internet banking functionality to customers via their mobile device")
    ContainerDb(database, "Database", "SQL Database", "Stores user registration information, hashed auth credentials, access logs, etc.")
    Container(backend_api, "API Application", "Java, Docker Container", "Provides Internet banking functionality via API")
}

System_Ext(email_system, "E-Mail System", "The internal Microsoft Exchange system")
System_Ext(banking_system, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.")

Rel(customer, web_app, "Uses", "HTTPS")
Rel(customer, spa, "Uses", "HTTPS")
Rel(customer, mobile_app, "Uses")

Rel_Neighbor(web_app, spa, "Delivers")
Rel(spa, backend_api, "Uses", "async, JSON/HTTPS")
Rel(mobile_app, backend_api, "Uses", "async, JSON/HTTPS")
Rel_Back_Neighbor(database, backend_api, "Reads from and writes to", "sync, JDBC")

Rel_Back(customer, email_system, "Sends e-mails to")
Rel_Back(email_system, backend_api, "Sends e-mails using", "sync, SMTP")
Rel_Neighbor(backend_api, banking_system, "Uses", "sync/async, XML/HTTPS")
@endumlplan
```

<figure><img src="https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2Fgk9g7GDdZ2jsFjdhDNb6%2Fimage.png?alt=media&#x26;token=b3f750d4-36bc-43e0-b5ab-0209de846196" alt=""><figcaption></figcaption></figure>

#### AWS architecture diagram

```plant-uml
@startuml S3 Upload Workflow
'Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
'SPDX-License-Identifier: MIT (For details, see https://github.com/awslabs/aws-icons-for-plantuml/blob/master/LICENSE)

!define AWSPuml https://raw.githubusercontent.com/awslabs/aws-icons-for-plantuml/v15.0/dist
!include AWSPuml/AWSCommon.puml
!include AWSPuml/AWSExperimental.puml
!include AWSPuml/Groups/all.puml
!include AWSPuml/Compute/LambdaLambdaFunction.puml
!include AWSPuml/General/Documents.puml
!include AWSPuml/General/Multimedia.puml
!include AWSPuml/General/Tapestorage.puml
!include AWSPuml/General/User.puml
!include AWSPuml/MediaServices/ElementalMediaConvert.puml
!include AWSPuml/MachineLearning/Transcribe.puml
!include AWSPuml/Storage/SimpleStorageService.puml

' define custom group for Amazon S3 bucket
AWSGroupColoring(S3BucketGroup, #FFFFFF, AWS_COLOR_GREEN, plain)
!define S3BucketGroup(g_alias, g_label="Amazon S3 bucket") AWSGroupEntity(g_alias, g_label, AWS_COLOR_GREEN, SimpleStorageService, S3BucketGroup)

' Groups are rectangles with a custom style using stereotype - need to hide
hide stereotype
skinparam linetype ortho
skinparam rectangle {
    BackgroundColor AWS_BG_COLOR
    BorderColor transparent
}

rectangle "$UserIMG()\nUser" as user
AWSCloudGroup(cloud){
  RegionGroup(region) {
    S3BucketGroup(s3) {
      rectangle "$MultimediaIMG()\n\tvideo\t" as video
      rectangle "$TapestorageIMG()\n\taudio\t" as audio
      rectangle "$DocumentsIMG()\n\ttranscript\t" as transcript

      user -r-> video: <$Callout_1>\lupload
      video -r-> audio
      audio -r-> transcript
    }

    rectangle "$LambdaLambdaFunctionIMG()\nObjectCreated\nevent handler" as e1
    rectangle "$ElementalMediaConvertIMG()\nAWS Elemental\nMediaConvert" as mediaconvert
    rectangle "$TranscribeIMG()\nAmazon Transcribe\n" as transcribe
    
    video -d-> e1: <$Callout_2> 
    e1 -[hidden]r-> mediaconvert
    mediaconvert -[hidden]r-> transcribe
    mediaconvert -u-> audio: <$Callout_3> 
    transcribe -u-> transcript: <$Callout_4> 
    
    StepFunctionsWorkflowGroup(sfw) {
      rectangle "$LambdaLambdaFunctionIMG()\nextract audio" as sfw1
      rectangle "$LambdaLambdaFunctionIMG()\ntranscribe audio" as sfw2

      e1 -r-> sfw1: Start\nExecution
      sfw1 -r-> sfw2
      sfw1 -u-> mediaconvert
      sfw2 -u-> transcribe
    }
  }
}

@enduml
```

<figure><img src="https://3588362646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma7ua4NoSptEMaVrDMS%2Fuploads%2FBQKT1uZjJIfByqPSgKCM%2Fimage.png?alt=media&#x26;token=3871e451-c6cc-43d1-aa73-d376405fd357" alt=""><figcaption></figcaption></figure>
