Real-time camera try-on demo with:
- In-stock inventory API
- Garment switching UI
- MediaPipe Pose tracking (with fallback mode)
- Canvas-based overlay rendering
- Install Node.js 20+.
- Install dependencies:
npm install- Start dev server:
npm run dev- Open:
http://localhost:3000/tryon/live
GET /api/inventory?inStock=true
Optional filter:
GET /api/inventory?inStock=true&category=tops
- Camera permission is required.
- If MediaPipe model loading fails, app keeps working in fallback overlay mode.
- Inventory currently uses local mock data in
lib/mockInventory.ts.