Appearance
Step-by-Step Build Order
Rebuilding Touchless Chef from Scratch
Phase 1: Vite Project & MediaPipe Setup
- Initialize Vite project with React 18:
npm create vite@latest . -- --template react. - Install dependencies:
npm i @mediapipe/tasks-vision lucide-react. - Configure Tailwind CSS in
tailwind.config.jsandindex.css.
Phase 2: MediaPipe Vision Singleton
- Create
src/services/GestureManager.js. - Configure
FilesetResolver.forVisionTaskspointing to official CDN Wasm binaries. - Instantiate
GestureRecognizerwithdelegate: "GPU"andminHandDetectionConfidence: 0.7. - Implement
startCamerabindingnavigator.mediaDevices.getUserMediato an offscreen video element.
Phase 3: Video Player & Frame Analysis Loop
- Build
src/components/ChefVideoPlayer.jsxwith hidden camera ref and primary video element ref. - Implement
predictLooputilizingrequestAnimationFrameandGestureRecognizer.recognizeVideo. - Introduce 1500ms time-decay debounce filter using
Date.now().
Phase 4: Gesture Action Dispatcher
- Create
src/utils/gestureMap.jsmapping gesture strings to video actions. - Wire
executeCommandto mutate videopaused,currentTime, andvolumeproperties. - Build responsive HUD overlays displaying active gesture feedback and camera status pills.
Phase 5: App Shell & Video Ingestion
- Build
src/App.jsxwith recipe presets and custom MP4 URL input. - Test gesture responsiveness across varying kitchen lighting conditions.