← Back to templates
Inventory
operationsTrack products, stock levels, and movements across locations.
Collections
Products
Product catalog
Schema Fields
name:stringsku:stringcategory:stringunit_cost:numberunit_price:numbermin_stock:numberactive:boolean
Stock Movements
Inbound and outbound stock changes
Schema Fields
type:stringquantity:numberreason:stringreference:stringtimestamp:string
Locations
Warehouses and storage locations
Schema Fields
name:stringaddress:stringtype:stringcapacity:number
Relationships
stock_movements
for_product
productsMovement for productstock_movements
at_location
locationsMovement at locationproducts
stored_at
locationsProduct stored at locationQuick Start
Create the collections using the Rekor CLI:
rekor collections upsert products --workspace my-inventory --schema @products.jsonFull Schema (JSON)
Copy the complete template definition:
{
"collections": [
{
"id": "products",
"name": "Products",
"description": "Product catalog",
"icon": "box",
"color": "#8b5cf6",
"json_schema": {
"type": "object",
"required": [
"name",
"sku"
],
"properties": {
"name": {
"type": "string"
},
"sku": {
"type": "string"
},
"category": {
"type": "string"
},
"unit_cost": {
"type": "number",
"minimum": 0
},
"unit_price": {
"type": "number",
"minimum": 0
},
"min_stock": {
"type": "number",
"minimum": 0
},
"active": {
"type": "boolean",
"default": true
}
}
}
},
{
"id": "stock_movements",
"name": "Stock Movements",
"description": "Inbound and outbound stock changes",
"icon": "arrow-right-left",
"color": "#22c55e",
"json_schema": {
"type": "object",
"required": [
"type",
"quantity"
],
"properties": {
"type": {
"type": "string",
"enum": [
"inbound",
"outbound",
"adjustment",
"transfer"
]
},
"quantity": {
"type": "number"
},
"reason": {
"type": "string"
},
"reference": {
"type": "string"
},
"timestamp": {
"type": "string",
"format": "date-time"
}
}
}
},
{
"id": "locations",
"name": "Locations",
"description": "Warehouses and storage locations",
"icon": "map-pin",
"color": "#f59e0b",
"json_schema": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"address": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"warehouse",
"store",
"dropship"
]
},
"capacity": {
"type": "number"
}
}
}
}
],
"relationships": [
{
"type": "for_product",
"source": "stock_movements",
"target": "products",
"description": "Movement for product"
},
{
"type": "at_location",
"source": "stock_movements",
"target": "locations",
"description": "Movement at location"
},
{
"type": "stored_at",
"source": "products",
"target": "locations",
"description": "Product stored at location"
}
]
}