@fayz-ai/plugin-menu
v0.3.0
Published
Fayz SDK — plugin-menu plugin
Downloads
768
Readme
@fayz-ai/plugin-menu
The menu engine behind every food vertical — items, categories, modifiers, 86'd in one tap.
A menu is the product catalog of a food business — and it changes by the hour. plugin-menu is the management surface for that: items, categories, allergens, and modifiers, with sold-out toggles that take effect instantly. It's the foundation the orders flow reads from, so the two compose into a working restaurant.
It's provider-first by design. Ship a demo on the bundled mock provider, then drop in createFayzMenuProvider (or your own MenuDataProvider) for real data. Modifiers and delivery pricing are opt-in modules, labels and currency are configurable, and the host AI can list items and flip availability by name. The intent: menu management shouldn't be a bespoke build — it's a plugin you snap into a defineSaas app to compose a real food SaaS.
What's inside
- Navigation + page — a
/menusurface with a menu manager (MenuManagerView) for items and categories - Pluggable data — inject a
MenuDataProvider, usecreateFayzMenuProvider, or fall back to the bundled mock provider - Opt-in modules —
modifiers(on by default) anddeliveryPricing(off by default) - AI tools —
listMenuItems(filter by category/status) andtoggleMenuItemAvailability(mark available or sold out by name) - Settings + i18n — a settings panel for categories, allergens, and modifiers, plus bundled locales
- Public domain types — exported so any host can implement its own
MenuDataProvider
Install
npm install @fayz-ai/plugin-menuPeer deps: @fayz-ai/core, @fayz-ai/ui, @fayz-ai/saas, @fayz-ai/sdk (+ react, react-dom).
Usage
import { defineSaas } from '@fayz-ai/saas'
import { createMenuPlugin, createFayzMenuProvider } from '@fayz-ai/plugin-menu'
export const app = defineSaas({
// ...
plugins: [
createMenuPlugin({
modules: { modifiers: true, deliveryPricing: false },
currency: { code: 'BRL', locale: 'pt-BR', symbol: 'R$' },
dataProvider: createFayzMenuProvider({ /* ... */ }),
}),
],
})Options: modules, labels, currency, navPosition, navSection, scope, verticalId, dataProvider, menuItemLookup.
Part of the Fayz SDK
A composable plugin for the Fayz SDK. The catalog @fayz-ai/plugin-orders reads from — pair both with @fayz-ai/plugin-inventory to tie menu items back to stock.
Roadmap & contributing
Built and evolving in the open. See the Fayz SDK roadmap for current gaps, missing features, and good first issues.
