@porulle/plugin-pos-restaurant
v0.6.0
Published
Restaurant layer on top of @porulle/plugin-pos: tables, floor zones, optional modifiers and KDS, checklists, alerts, recipes (food BOM), and analytics.
Readme
@porulle/plugin-pos-restaurant
Restaurant layer on top of @porulle/plugin-pos: tables, floor zones, optional modifiers and KDS, checklists, alerts, recipes (food BOM), and analytics.
Install
bun add @porulle/plugin-pos @porulle/plugin-pos-restaurantAdd to commerce.config.ts:
import { posPlugin } from "@porulle/plugin-pos";
import { posRestaurantPlugin } from "@porulle/plugin-pos-restaurant";
export default defineConfig({
plugins: [posPlugin(), posRestaurantPlugin()],
});(posRestaurantPlugin declares requires: ["pos"].)
Add to drizzle.config.ts:
schema: [
"./node_modules/@porulle/plugin-pos-restaurant/src/schema.ts",
// include plugin-pos schema as well
],What it does
Adds restaurant schema (modifiers, tables, KDS, checklists, alerts, recipes/combos/menu availability, P&L, favorites). Modifier and KDS route groups mount only when the corresponding options are enabled.
Routes exposed
/pos/restaurant/tables— CRUD tables, zones, assign/clear/transfer, layout/pos/restaurant/modifier-groups(+/pos/restaurant/modifier-options) — whenenableModifiers/pos/restaurant/kds— stations, tickets, transitions — whenenableKDS/pos/restaurant/checklists,/pos/restaurant/alerts,/pos/restaurant/recipes,/pos/restaurant/analytics— operational and reporting endpoints (see route files for full paths)
Hooks
Emitted: none.
Consumed: cart.beforeAddItem — validates modifier selections when enableModifiers. checkout.afterCreate — for POS transactions with table assignments, moves tables to cleaning and clears assignments (see buildTableClearOnCompleteHook).
MCP tools
restaurant_tables—list,set_status,transferrestaurant_kds—list_tickets,transition,list_zones
Configuration options
POSRestaurantPluginOptions: enableKDS, enableTips, enableModifiers, kdsAlertMinutes.
License
MIT
