Skip to content

Repository files navigation

VoiceDish

AI-powered voice ordering for WhatsApp — built for the UAE.

License: MIT Node.js Groq WhatsApp

VoiceDish lets cafeterias, restaurants, and grocery shops receive orders through their existing WhatsApp Business number — no new app, no QR codes, no customer training required.

Customers send a voice note in any language. VoiceDish transcribes it, extracts the order, requests a location pin, and surfaces everything in a web dashboard.


Why UAE / Why This Stack

  • Language reality: Customers in the UAE order in Bangla, Arabic, Urdu, Hindi, and English — often in the same message. Groq's whisper-large-v3 handles all of them with sub-second latency.
  • WhatsApp-first market: 90%+ of UAE residents use WhatsApp daily. No new channel adoption needed.
  • Groq LPUs: All heavy inference runs on Groq's cloud — the server itself needs only 512MB RAM and handles 100+ concurrent orders.
  • Sovereign AI: No OpenAI dependency. Groq operates under UAE-compatible data terms.

How It Works

Customer sends voice note / text
        │
        ▼
WhatsApp Business API webhook
        │
        ▼
Groq Whisper (whisper-large-v3)
  → Transcription (multi-dialect)
        │
        ▼
Groq LLaMA (llama-3.3-70b-versatile)
  → Structured JSON {items, quantities, notes}
        │
        ▼
SQLite order created (status: pending)
        │
        ▼
Bot sends order summary + location request
        │
        ▼
Customer shares GPS pin
        │
        ▼
Order updated with coordinates + Google Maps link
        │
        ▼
Admin updates status via dashboard
  → Customer receives WhatsApp notification

Features

  • Voice notes and text orders via WhatsApp
  • Multi-language transcription (Arabic, Bangla, Urdu, Hindi, English)
  • Automatic GPS location capture via WhatsApp location pin
  • Order history on demand ("history" / "my orders")
  • Status notifications to customers (confirmed → preparing → delivered)
  • Next.js admin dashboard with order management
  • Docker + Docker Compose for one-command deployment

Tech Stack

Layer Technology
Backend Node.js 20+, Express.js
AI / ASR Groq SDK — whisper-large-v3
AI / NLU Groq SDK — llama-3.3-70b-versatile
Messaging WhatsApp Business Cloud API v21.0
Database SQLite3
Frontend Next.js 14, Tailwind CSS
Deployment Docker, Docker Compose

Getting Started

Prerequisites

1. Clone and install

git clone https://github.com/your-org/voicedish.git
cd voicedish
npm install
cd frontend && npm install && cd ..

2. Configure environment

cp .env.example .env

Edit .env:

WHATSAPP_TOKEN=         # Meta WhatsApp Business API token
WHATSAPP_PHONE_ID=      # Your business phone number ID
VERIFY_TOKEN=           # Any string — used to verify the webhook with Meta
GROQ_API_KEY=           # Your Groq API key
PORT=3000

3. Run locally

# Backend (port 3000)
npm run dev

# Frontend dashboard (port 3001) — in a separate terminal
cd frontend && npm run dev

4. Expose webhook for WhatsApp

WhatsApp requires a public HTTPS URL to deliver webhooks.

ngrok http 3000

Configure the webhook in your Meta Developer App:

  • Callback URL: https://<your-ngrok-url>/webhook
  • Verify token: same value as VERIFY_TOKEN in your .env
  • Subscribed fields: messages

Customising the Menu

By default, VoiceDish uses a sample menu in src/services/orderExtractor.js. To use your own:

Set MENU_ITEMS in .env as a JSON string:

MENU_ITEMS=[{"name":"Chicken Biryani","price":25},{"name":"Karak Chai","price":5}]

The LLaMA prompt uses this context to match items and estimate totals.


API Reference

Method Endpoint Description
GET /health Health check
GET /api/orders List last 50 orders
GET /api/orders/:id Get single order
PATCH /api/orders/:id/status Update status (triggers WhatsApp notification)
GET/POST /webhook WhatsApp webhook (Meta verification + message ingress)

Status values

pendingconfirmedpreparingdelivered


Database Schema

CREATE TABLE orders (
  id               INTEGER PRIMARY KEY AUTOINCREMENT,
  user_phone       TEXT NOT NULL,
  items            TEXT,              -- JSON: [{name, quantity, notes}]
  total_price      TEXT,
  status           TEXT DEFAULT 'pending',
  location_lat     REAL,
  location_long    REAL,
  google_maps_link TEXT,
  created_at       DATETIME DEFAULT CURRENT_TIMESTAMP
);

Deployment

VoiceDish is stateless except for the SQLite file. Any small VPS works.

Minimum requirements: 512MB RAM, 1 vCPU, 1GB disk

Docker Compose (recommended)

cp .env.example .env
# fill in your values

docker compose up -d

Backend on port 3000, dashboard on port 3001.

Three deployment methods

Edit deploy-config.sh with your server details first:

SSH_USER="ubuntu"
SSH_IP="your.server.ip"
SSH_KEY="/path/to/key.pem"
DEPLOY_DIR="/home/ubuntu/voicedish"
Method Command Notes
Direct Git npm run deploy Pulls latest, runs npm install on server
Docker image npm run deploy:docker Builds locally, uploads tarball (~100MB). Recommended.
Zip source npm run deploy:zip Uploads source, builds Docker on server

Reverse proxy + SSL (Nginx + Certbot)

server {
    server_name voice.yourdomain.com;
    location / {
        proxy_pass http://localhost:3000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}
certbot --nginx -d voice.yourdomain.com

Customer Commands

Message Action
Voice note Places a new order
Any text message Places a new order (text extraction)
history or my orders Returns last 5 orders with status
Location pin Attaches GPS coordinates to the latest pending order

Project Structure

voicedish/
├── src/
│   ├── index.js                  # Express server, routes, webhook
│   ├── handlers/
│   │   └── messageHandler.js     # Routes messages by type
│   └── services/
│       ├── database.js           # SQLite operations
│       ├── whatsapp.js           # WhatsApp API calls
│       ├── transcription.js      # Groq Whisper integration
│       └── orderExtractor.js     # Groq LLaMA order extraction
├── frontend/
│   └── app/
│       ├── page.js               # Admin dashboard
│       └── layout.js
├── docker-compose.yml
├── Dockerfile
├── .env.example
└── deploy-config.sh

Roadmap

  • POS integration (menu sync + KDS order injection)
  • Real-time dashboard updates (WebSocket / polling)
  • Multi-restaurant / multi-tenant support
  • Payment link generation (Stripe / Telr)
  • Order cancellation workflow
  • Dynamic menu management UI

Contributing

Contributions are welcome. See CONTRIBUTING.md for guidelines.


License

MIT — see LICENSE.


Built by Dynamic Web Lab FZE LLC — UAE-based software company.

About

AI-powered WhatsApp voice ordering for UAE restaurants. Converts multilingual voice notes to structured orders with GPS location. Node.js + Groq + SQLite.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages