# plugin-orders

`@fayz-ai/plugin-orders` · beta · Partial capability

Orders are the heartbeat of an operations business. plugin-orders gives a restaurant — or any food vertical — a real-time order board: dine-in, takeout, and delivery flowing across a kanban, with history behind it. It's the surface the floor staff actually live in.

## Overview

Orders for restaurant operations: a kanban of orders by status, with dine-in, takeout and delivery sources. It mounts the `/orders` page. It's a **vertical** plugin (`scope: 'vertical'`) and declares a dependency on `plugin-menu` for the item catalog.

It packages no migrations. By default it runs on an in-memory mock provider and, to persist on the Fayz platform, uses `createFayzOrdersProvider` with configurable table names (`ordersTable`, `orderItemsTable`). Menu-item and staff lookups are injected by the app. The `stable` channel already pins `^0.3.0`.

For AI, it exposes `getOrdersSummary`, `getActiveOrders` and `createOrder`. Status **beta / partial capability**.

## When to use it

- Restaurant operations that need to follow orders in real time.
- Split orders by dine-in, takeout and delivery on a kanban.
- Pair it with plugin-menu (a declared dependency) for the items.

## Specs

- **Package:** `@fayz-ai/plugin-orders`
- **Version:** 0.3.0
- **Status:** beta
- **Capability:** Partial capability
- **Product type:** Restaurant / food
- **Stable channel:** `^0.3.0`
- **Migrations:** none
- **Factory:** `createOrdersPlugin()`

## Data model

No tables of its own — this plugin uses the core / archetype library (same rule: tenant_id + RLS)..

## AI tools

| id | mode | description |
| --- | --- | --- |
| `orders.today-summary` | read | Returns order count, revenue, and average ticket for today or a given period. |
| `orders.active-orders` | read | Lists currently active (non-completed) orders. |
| `orders.create-order` | persist | Creates a new restaurant order with items. |

## Integrations

No hosted connector — external providers come in via the connector spine (`@fayz-ai/core`).

## Integrate

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

```json
{ "surfaces": { "admin": { "plugins": [ { "id": "orders", "enabled": true } ] } } }
```

```bash
npx fayz doctor
```
