AI-powered drive-through ordering system using ElevenLabs Conversational AI, Node.js, and React.
thru.ai is a complete drive-through ordering solution featuring real-time voice AI ordering, a modern touch-screen kiosk interface, and a kitchen display system. Built with ElevenLabs' Conversational AI Agent for natural voice interactions and a React-based frontend for a beautiful ordering experience.
- Natural voice conversations powered by ElevenLabs Conversational AI
- Real-time speech-to-speech with automatic order processing
- Supports modifications, sizes, and special requests
- Automatically detects when a customer approaches using TensorFlow.js and COCO-SSD
- Auto-starts voice conversation after 1 second
- Auto-stops conversation 3.5 seconds after customer leaves
- Performance-based FPS auto-tuning (1-5 FPS)
- Graceful fallback to manual mode if camera unavailable
- Smooth return to welcome screen on conversation end (no page refresh needed)
- Modern UI sound effects using Web Audio API (no audio files required)
- Welcome chime when conversation starts
- Confirmation beep when items are added to order
- Success sound on order completion
- Goodbye tone when conversation ends
- Subtle and non-intrusive (30% volume)
- Automatically initializes on first user interaction
- React-based touch-screen ordering interface
- Real-time order updates and live totals
- Displays menu items, prices, and modifiers
- Optimized layout - all menu items visible on one page
- Manual "Start Order" button as backup
- Dedicated employee-facing order management at
/kitchen - Four-column Kanban layout: New β Preparing β Ready β Completed
- Real-time order updates via Socket.IO
- Live timer showing order age with color coding (green/yellow/red)
- One-click status advancement buttons
- Order modifiers and customizations clearly displayed (70% opacity)
- Delete button with 5-second undo window
- Auto-hide completed orders after 1 hour
- Syncs across all connected kitchen displays
- Socket.IO for instant order synchronization
- Live order tracking across kiosk and kitchen displays
- Real-time status changes broadcast to all clients
Backend:
- Node.js + Express.js server
- ElevenLabs Conversational AI Agent integration
- WebSocket support for real-time updates
- Order management and tracking
Frontend:
- React + Vite
- Tailwind CSS for styling
- Responsive kiosk and kitchen displays
AI:
- ElevenLabs Conversational AI Agent for voice interactions
- Natural language order processing
- Real-time speech-to-speech conversation
Computer Vision:
- TensorFlow.js with COCO-SSD model for real-time person detection
- Automatic camera-based customer detection to trigger voice ordering
- Adaptive FPS with performance-based auto-tuning
# Install root dependencies
npm install
# Install client dependencies
cd client
npm install
cd ..Copy the example environment file and add your ElevenLabs credentials:
cp .env.example .envEdit .env and set:
ELEVENLABS_API_KEY- Your ElevenLabs API keyELEVENLABS_AGENT_ID- Your Conversational AI Agent IDELEVENLABS_VOICE_ID- Voice ID for TTS (optional, defaults to Rachel)PORT- Server port (default: 3001)NODE_ENV- Environment mode (development/production)
Get your ElevenLabs credentials:
- Sign up at https://elevenlabs.io/
- Create a Conversational AI Agent
- Copy your API key and Agent ID
npm run buildThis builds the React frontend and places the production files in /client/dist/.
npm startThe server will start on http://localhost:3001 (or your configured PORT).
For development with hot reload:
npm run devThis runs both the Express server and the Vite dev server concurrently with automatic reloading.
Development URLs:
- Frontend (Vite dev server): http://localhost:5173
- Backend API: http://localhost:3001
/thru.ai/
βββ server/ # Express.js backend
β βββ index.js # Main server + Socket.IO setup
β βββ config.js # Server configuration
β βββ services/
β β βββ orderManager.js # Order state management + kitchen status
β β βββ menuService.js # ElevenLabs menu synchronization
β βββ utils/ # Utility functions
βββ client/ # React frontend
β βββ src/
β β βββ pages/
β β β βββ CustomerKiosk.jsx # Customer ordering interface
β β β βββ KitchenDisplay.jsx # Kitchen order management system
β β βββ components/
β β β βββ OrderPanel.jsx # Order summary display
β β β βββ MenuDisplay.jsx # Menu items grid
β β β βββ DetectionStatusIndicator.jsx # Camera detection status
β β β βββ CameraPreview.jsx # Optional camera preview
β β βββ hooks/
β β β βββ usePersonDetection.js # TensorFlow.js person detection
β β βββ utils/
β β βββ personDetectionHelper.js # Detection config & helpers
β βββ public/ # Static assets
β βββ dist/ # Built frontend (generated)
β βββ index.html # Entry HTML
β βββ vite.config.js # Vite configuration
β βββ package.json # Client dependencies
βββ menu.json # Menu data
βββ .env # Environment variables (not in git)
βββ .env.example # Environment variables template
βββ package.json # Root project configuration
βββ README.md # This file
| Variable | Description | Required |
|---|---|---|
ELEVENLABS_API_KEY |
Your ElevenLabs API key | Yes |
ELEVENLABS_AGENT_ID |
Your Conversational AI Agent ID | Yes |
ELEVENLABS_VOICE_ID |
Voice ID for TTS responses | No |
PORT |
Server port number | No (default: 3001) |
NODE_ENV |
Environment mode | No (default: development) |
URL: http://localhost:3001 (or http://localhost:5173 in development)
Auto-Detection Mode:
- Grant camera permissions when prompted
- Approach the kiosk - voice conversation starts automatically after 1 second (welcome chime plays)
- Speak your order naturally (e.g., "I'd like a cheeseburger with no pickles and a medium Coke")
- AI confirms items and modifications (confirmation beep on each item)
- Complete your order (success sound plays)
- Move away - conversation ends automatically after 3.5 seconds (goodbye tone plays)
Manual Mode:
- Click "Start Order" button
- Speak or type your order
- View order summary on the right panel
- Click "End Conversation" when done
Camera Detection Settings:
- Toggle auto-detection on/off via status indicator
- Optional camera preview (click "Show Camera Preview" button)
- Detection runs at 3 FPS by default (auto-adjusts for performance)
Order Management:
- New orders appear in the "New Orders" column automatically
- Click "Start Preparing" to move order to "Preparing" column
- Click "Mark Ready" when food is ready
- Click "Complete" to finish the order
- Completed orders auto-hide after 1 hour
Order Cards Show:
- Order number (e.g., #001, #002)
- All items with quantities and prices
- Modifiers (no pickles, extra cheese, etc.) - displayed with reduced opacity
- Size information (for drinks)
- Order total
- Live timer with color coding:
- π’ Green: < 3 minutes
- π‘ Yellow: 3-5 minutes
- π΄ Red: > 5 minutes
Delete Orders:
- Click trash icon on any order card
- Order removed immediately with 5-second undo window
- Toast appears: "Order deleted - will be permanently deleted in 5 seconds"
- Click "Undo" to restore if accidental
- After 5 seconds, order permanently deleted
Multi-Display Support:
- Open multiple kitchen displays on different devices
- All displays sync in real-time via Socket.IO
- Status changes broadcast instantly
GET /api/agent/signed-url- Get ElevenLabs agent session URLPOST /api/orders/update- Update order from AI agentGET /api/orders- Get all active ordersGET /api/menu- Get menu data
GET /api/kitchen/orders- Get all kitchen ordersPOST /api/kitchen/status- Update order kitchen status- Body:
{ orderId, kitchenStatus: 'new'|'preparing'|'ready'|'completed' }
- Body:
DELETE /api/kitchen/order/:orderId- Delete an orderPOST /api/kitchen/restore- Restore a deleted order- Body:
{ order: {...} }
- Body:
POST /api/admin/refresh-menu- Sync menu to ElevenLabs agent
Emitted by server:
orders:init- Initial orders on connectkitchen:init- Initial kitchen ordersorder:new- New order createdorder:update- Order items/total updatedorder:complete- Order marked completekitchen:status- Kitchen status changedkitchen:delete- Order deletedkitchen:restore- Order restored
Edit menu.json to customize your menu:
- Add/remove categories
- Update items, prices, and descriptions
- Configure item options and customizations
The menu structure supports:
- Categories (Burgers, Combos, Sides, Drinks, etc.)
- Items with prices and descriptions
- Customization options
| Command | Description |
|---|---|
npm start |
Start production server |
npm run dev |
Start development mode with hot reload |
npm run build |
Build React frontend for production |
npm run preview |
Preview production build locally |
- Runtime: Node.js
- Backend: Express.js
- Frontend: React, Vite
- Styling: Tailwind CSS
- AI: ElevenLabs Conversational AI Agent
- Computer Vision: TensorFlow.js, COCO-SSD
- Real-time: WebSocket (Socket.io)
For issues or questions:
- Check the ElevenLabs documentation: https://elevenlabs.io/docs
- Review server logs for error messages
- Ensure all environment variables are set correctly
MIT