NextFire main logoNextFire
Docs X
Introduction
Get Started
Clone repo
Run the app
Configuration
Firebase
Create firebase app
Authentication
Firestore
Storage
Functions
Global configuration
Public
Site config
Payments
Stripe
One time
Subscriptions
Webhooks
Usage
Project structure
Static pages
Public pages
Protected pages
Auth
Client auth
Server auth
Data fetching
Firestore client
Firestore admin
Functions
Storage
Content
Blog
Documentation
Components
Markdown
Cards
Diagrams
Filetree
Lists
Maths
Notes
Steps
Table
Tabs
Public
Deep
Deeper
Even deeper
  1. Markdown
  2. Diagrams

Diagrams

Add various diagram types, including flowcharts, decision trees and entity-relationship diagrams.

Diagrams are powerful tools for visualizing processes, relationships, and decisions. This section showcases different types of diagrams created using Mermaid, complete with examples and reusable code snippets to integrate into your projects.

Flowchart

A flowchart represents a sequence of steps or processes in a visual format. Use this diagram to map workflows, decision-making processes, or operational flows.

<Mermaid
  chart={\`
    graph TD;
    Start --> Task1;
    Task1 --> Task2;
    Task2 --> End;
  \`}
/>

Decision Tree

Decision trees illustrate choices and possible outcomes, making them ideal for decision-making workflows or processes involving multiple paths.

<Mermaid
  chart={\`
    graph TD;
    A[Start] --> B{Is it raining?};
    B -->|Yes| C[Take an umbrella];
    B -->|No| D[Enjoy the weather];
    C --> E[Go outside];
    D --> E;
  \`}
/>

Entity-Relationship Diagram

Entity-relationship diagrams (ERDs) are used to model relationships between entities in a system. They are widely used in database design and system architecture planning.

<Mermaid
  chart={\`
    erDiagram
    CUSTOMER ||--o{ ORDER : places
    ORDER ||--|{ LINE-ITEM : contains
    PRODUCT ||--o{ LINE-ITEM : "included in"
    CUSTOMER {
        string name
        string email
    }
    ORDER {
        int orderNumber
        date orderDate
    }
    LINE-ITEM {
        int quantity
        float price
    }
    PRODUCT {
        int productId
        string name
        float price
    }
  \`}
/>

Each of these diagrams serves a specific purpose and Mermaid makes it easy to generate them dynamically. Feel free to experiment with the provided code snippets and adapt them to your needs.

CardsFiletree

On this page

FlowchartDecision TreeEntity-Relationship Diagram

Content

FeedbackEdit page

© 2025 Ship IT.

Rubix Studios logo