top of page

Build Class Diagrams with
Mermaid, Draw.io, and ChatGPT

The document aims to introduce users to the integrated use of Mermaid, draw.io, and ChatGPT for creating class diagrams.

Using ChatGPT for Idea Generation

Guidelines on how to frame questions or prompts to ChatGPT for generating initial diagram concepts and Mermaid code.

Command Prompt:

"Give me a sample use case in a paragraph form for any system. It should be well defined and structured."

22.png

Generating Mermaid Code with ChatGPT

Input the prompt into ChatGPT and review the generated Mermaid code based on your use case.

Command Prompt:

"Give me mermaid code for class diagram for the above use case."

Importing Diagrams into draw.io

Copy the Generated Mermaid Code, go to the draw.io website, Insert a Mermaid Diagram

Operation Procedure:

  • In draw.io, click on Arrange > Insert > Advanced > Mermaid.

  • Alternatively, use the "+" icon in the toolbar, then select Advanced > Mermaid.

666.png
bottom of page