07 — Inventory

Items, variations, ledger, domains, vendors

CEO Summary

Inventory enables businesses to track stock across multiple domains (retail, kitchen), manage purchase orders, and integrate with POS for consumption. Business value: Reduces waste, enables accurate COGS. Key metrics: Stock accuracy, low-stock alerts, PO fulfillment. If this breaks: Stock levels wrong; POS may sell out-of-stock items.

Overview

Multi-domain inventory with items, variations, ledger, stock levels, vendors, purchase orders.

Item Structure

Model: inventoryItem.model.js — InventoryItems

Types: standard, matrix, lot_matrix, kit, serialized, non_inventory, weighted

Fields: name, sku, barcode, itemType, variations (JSON), price, cost, trackInventory, isConsumable (KDS), domain

Routes

inventory, inventory.items, inventory.domains, inventory.ledger, inventory.rules, inventory-management

Ledger Types

RECEIVE, ADJUST, TRANSFER, BREAK_CASE, KIT_BUILD_IN/OUT, etc.

Barcode Scanning

Frontend: frontend/src/components/BarcodeScanInput.jsx — keyboard-wedge and scanner input; used in POS and inventory flows.

Tenant-first: Scan → match SKU/barcode on tenant InventoryItems → open item or add to cart. Data lives on the tenant’s items (barcode / SKU fields).

Platform Product Catalog (Master DB — Enrichment)

Table: platform_product_catalog on the master database (see 02 — Databases). Normalized GTIN key, title, brand, description, image URL, JSON attributes.

API: GET /api/platform-catalog/lookup?barcode=... — authenticated tenant session; returns metadata when a row exists and is active.

Inventory UI: ItemsPage.jsx — if a scan finds no tenant item, the app calls the lookup and opens ItemWizardSimple with prefilled name, description, brand, barcode, optional image.

Creating items: POST /api/inventory/items accepts barcode on create (persisted on InventoryItems).

Boundary: Tenant DB remains source of truth for stock and pricing; the platform catalog is an enrichment layer for unknown scans.

Operator curation: Master Admin UI /master-admin/platform-catalog and APIs under /api/master-admin/platform-catalog — see 24 — Master Admin.

Frontend Pages

ItemsPage, StockOverview, StockCounts, PurchaseOrders, Vendors, ItemWizardSimple, ItemDetailModal