Templates / erDiagram
Data warehouse star schema
A fact table surrounded by dimension tables -- the standard star schema for analytics.
Preview
Mermaid 11 renderer
Rendering preview...
Mermaid source
erDiagram
erDiagram
FACT_ORDERS }o--|| DIM_CUSTOMER : "ordered by"
FACT_ORDERS }o--|| DIM_PRODUCT : "line item"
FACT_ORDERS }o--|| DIM_DATE : "ordered on"
FACT_ORDERS {
int order_id PK
int customer_key FK
int product_key FK
int date_key FK
decimal revenue
int quantity
}
DIM_CUSTOMER {
int customer_key PK
string segment
string region
}
DIM_PRODUCT {
int product_key PK
string category
string brand
}
DIM_DATE {
int date_key PK
date calendar_date
int fiscal_quarter
}More templates
flowchartArchitecture
Microservices architecture
A service map with an API gateway, core services, and shared infrastructure. A solid starting point for README architecture sections.
sequenceDiagramProcess
User login sequence
A login flow with token issuance and a failure branch. Useful for documenting auth endpoints and session behavior.
stateDiagram-v2Process
Order state machine
Lifecycle states for an e-commerce order, from creation to fulfillment, with cancellation and refund paths.