A working restaurant automation prototype built with n8n, LLMs, Kapso WhatsApp API, Supabase, JavaScript, and Netlify.
This project connects a customer-facing WhatsApp ordering experience with restaurant operations.
Customers can browse an interactive menu, submit orders through WhatsApp, receive AI-assisted responses, confirm or modify orders, request a waiter, ask for the bill, and complete the order lifecycle. Staff use dedicated kitchen and waiter dashboards, while managers can review operational reports.
This repository contains a sanitized public portfolio version. Credentials, secrets, customer data, and private infrastructure identifiers have been removed.
Restaurant teams often manage digital enquiries, orders, kitchen updates, waiter requests, and payment closure across disconnected manual steps. This creates duplicated work, slow handoffs, inconsistent customer responses, and limited operational visibility.
This system connects the customer conversation directly to restaurant operations. It reduces repetitive message handling, structures incoming orders, routes tasks to the correct team, and gives staff a shared view of order status.
- Faster handoff from customer order to kitchen
- Consistent order capture and confirmation
- Clear separation of kitchen, waiter, and cashier responsibilities
- Reduced manual follow-up for routine requests
- Better operational visibility through live dashboards and reports
- Human handover remains available when automation is not appropriate
| Area | Capability |
|---|---|
| Customer experience | Interactive digital menu and WhatsApp order handoff |
| AI layer | Intent classification, FAQ handling, and structured order parsing |
| Session management | Customer states such as waiting order, confirmation, modification, cancellation, and active order |
| Kitchen operations | Pending, preparing, and ready order lifecycle |
| Waiter / cashier | Serve order, request bill, payment closure, and service alerts |
| Database | Supabase order storage, order events, and customer session data |
| Reporting | Revenue, order counts, active orders, cancellations, dine-in, takeaway, and average order value |
| Realtime | Dashboard refresh through Supabase realtime events |
| Session closure | Resets the customer to waiting_order after payment |
AI-Restaurant-Operating-System/
βββ README.md
βββ NOTICE.md
βββ .gitignore
βββ docs/
β βββ ARCHITECTURE.md
β βββ BUSINESS_FLOW.md
β βββ DATABASE_SCHEMA.md
β βββ FINAL_REVIEW.md
β βββ SECURITY.md
β βββ SETUP.md
βββ images/
β βββ interactive-menu.png
β βββ kitchen-dashboard.png
β βββ waiter-dashboard.png
β βββ reports-dashboard.png
β βββ main-n8n-workflow.png
β βββ close-session-workflow.png
β βββ system-architecture.svg
β βββ workflow-overview.svg
βββ screenshots/
β βββ README.md
βββ workflows/
β βββ ai-restaurant-operating-system-public.json
β βββ close-order-session-public.json
β βββ README.md
βββ web-app/
βββ index.html
βββ app.js
βββ styles.css
βββ _redirects
βββ README.md
- Kapso receives an incoming WhatsApp message.
- n8n normalizes the payload and rejects outbound/self-generated messages.
- The customer record and current session status are retrieved.
- The message is routed by session state and intent.
- LLM workflows parse orders, classify requests, or answer menu FAQs.
- Confirmed orders are written to Supabase.
- Kitchen and waiter dashboards manage the order lifecycle.
- After payment, the close-session workflow returns the customer to
waiting_order.
- State-based conversation routing instead of relying on a single unrestricted AI prompt
- Structured LLM outputs for reliable order parsing and validation
- Idempotency and self-message filtering to reduce duplicate processing
- Separate customer, kitchen, waiter, cashier, and reporting concerns
- Database-backed order lifecycle with realtime dashboard updates
- Sanitized public workflows with credentials and private identifiers removed
- Automation: n8n
- AI / LLM: OpenAI-compatible models and Gemini through OpenRouter
- WhatsApp: Kapso WhatsApp API
- Database: Supabase / PostgreSQL
- Frontend: HTML, CSS, JavaScript
- Hosting: Netlify
- Integration: REST APIs, webhooks, JSON, realtime events
workflows/ai-restaurant-operating-system-public.json
Handles:
- Message normalization
- New and returning customers
- Session routing
- AI order parsing
- FAQ responses
- Order confirmation
- Modification and cancellation
- Waiter alerts
- Bill handling
- Supabase order creation
- Conversation logging
workflows/close-order-session-public.json
Triggered after payment to reset the customer session for a new order.
The web-app folder contains:
- Interactive product menu
- Dine-in and takeaway selection
- WhatsApp order generation
- Kitchen dashboard
- Waiter / cashier dashboard
- Reports dashboard
- Supabase realtime updates
- Paid-and-close webhook integration
Configuration placeholders are documented in web-app/README.md.
This public version excludes:
- API keys
- Credentials
- Production webhook secrets
- Customer phone numbers
- Private Supabase identifiers
- Internal deployment details
See docs/SECURITY.md before using any workflow in another environment.
Functional prototype / portfolio project
The system has been developed and tested as a functional restaurant automation demo. Production deployment would require authentication, row-level security, monitoring, rate limiting, backup policies, and environment-based secret management.
Badreldin Mohamed Awad
AI Automation Engineer | n8n Workflow Architect | Applied AI Systems Builder
Al Ain, UAE
Email: badrna3om@gmail.com





