Kitchen Hospitality Platform (KHP) is a Turborepo monorepo that powers a kitchen-focused inventory management system for restaurants and commercial kitchens. It combines a desktop/tablet dashboard with a mobile-first scanner experience to keep stock levels accurate from receiving to service.
apps/web— Next.js kitchen dashboard for managers and expediter stationsapps/pwa— Vite + React mobile barcode scanning Progressive Web App for stock operationspackages/ui— shared React UI components tailored to kitchen workflows and surfacespackages/eslint-config— shared ESLint configurationpackages/typescript-config— shared TypeScript configurationspackages/graphql— shared GraphQL artifacts (optional)
All projects use TypeScript and common tooling.
flowchart LR
subgraph "KHP Applications"
Web[Kitchen Dashboard<br/>apps/web]
PWA[Mobile Barcode Scanner<br/>apps/pwa]
end
subgraph Shared Packages
UI[#64;workspace/ui<br/>Kitchen UI Library]
ESLint[#64;workspace/eslint-config]
TS[#64;workspace/typescript-config]
GQL[packages/graphql<br/>Shared artifacts]
end
Backend[(KHP GraphQL API<br/>https://back.goofykhp.fr/graphql)]
InventoryDB[(Inventory Services<br/>Real-time stock tracking)]
Web --> UI
Web --> ESLint
Web --> TS
PWA --> UI
PWA --> ESLint
PWA --> TS
UI --> ESLint
UI --> TS
Web --> Backend
PWA --> Backend
Backend --> InventoryDB
Web --> InventoryDB
sequenceDiagram
participant Staff as Kitchen Staff
participant Mobile as PWA Scanner
participant API as GraphQL API
participant Inventory as Inventory Services
participant Dashboard as Web Dashboard
Staff->>Mobile: Scan item barcode
Mobile->>API: Submit inventory mutation (introspected schema)
API->>Inventory: Update stock quantities
Inventory-->>Dashboard: Push real-time inventory counts
Dashboard->>Staff: Display alerts and replenishment insights
- Node.js >= 18 (repo uses
npm@11) - Network access to fetch the GraphQL schema on first run
- Camera access with barcode scanning capability on mobile devices for the PWA
- Docker (optional) to build runtime images
npm installOn first run, both apps will generate TypeScript types from the KHP GraphQL schema. Ensure you have network access for schema introspection and a valid API token when working against protected environments.
apps/web— create.env(see.env.example):NEXT_PUBLIC_API_URL(e.g.http://localhost:8000or productionhttps://back.goofykhp.fr/graphql)
apps/pwa—.envexpected:VITE_API_URL(e.g.http://localhost:8000or productionhttps://back.goofykhp.fr/graphql)VITE_PROJECT_NAME(e.g.KHP-front)VITE_ENABLE_CAMERA(set totrueto prompt for camera/barcode access)
Start everything with Turborepo:
npm run devRun a specific app:
npm run dev:web # Next.js
npm run dev:pwa # Vite (host exposed)By default, Web runs at http://localhost:3000 and PWA at http://localhost:5173.
Both apps perform schema introspection against https://back.goofykhp.fr/graphql before starting to ensure mutations and queries stay in sync with the backend contract. The dashboard focuses on monitoring and reporting, while the mobile scanner optimizes receiving, counts, and station-level adjustments.
npm run build— build all apps and packagesnpm run build:web/npm run build:pwa— targeted buildsnpm run lint— lint the entire workspacenpm run check-types— TypeScript checksnpm run format— Prettier (*.ts, *.tsx, *.md)
Dockerfiles are provided for both apps. The Makefile includes shortcuts and can be wired into CI/CD to build and publish deployable images for each surface:
# Build and start both apps
make build-and-start
# Web only
make build-web
make start-web # maps host 5432 -> container 3000
# PWA only
make build-pwa
make start-pwa # maps host 5433 -> container 80flowchart TB
subgraph Host
H1[5432 -> Web Container:3000]
H2[5433 -> PWA Container:80]
end
- Git hooks managed by Lefthook:
npx lefthook install- Commit format:
[KHP-123] feat(scope): messageenforced byverify-commit-msg.sh. - Prefer colocating kitchen-specific business logic within feature folders (
inventory,recipes, etc.) and sharing reusable primitives viapackages/uiorpackages/graphql. - Keep schema changes versioned by re-running code generation (
npm run devorturbo run introspect) before submitting merge requests.
apps/web— seeapps/web/README.mdapps/pwa— seeapps/pwa/README.mdpackages/ui— seepackages/ui/README.mdpackages/eslint-config— seepackages/eslint-config/README.mdpackages/typescript-config— seepackages/typescript-config/README.mdpackages/graphql— seepackages/graphql/README.md