Templates / erDiagram
Inventory reservation data model
Tracking on-hand inventory per warehouse and reserving quantities against open orders.
Preview
Mermaid 11 renderer
Rendering preview...
Mermaid source
erDiagram
erDiagram
PRODUCT ||--o{ INVENTORY_ITEM : tracks
WAREHOUSE ||--o{ INVENTORY_ITEM : stores
ORDER ||--o{ RESERVATION : creates
INVENTORY_ITEM ||--o{ RESERVATION : "reserved by"
PRODUCT {
int id PK
string sku
}
WAREHOUSE {
int id PK
string region
}
INVENTORY_ITEM {
int id PK
int product_id FK
int warehouse_id FK
int quantity_on_hand
}
RESERVATION {
int id PK
int order_id FK
int inventory_item_id FK
int quantity
}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.