Class Diagrams
What are Class Diagrams?
Mermaid's class diagrams help you visualize data structures and their relationships in your projects. For analytics engineers, they're particularly useful for documenting data models, transformation logic, and system architectures.
Creating Your First Class Diagram
From the Code IDE, Click Apps and Agents from the lefthand panel
Select Mermaid. Paradime will automatically start a new mermaid project
In the terminal that appears, use the arrow keys to select "Class Diagrams"
A new
classDiagram.mmd
file will be created in your editor with this starter template:
Click the eye icon (👁️) in the top right corner of your Mermaid file to preview the diagram
Edit and update your
.mmd
file as needed - the preview will update automatically
Diagram Syntax Guide
Class Structure
A class diagram represents data objects and their relationships. Each class shows:
The class name
Its attributes (properties)
Its methods (operations)
Basic Syntax
Access Levels
Show visibility with these symbols:
+
: Public access-
: Private access#
: Protected access~
: Internal access
Connections
Show relationships between classes:
Common relationships:
Parent-child:
<|--
Contains:
*--
Uses:
-->
Optional:
o--
Data Team Examples
Data Models
Transformation Pipeline
Best Practices
Name classes clearly and consistently
Show only relevant attributes and methods
Group related classes together
Add notes for complex relationships
Keep diagrams focused on one aspect of your system
Additional Resources
For more syntax options and advanced features, visit the official Mermaid documentation
Last updated