Turbo + pnpm workspace for the CaterKing multi-tenant kitchen operations suite. The repo hosts every Next.js surface, shared libraries, Supabase schema, and operational docs referenced in the blueprint set.
CaterKing is a comprehensive multi-tenant kitchen operations platform designed to streamline task management, recipe handling, and real-time coordination across PrepChef mobile apps, Admin CRM dashboards, and wall-mounted display kiosks. Built with Next.js, Supabase, and modern web technologies, it enables efficient kitchen workflows through intelligent task matching, media-rich recipes, and automated observability.
Key features include:
- Real-time task assignment and completion tracking
- Recipe management with media uploads and scaling
- Multi-tenant architecture with row-level security
- Progressive Web App capabilities for offline operation
- Automated CI/CD with feature flag rollouts
- Comprehensive monitoring and rollback procedures
- Node.js 20.10+
- pnpm 10.16+ (managed via Corepack)
- Supabase CLI (
npm i -g supabase) for local database + migrations - Doppler CLI for secrets management (
brew install dopplerhq/cli/doppleror download binary) - Flagsmith account + API key for feature flag toggles
- Optional: GitHub CLI + Vercel CLI for deployments
Ensure you have Supabase, Doppler, and Flagsmith project access before attempting local auth or realtime features.
-
Clone and Install Dependencies
git clone <repository-url> cd caterking-platform pnpm install
-
Configure Environment Secrets
# Set up Doppler for secrets management doppler run -- pnpm dev:prepchef -
Start Development Server
pnpm dev:prepchef # PrepChef app pnpm dev:admin-crm # Admin CRM (when available) pnpm dev:display # Display kiosk (when available)
-
Run Quality Checks
pnpm lint # ESLint across workspace pnpm typecheck # TypeScript validation pnpm test # Unit tests with Vitest pnpm build # Production build verification
- Use
turbo run lint --dryto validate script wiring without executing linters. - Filter commands to specific packages:
pnpm build --filter=@caterkingapp/prepchef - Access Storybook for component development:
pnpm storybook - Run E2E tests:
pnpm test:e2e
Node 20.10+ and pnpm 10.16.1 are enforced via
package.jsonengines/packageManager--keep Corepack enabled so every contributor runs the same versions.
- Node.js: Use v20.10.0 or newer (LTS) to align with Supabase CLI and Next.js 15 runtime guarantees.
- pnpm: Corepack will download pnpm
10.16.1, matching the repo-widepackageManagerpin for deterministic lockfiles. - Flagsmith placeholder config: The single
FLAGS_API_KEYenv var is injected by Doppler; for now point it at the sharedprep.devenvironment until per-env configs are created. - Doppler:
doppler run -- pnpm dev:prepchef(or any pnpm command) loads Supabase/Flagsmith tokens without local.envfiles. Use Doppler projectsck-dev,ck-stg,ck-prodonce templates land.
Turbo stores cache artifacts in .turbo/ and respects remote caching when configured. While features are stubbed, you can still validate the pipeline:
- Run
turbo run lint --dryafter editing any package scripts to ensure Turbo can walk the dependency graph without executing heavyweight tasks. - Run
turbo run lint test build --filter=@caterkingapp/prepchef(or a library package) to warm caches; reruns pull from.turboso only changed files re-execute. - If caches drift, nuke
.turboand rerun the commands--never commit.turboartifacts.
apps/ # Next.js applications (PrepChef bootstrapped, more coming)
libs/ # Shared UI + domain modules (ui scaffolded)
supabase/ # Schema, migrations, seeds (to be populated in I1.T2+)
api/ # OpenAPI specs + lint config
docs/ # Architecture, ADRs, diagrams
tests/ # Playwright + smoke fixtures (future)
tooling/ # CLI scripts, GitHub workflows
- Component Overview: Visual breakdown of apps, shared libraries, Supabase services, and external infrastructure (PlantUML).
- Use Doppler to materialize local env files:
doppler run -- supabase startonce templates land. - Supabase service role + anon keys should be injected at runtime; never commit
.envfiles. - Flagsmith SDK keys live alongside Supabase keys and should be scoped per environment.
- The guardrails in the "Standard Kit" doc (docs/architecture/01_Blueprint_Foundation.md) dictate lint/type/test behaviors; keep Turbo tasks in sync with those expectations.
- Monorepo setup with Turbo and pnpm workspaces
- Supabase database schema with multi-tenant tables and RLS policies
- Shared UI library with design system components
- Core architecture diagrams (Component, ERD, Context)
- Task management APIs and real-time updates
- PrepChef app task list UI components
- Basic authentication and role-based access
- Sequence diagrams for critical flows
- Recipe data models and admin CMS interfaces
- Media upload functionality with Supabase Storage
- Wall-mounted display application
- Deployment diagram and infrastructure docs
- Task similarity heuristic matching
- Advanced filtering and search
- Undo functionality for operations
- Presence tracking and device monitoring
- Comprehensive testing suite implementation
- Performance optimization and caching
- Final UI polish and accessibility improvements
- Production deployment pipeline and monitoring
- Documentation finalization and stakeholder training
- Complete Iteration 5 production readiness tasks
- Establish production monitoring and alerting
- Conduct stakeholder training sessions
- Execute production deployment and validation