Logo

dev-resources.site

for different kinds of informations.

Mermaid Markdown

Published at
6/28/2024
Categories
markdown
documentation
mermaid
Author
eric_dequ
Categories
3 categories in total
markdown
open
documentation
open
mermaid
open
Author
9 person written this
eric_dequ
open
Mermaid Markdown

Tutorial: Using ChatGPT and Mermaid to Create System Architecture Diagrams

Introduction 📚

System architecture diagrams are a powerful tool for visualizing the components of a system and how they interact with each other. They can be used to communicate complex ideas to stakeholders, developers, and other technical teams.

Mermaid is a popular tool for creating system architecture diagrams. It is a lightweight markup language that can be used to create diagrams in a variety of formats, including HTML, SVG, and webp.

ChatGPT is a large language model from Google AI, trained on a massive dataset of text and code. It can be used to generate text, translate languages, write different kinds of creative content, and answer your questions in an informative way. but did you know you can get it to make system architectures, You can feed in Data from your projects or Class diagrams and it will generate a system architecture diagram for you in mermaid markdown.

This can be usefull to collaborate with your team Present your work to stake holders or just to get a better understanding of your own project!

Lets see Some examples

Generate a diagram of a web application.

graph TD
  A[Web Application]
  B[Database]
  C[API]
  A-->B
  A-->C
Enter fullscreen mode Exit fullscreen mode

Here are some more complex examples

Flowchart


graph LR;
  A[Start] --> B{Decision};
  B -->|Yes| C[Action 1];
  B -->|No| D[Action 2];
  C --> E[End];
  D --> E;

Enter fullscreen mode Exit fullscreen mode

Sequence Diagram


sequenceDiagram;
  participant Alice;
  participant Bob;
  Alice->>Bob: Hello Bob, how are you?;
  alt is fine
    Bob->>Alice: I am good, thanks!;
  else is not fine
    Bob->>Alice: Not so good :(
  end

Enter fullscreen mode Exit fullscreen mode

Gantt Chart

gantt
    dateFormat  YYYY-MM-DD
    title CRM Web App Development Timeline

    section Design
    UI Design           :done, des1, 2022-11-01, 2022-11-15
    Backend Design      :done, des2, 2022-11-10, 2022-11-25

    section Development
    Frontend Development :done, dev1, 2022-11-26, 2023-02-28
    Backend Development  :done, dev2, 2022-11-26, 2023-02-28

    section Testing
    Testing & QA         :active, test1, 2023-03-01, 2023-03-31

    section Deployment
    Deployment           : dep1, 2023-04-01, 2023-04-15

Enter fullscreen mode Exit fullscreen mode
classDiagram
class User {
  -id: int
  -username: string
  -email: string
  +getId(): int
  +getUsername(): string
  +getEmail(): string
  +setUsername(username: string): void
  +setEmail(email: string): void
}

class Order {
  -orderId: int
  -userId: int
  -productId: int
  -quantity: int
  +getOrderId(): int
  +getUserId(): int
  +getProductId(): int
  +getQuantity(): int
  +setQuantity(quantity: int): void
}

class Product {
  -productId: int
  -name: string
  -price: float
  +getProductId(): int
  +getName(): string
  +getPrice(): float
  +setName(name: string): void
  +setPrice(price: float): void
}

class Payment {
  -paymentId: int
  -orderId: int
  -amount: float
  -status: string
  +getPaymentId(): int
  +getOrderId(): int
  +getAmount(): float
  +getStatus(): string
  +setStatus(status: string): void
}

class Address {
  -addressId: int
  -userId: int
  -street: string
  -city: string
  -state: string
  -zipCode: string
  +getAddressId(): int
  +getUserId(): int
  +getStreet(): string
  +getCity(): string
  +getState(): string
  +getZipCode(): string
  +setStreet(street: string): void
  +setCity(city: string): void
  +setState(state: string): void
  +setZipCode(zipCode: string): void
}

class Review {
  -reviewId: int
  -productId: int
  -userId: int
  -rating: int
  -comment: string
  +getReviewId(): int
  +getProductId(): int
  +getUserId(): int
  +getRating(): int
  +getComment(): string
  +setRating(rating: int): void
  +setComment(comment: string): void
}

User --|> Order
User --|> Payment
User --|> Address
Order --|> Payment
Order --|> Product
Product --|> Review
Enter fullscreen mode Exit fullscreen mode
mermaid Article's
30 articles in total
Favicon
LLM + Mermaid: How Modern Teams Create UML Diagrams Without Lucidchart
Favicon
Draw Diagrams in READMEs using Mermaid
Favicon
Diagram as Code with Mermaid
Favicon
Visualizing Cloud Designations with Mermaid
Favicon
Adding Mermaid diagrams to Astro MDX
Favicon
Mermaid Cheat Sheet for Markdown
Favicon
Mermaid Markdown
Favicon
simple mermaid builder in golang: support ER/sequence diagram, pie chart
Favicon
Why mermaid diagrams will be the next big thing in creating diagrams?
Favicon
HueHive diagram generator -Mermaid diagrams using ChatGPT
Favicon
Automating my Blog
Favicon
Technical presentations with Marp and Mermaid
Favicon
Convert YouTube videos into Mind Maps using ChatGPT
Favicon
Mastering Diagrams: A Professional Approach to Enhancing Visuals with ChatGPT and Mermaid
Favicon
Text to diagram
Favicon
Colouring Your Arrow / Link with `linkStyle` in Mermaid Markdown
Favicon
Creando diagramas con ChatGPT y Mermaid js
Favicon
Scaling Diagram Documentation
Favicon
Diagramming Finite State Machines with Mermaid.js
Favicon
Creating SysML Requirement Diagrams in Mermaid.js
Favicon
Creating Timeline Charts with Mermaid.js
Favicon
How to Make Flowcharts with Mermaid.js
Favicon
Mind Maps in Markdown with Mermaid.js
Favicon
Creating Gantt Charts with Markdown and Mermaid.js
Favicon
Mapping User Journeys with Mermaid.js
Favicon
Making Pie (Charts) out of Mermaid.js
Favicon
Illustrating git Branching with Markdown and Mermaid.js
Favicon
Sequence Diagrams in Markdown with Mermaid.js
Favicon
Text-Based Entity Relationship Diagrams with Mermaid.js
Favicon
Creating Class Diagrams with Mermaid.js

Featured ones: