fayzfayz sdk
PTEN

← Plugin catalog

plugin-inventory

Beta

@fayz-ai/plugin-inventory

Inventory is the universal organ — a salon counts product, a restaurant counts ingredients, a clinic counts supplies. plugin-inventory is that organ as a plugin: a product catalog, stock entry/exit/history, optional recipes (bill of materials), and a dashboard that surfaces stock value and what's running low. It's scope: universal, so it snaps into any vertical.

Preview of plugin-inventory as the customer sees it

Overview

Inventory and catalog: entries and exits, history, balance per location and specs (recipes). It mounts the /inventory page and dashboard widgets. The recipes, stockLocations and batchTracking (opt-in) modules are toggled by config; the default product types are supply, for sale, intermediate and asset.

On the data side, products are the archetype saas_core.products; the plugin adds extension tables in publicstock_locations, stock_movements, stock_positions, recipes, recipe_ingredients, measurement_units and product_categories — across four migrations (prefix rename, base, recipes, measurement units). Supabase provider with mock fallback.

For AI, it exposes getLowStock (products below their minimum). Status beta / partial capability.

When to use it

  • Track stock entries, exits and balance per location.
  • Model recipes or specs that consume supplies.
  • Get low-stock alerts, including through AI.

Specs

Package@fayz-ai/plugin-inventory
Version0.1.7
Statusbeta
CapabilityPartial capability
Stable channel^0.1.7
Migrations4 migration(s)
FactorycreateInventoryPlugin()

Data model

TableKey columns
plg_inventory_product_categoriesname, parent_id, is_active
plg_inventory_stock_locationsname, description, is_active, unit_id
plg_inventory_stock_movementsproduct_id, quantity, movement_type, unit_cost, total_cost, stock_location_id
plg_inventory_stock_positionsproduct_id, quantity, unit_cost, stock_location_id, batch_number, expiration_date
plg_inventory_recipesname, description, product_id, yield_quantity, yield_unit_id, preparation_time_minutes
plg_inventory_recipe_ingredientsrecipe_id, product_id, quantity, unit_id, display_order, notes
plg_inventory_measurement_unitsname, abbreviation, is_active

Convention: plg_ + tenant_id + RLS. Data model.

AI tools

idmodedescription
inventory.low-stockreadLists products with stock below minimum threshold.

Tools an agent can call against your app. Your app as a data layer.

Integrations

No hosted connector — external providers come in via the connector spine. integrations catalog.

Use this page as a skill. .md of this page is the agent-consumable contract — data model, tools and integrations in a single file an AI reads directly. Preview fayz skill add plugin-inventory is coming soon to install this as a skill. See Skills.

Integrate

Add the plugin to surfaces.admin.plugins in your app's app.manifest.json and run the doctor to validate:

{
  "surfaces": {
    "admin": {
      "plugins": [
        { "id": "inventory", "enabled": true }
      ]
    }
  }
}
npx fayz doctor

fayz doctor checks the manifest against the SDK catalog. See Configuration.