@fayz-ai/plugin-inventory 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Faya Labs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # @fayz-ai/plugin-inventory
2
+
3
+ > Stock that actually ties to your business — products, movements, recipes, and low-stock alerts.
4
+
5
+ [![npm](https://img.shields.io/npm/v/@fayz-ai/plugin-inventory.svg)](https://www.npmjs.com/package/@fayz-ai/plugin-inventory)
6
+ [![license](https://img.shields.io/npm/l/@fayz-ai/plugin-inventory.svg)](https://github.com/FayaLabs/fayz-sdk/blob/main/LICENSE)
7
+
8
+ 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.
9
+
10
+ It ships real data out of the box: a Supabase provider with an automatic mock fallback, so a fresh app demos immediately and a configured one persists for real. Recipes, stock locations, and batch tracking are opt-in modules; product types, currency, and labels are configurable. The host dashboard gets inventory KPI widgets, and the AI assistant can answer "what's running low?" The intent: stop rebuilding stock control per app — compose it from one plugin into a real SaaS.
11
+
12
+ ## What's inside
13
+ - **Navigation + page** — an `/inventory` surface: product catalog, stock entry/exit, movement history, and recipes
14
+ - **Real data, zero setup** — a Supabase provider that safely falls back to a mock provider, or inject your own `InventoryDataProvider`
15
+ - **Dashboard widgets** — stock-value KPI (headline on the home), plus total-products, low-stock, out-of-stock KPIs and a recent-activity panel
16
+ - **Opt-in modules** — `recipes` and `stockLocations` (on by default), `batchTracking` (off by default)
17
+ - **AI tool** — `getLowStock` (products below minimum threshold), with vertical-aware prompt suggestions
18
+ - **Declared features, settings + i18n** — registers `inventory` (and `inventory.recipes`) features, a general settings tab, and bundled locales
19
+
20
+ ## Install
21
+ ```bash
22
+ npm install @fayz-ai/plugin-inventory
23
+ ```
24
+ Peer deps: `@fayz-ai/core`, `@fayz-ai/ui`, `@fayz-ai/saas` (+ react, react-dom).
25
+
26
+ ## Usage
27
+ ```tsx
28
+ import { defineSaas } from '@fayz-ai/saas'
29
+ import { createInventoryPlugin } from '@fayz-ai/plugin-inventory'
30
+
31
+ export const app = defineSaas({
32
+ // ...
33
+ plugins: [
34
+ createInventoryPlugin({
35
+ modules: { recipes: true, stockLocations: true, batchTracking: false },
36
+ currency: { code: 'BRL', locale: 'pt-BR', symbol: 'R$' },
37
+ locations: [{ id: 'hq', name: 'Main', isHQ: true }],
38
+ // dataProvider: myProvider, // optional — defaults to Supabase + mock fallback
39
+ }),
40
+ ],
41
+ })
42
+ ```
43
+
44
+ Options: `modules`, `labels`, `productTypes`, `currency`, `navPosition`, `navSection`, `scope`, `verticalId`, `dataProvider`, `locations`.
45
+
46
+ ## Part of the Fayz SDK
47
+ A composable, universal plugin for the Fayz SDK. Underpins `@fayz-ai/plugin-menu` recipes and `@fayz-ai/plugin-shop` stock — pair them for a full order-to-cash picture.
48
+
49
+ ## Roadmap & contributing
50
+ Built and evolving in the open. See the [Fayz SDK roadmap](../../docs/ROADMAP.md#plugin-inventory) for current gaps, missing features, and good first issues.
@@ -1 +1 @@
1
- {"version":3,"file":"supabase.d.ts","sourceRoot":"","sources":["../../src/data/supabase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AA4DpD,wBAAgB,+BAA+B,IAAI,qBAAqB,CAySvE"}
1
+ {"version":3,"file":"supabase.d.ts","sourceRoot":"","sources":["../../src/data/supabase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AA4DpD,wBAAgB,+BAA+B,IAAI,qBAAqB,CA2SvE"}