Jinx is an AI-powered chatbot developed for Chop Now, a hypothetical restaurant in Lagos, Nigeria. It enhances customer service by allowing users to:
Place food orders naturally via conversation.
Track order statuses without calling support.
Get instant responses to FAQs about the menu and restaurant location.
Built with Dialogflow (NLP), FastAPI (backend services), and MySQL (data storage), Jinx provides a seamless, multilingual (English & Nigerian Pidgin) interaction experience. This publication details the systemβs architecture, implementation, and future improvements.
1. Introduction
1.1 Problem Statement
Restaurants often struggle with managing high volumes of customer queries and orders. Traditional phone-based support is inefficient, leading to:
Long wait times for order placement or tracking.
Miscommunications due to language barriers.
Overloaded customer service agents, reducing efficiency.
Jinx solves these issues by automating food ordering, tracking, and inquiries using conversational AI.
1.2 Objectives
Jinx is designed to:
Reduce customer support dependency by handling order-related queries automatically.
Support natural and intuitive ordering in English and Nigerian Pidgin.
Provide instant responses for menu inquiries and order tracking.
1.3 Current State & Gap Identification
Traditional food ordering relies heavily on:
Call centers that are prone to delays and human errors.
Mobile apps that require downloads and manual input.
Walk-in orders, which limit convenience for customers.
Jinx bridges this gap by offering an instant, AI-driven chatbot that simplifies the ordering process.
2. System Architecture
2.1 Overview
The chatbot is built using a modular architecture for scalability and efficiency:
Dialogflow: Handles intent recognition and natural language processing (NLP).
FastAPI: Manages API requests, processes orders, and interacts with the database.
MySQL: Stores orders, menu data, and customer interactions.
Ngrok: Provides a secure HTTPS tunnel for testing with Dialogflow.
2.2 Architecture Diagram
2.3 Key Components
(A) Dialogflow (Natural Language Processing)
Understands user queries and extracts intents.
Maintains conversational context to handle ongoing orders.
(B) FastAPI Backend
Acts as middleware between Dialogflow and MySQL.
Processes order placements and tracking requests.
(C) MySQL Database
Stores customer orders, menu items, and tracking data.
Allows efficient retrieval and updates for order tracking.
(D) Ngrok (For Local Testing)
Exposes the local FastAPI server via a public HTTPS URL.
3. Implementation
3.1 Project Structure
βββ backend/ # FastAPI backend code
β βββ main.py # API entry point
β βββ db_helper.py # Handles database operations
β βββ generic_helper.py # Utility functions
β βββ requirements.txt # Dependencies
βββ db/ # MySQL database dump
β βββ chop_now_restaurant.sql # Database schema
βββ dialogflow_assets/ # Intents and training data
βββ static/ # Static assets (e.g., menu images)
βββ README.md # Documentation
3.2 Dataset Sources & Collection
The chatbot utilizes a structured dataset containing:
Menu items & pricing from the Chop Now restaurant.
Customer orders & transaction history for personalized recommendations.
Order tracking statuses to provide real-time updates.
Data is collected through manual entry and API-based updates from the restaurant's inventory system.
3.3 Dataset Processing Methodology
Normalization: Cleaning and structuring data for consistency.
Indexing: Optimizing queries for fast retrieval.
Encryption: Secure handling of customer order details.
4. Installation & Setup
4.1 Prerequisites
Python 3.x
MySQL Server
Google Dialogflow Account
Ngrok (for local testing)
4.2 Installation Steps
Step 1: Clone the Repository
git clone https://github.com/monsterdevgit/Chop_Now_Restaurant_Chatbot
cd chopnow-chatbot
Step 2: Setup MySQL Database
CREATE DATABASE chop_now_restaurant;
USE chop_now_restaurant;
SOURCE db/chop_now_restaurant.sql;
Step 3: Run FastAPI Backend
uvicorn backend.main:app --reload
Step 4: Connect FastAPI to Dialogflow
Use Ngrok to expose the local FastAPI server:
ngrok http 8000
Copy the HTTPS URL and update Dialogflow's fulfillment settings.
Support Status: Not Actively maintained, community contributions welcome.
8. Industry Insights & Future Enhancements
AI-driven chatbots are reducing customer wait times by 40%.
Restaurants using AI see increased efficiency & reduced operational costs.
Future upgrades include payment integration & additional language support.
9. Conclusion
Jinx successfully demonstrates the power of AI-driven automation in the restaurant industry. By integrating NLP, backend processing, and database management, this project improves customer service efficiency while reducing human dependency. Future improvements will expand payment integration and language support.