ER Diagram template · local export
SaaS Multi-Tenant Schema Mermaid Template
ER diagram for organizations, members, roles, projects, subscriptions, and audit logs. Edit the code below, choose a publish preset, then export without signup, watermark, or cloud upload.
SaaSmulti-tenantRBAC
Paste or edit Mermaid code
Replace the sample below, or load another example.
Load example
Preparing the local renderer without uploading your diagram.Preparing editor…
Live previewSample preview · Clean Docs
Preparing local editor…
Render & export
Export controls activate after your diagram renders locally.
ERD
Mode
Default renderNative MermaidOptimized exportStyled download
Export style
Clean DocsGitHub READMETransparent DocsWarm Editorial✦ ProWhiteboard Sketch✦ ProAurora Noir✦ ProBlueprint✦ ProChampagne✦ ProEmerald Suite✦ ProEditorial✦ Pro
Scale
1x2x4x
Or exact width, e.g. 1200px wide
Output: White · comfortable padding
Size: calculated after render
Filename: mermaid-erd-white-2x.png
When to use the SaaS Multi-Tenant Schema template
A multi-tenant SaaS data model built around the ORGANIZATION: users join organizations as MEMBER rows with a role, organizations own PROJECTs and hold exactly one SUBSCRIPTION, and every PROJECT records entries into AUDIT_LOG. The cardinality notation (||--o{ and ||--||) encodes which relationships are optional versus required.
- •Designing or reviewing the core schema of a B2B SaaS product where every resource belongs to a tenant.
- •Aligning backend and data teams on how membership, plan tiers, and audit trails relate to organizations.
- •Planning a migration where you need to show how user identity stays separate from organization membership.
Template code
The full Mermaid source for this template — copy it into any Mermaid-compatible tool, or edit and export it in the editor above.
erDiagram
ORGANIZATION ||--o{ MEMBER : has
USER ||--o{ MEMBER : joins
ORGANIZATION ||--o{ PROJECT : owns
ORGANIZATION ||--|| SUBSCRIPTION : bills
MEMBER }o--|| ROLE : assigned
PROJECT ||--o{ AUDIT_LOG : records
ORGANIZATION {
string id
string name
string plan
}
USER {
string id
string email
}
MEMBER {
string id
string status
}
ROLE {
string id
string name
}How to customize this template
- •Add invitation or seat-count fields to MEMBER if your billing model is per-seat, or a seats column on SUBSCRIPTION.
- •Extend PROJECT with a soft-delete timestamp if your product needs archiving, and mirror it in AUDIT_LOG queries.
- •Rename the plan attribute on ORGANIZATION or move tier limits onto SUBSCRIPTION if plan data lives in billing.
- •Split ROLE into per-organization roles by adding an ORGANIZATION reference if you outgrow global roles.