@fayz-ai/plugin-orders
v0.3.0
Published
Fayz SDK — plugin-orders plugin
Readme
@fayz-ai/plugin-orders
A live order board for restaurants — kanban, history, and AI that knows what's cooking.
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.
It's built provider-first: a MenuDataProvider-aware orders flow that ships with a mock provider for instant demos and a createFayzOrdersProvider for real data. Order sources, currency, and labels are all configurable, and the host AI assistant can read today's summary, list active orders, and even create new ones. The point isn't a one-off POS — it's a plugin you snap into a defineSaas app next to menu and inventory to compose a complete restaurant SaaS.
What's inside
- Navigation + page — an
/orderssurface with a kanban board (OrderKanbanView) and order history - Pluggable data — inject an
OrdersDataProvider, usecreateFayzOrdersProvider, or fall back to the bundled mock provider - Configurable order sources — defaults to dine-in and takeout; delivery/takeout modules toggle on or off
- AI tools —
getOrdersSummary(count, revenue, average ticket),getActiveOrders(filter by kind/status), andcreateOrder(persist a new order with items) - Settings + i18n — a settings panel for order sources and preferences, plus bundled locales
- Hooks —
onOrderCompletedcallback, plusmenuItemLookup/staffLookupentity lookups
Install
npm install @fayz-ai/plugin-ordersPeer deps: @fayz-ai/core, @fayz-ai/saas, @fayz-ai/sdk (+ react, react-dom). Declares a dependency on the menu plugin.
Usage
import { defineSaas } from '@fayz-ai/saas'
import { createOrdersPlugin, createFayzOrdersProvider } from '@fayz-ai/plugin-orders'
export const app = defineSaas({
// ...
plugins: [
createOrdersPlugin({
modules: { delivery: true, takeout: true },
currency: { code: 'BRL', locale: 'pt-BR', symbol: 'R$' },
dataProvider: createFayzOrdersProvider({ /* ... */ }),
onOrderCompleted: async (order) => { /* fire a webhook, print, etc. */ },
}),
],
})Options: modules, labels, currency, navPosition, navSection, scope, verticalId, dataProvider, menuItemLookup, staffLookup, onOrderCompleted, orderSources.
Part of the Fayz SDK
A composable plugin for the Fayz SDK. Depends on @fayz-ai/plugin-menu for items, and pairs with @fayz-ai/plugin-inventory and @fayz-ai/plugin-shop for a full food-to-cash flow.
Roadmap & contributing
Built and evolving in the open. See the Fayz SDK roadmap for current gaps, missing features, and good first issues.
