Skip to main content
You build it by describing what you want to an agent through the Zite MCP; the code below is what it generates.

Describe the app

Data model

Two tables: Products, and StockMovements linked to products — an append-only log so every quantity change is auditable. Field/table names become SDK names in code (StockMovementszite.StockMovements, “SKU” → sku); every table also has a system createdAt you can sort on. See Databases.

Workflows

One file per workflow in src/api/. Listing supports a category filter, a name search, and an exact-SKU lookup (the last powers scan-to-find):
Adjusting stock does two writes — it appends a StockMovements record (the audit trail) and updates the product’s quantity. Linked-record values are an array of ids:
Add workflows, then run npx zitejs generate so the typed frontend client picks them up. See Workflows.

Frontend

A searchable list with a low-stock badge and an inline Adjust button per product:
AdjustStockDialog collects a signed delta and a reason, then calls adjustStock.

Permissions

Everyone on the team can read and write. Grant the built-in All team members role full access to both tables:
defaultPolicy: "deny" locks everything down; these two rules open both tables to the whole team. See the permissions model and file schema.

Scan-to-find & low-stock alerts

  • Scan a barcode to jump to a product — drop in the camera scanner and look the scanned SKU up through listProducts({ sku }). See the Barcode scanning recipe.
  • Alert the team when stock runs low — add a schedule to a workflow that counts low products and notifies the team daily. See Scheduled jobs.

Publish

Ask the agent to Publish the app. Internal apps go live to your team; external apps get a zite.so URL with sign-in. See Publishing.