@fayz-ai/orders
The orders bounded context: what an order is, how it moves through its kind's flow, where it is stored, and the UI pieces over it.
Status: beta — extracted from @fayz-ai/plugin-orders, which composes it and still exports every name it had. Pre-1.0: minor APIs may change before 1.0.
Built to the shape in docs/platform/PATTERNS.md. There is no entry file: each module is imported by its path.
Install
npm install @fayz-ai/orders
Modules
| Import | What it holds |
|---|---|
@fayz-ai/orders/domain/order | RestaurantOrder, RestaurantOrderItem, OrdersSummary and the pure rules (getNextStatus, canMoveTo, boardColumnFor, summarizeOrders, commercialColumnOf…) |
@fayz-ai/orders/data/provider | OrdersDataProvider, the repository port |
@fayz-ai/orders/data/supabase | createSupabaseOrdersProvider over the core order archetype (v_orders), read-only unless given writes |
@fayz-ai/orders/data/platform | createFayzOrdersProvider over the Fayz data API |
@fayz-ai/orders/data/mock | createMockOrdersProvider, the same contract in memory |
@fayz-ai/orders/store | createOrdersStore(provider, hooks): lists, the active board, lifecycle events and hooks |
@fayz-ai/orders/components/* | presentational pieces: OrderBoardCard, CommercialOrderCard, OrderStatusDot, PaymentStateBadge |
The screens stay in @fayz-ai/plugin-orders: they compose the shell's order list, detail rail and record picker,
which a domain package does not import.
import { getNextStatus } from '@fayz-ai/orders/domain/order'
import { createMockOrdersProvider } from '@fayz-ai/orders/data/mock'
import { createOrdersStore } from '@fayz-ai/orders/store'
const store = createOrdersStore(createMockOrdersProvider())
await store.getState().fetchActiveOrders()
Words used here are defined in GLOSSARY.md.