# Hospitality Module (Torbat Food)

**Commercial product:** Torbat Food  
**Route prefix:** `/hospitality`  
**Backend:** `hospitality-service` port 8009  
**BFF:** `/api/hospitality/*`

## Structure

```
modules/hospitality/
├── components/       # Portal shell, CRUD factory, bundle gate
├── constants/        # Navigation, permissions
├── design-system/    # Tokens, table page, status chips
├── features/         # Page implementations (54 routes)
├── hooks/            # Capabilities, lookups
├── pages/            # Shared loaders/errors
├── services/         # hospitality-api.ts
└── types/            # DTO-aligned types
```

## Architecture

- Thin routes in `app/hospitality/**/page.tsx` re-export from `features/`
- Business logic lives exclusively under `modules/hospitality/`
- Shared UI from `@/components/ds` (design system)
- TanStack Query keys: `["hospitality", tenantId, ...]`

## Capabilities

Navigation and pages respect `GET /capabilities` feature flags and bundle licensing via `HospitalityBundleGate`.

## Scripts

```bash
node scripts/gen-hospitality-api.mjs      # Regenerate API client
node scripts/scaffold-hospitality-module.mjs  # Regenerate routes + feature stubs
```

## Related

- [hospitality-ui-specification.md](../docs/hospitality-ui-specification.md)
- [hospitality-routing-map.md](../docs/hospitality-routing-map.md)
