Templates / erDiagram
E-commerce data model
A compact entity-relationship model for customers, orders, and products with keys and attributes.
Preview
Mermaid 11 renderer
Rendering preview...
Mermaid source
erDiagram
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ ORDER_ITEM : contains
PRODUCT ||--o{ ORDER_ITEM : "appears in"
CUSTOMER {
int id PK
string email
string full_name
datetime created_at
}
ORDER {
int id PK
int customer_id FK
string status
decimal total_amount
}
ORDER_ITEM {
int id PK
int order_id FK
int product_id FK
int quantity
}
PRODUCT {
int id PK
string sku
string title
decimal unit_price
}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.