# Hospitality UI Specification — Torbat Food

**Version:** 1.0  
**Date:** 2026-07-26  
**Product:** Torbat Food (Hospitality Platform)

## 1. Product vision

Enterprise hospitality platform supporting cafe, restaurant, fast food, bakery, cloud kitchen, food court, catering, and related formats. UI adapts to enabled bundles; disabled modules are hidden from navigation.

## 2. Design principles

| Principle | Implementation |
|-----------|----------------|
| RTL first | App shell, tables, forms use RTL layout |
| Mobile first | Collapsible sidebar, touch-friendly targets (min 44px) |
| Low cognitive load | Grouped nav, consistent page headers, breadcrumbs |
| Warm & welcoming | Orange hospitality accent (`--hospitality-accent`) |
| Enterprise grade | Real API data, permission/bundle gates, audit export |
| Performance | TanStack Query caching, paginated lists, code-split routes |

## 3. Layout system

- **Root layout:** `HospitalityRootLayout` — AuthGuard + tenant gate
- **Hub (`/hospitality/hub`):** Portal picker without sidebar
- **Management:** `HospitalityPortalShell` — sidebar nav, mobile drawer, dark mode toggle

## 4. Page template (list/CRUD)

Every data page uses `createHospitalityListPage`:

1. Breadcrumb
2. PageHeader (title, description, actions)
3. Search toolbar + pagination + CSV export
4. DataTable with status chips
5. Dialog create/edit, ConfirmDialog delete
6. Loading / empty / error / bundle-disabled states

## 5. Dashboard (Executive)

Widgets wired to live APIs:

- Venues count
- Reservations count
- Open POS tickets
- Active kitchen tickets
- Quick actions (reservations, kitchen, POS, analytics)

## 6. Bundle-gated modules

| Bundle | UI sections |
|--------|-------------|
| `digital_menu` | Menu, categories, items, modifiers, media |
| `qr_menu` / `qr_ordering` | QR menu, ordering, cart, checkout |
| `table_service` / `reservation` | Reservations, queue, guests |
| `pos_lite` / `pos_pro` | POS, register, payments, discounts |
| `kitchen` | Display, queue, preparation |
| `*_connector` | Integration registration pages |
| `analytics` | Reports, snapshots, inventory overview |

## 7. Shared components

From `@/components/ds`: Button, Input, Dialog, Drawer, DataTable, PageHeader, StatCard, Badge, LoadingState, ErrorState, EmptyState, FormField, Select, ConfirmDialog.

Module-specific: `HospitalityTablePage`, `HospitalityStatusChip`, `HospitalityBundleGate`.

## 8. Accessibility

- `aria-label` on search, icon buttons
- Keyboard: hub → management navigation via standard links
- Focus visible on interactive elements (DS defaults)

## 9. API contract

All pages consume `hospitalityApi` → BFF `/api/hospitality` → service `:8009`.

Headers: `Authorization`, `X-Tenant-ID`.

## 10. Supported venue formats

Backend `VenueFormat` enum surfaced in venue create (future): cafe, coffee_shop, restaurant, fast_food, bakery, pastry, ice_cream, juice_bar, cloud_kitchen, food_court, catering, take_away, other.
