Skip to content

Latest commit

Β 

History

History
153 lines (107 loc) Β· 4.21 KB

File metadata and controls

153 lines (107 loc) Β· 4.21 KB

πŸ› Aadi's Eatery β€” AI-Powered Food Ordering Chatbot

Aadi’s Eatery is a smart restaurant website that integrates an AI-powered chatbot named Aadi, built using Dialogflow and connected to a FastAPI backend.
The chatbot allows customers to place food orders seamlessly through natural conversation and automatically sends order details to the backend database.


πŸš€ Live Demo

πŸ”— Website: https://aadis-eatery.onrender.com/
πŸ’¬ Chatbot: Integrated on the website (powered by Dialogflow)
βš™οΈ Backend API: Hosted on Render using FastAPI
πŸ—ƒοΈ Database: MySQL (hosted remotely)


🧠 Project Overview

This project combines:

  • A static restaurant website (HTML, CSS, JavaScript)
  • A Dialogflow chatbot named Aadi for conversational food ordering
  • A FastAPI backend that handles orders, menu queries, and database operations
  • A MySQL database that stores food item details and order history

Aadi interacts naturally with users, processes their order requests, and automatically communicates with the backend through webhooks to insert order details.


πŸ—οΈ Architecture

User β†’ Dialogflow Chatbot (Aadi) β†’ FastAPI Backend β†’ MySQL Database ↑ β”‚ Website (Frontend UI)

yaml Copy code

Flow

  1. User interacts with Aadi chatbot on the restaurant website.
  2. Chatbot extracts food item details and order quantity.
  3. Dialogflow webhook sends structured JSON to FastAPI endpoint.
  4. FastAPI verifies food item β†’ inserts order β†’ responds with confirmation.
  5. Chatbot displays success message to user.

βš™οΈ Tech Stack

Layer Technology
Frontend HTML5, CSS3, JavaScript
Chatbot Google Dialogflow
Backend FastAPI (Python)
Database MySQL (Remote Connection - Deployed on Railways)
Hosting Render (Backend,Frontend), GitHub Pages

πŸ“¦ Features

βœ… Interactive restaurant website with modern design
βœ… Fully automated chatbot ordering system
βœ… FastAPI backend connected to MySQL database
βœ… Handles order insertion and menu validation
βœ… Deployed API integrated with Dialogflow webhook
βœ… Mobile-responsive and optimized hero section
βœ… Secure environment variable management for API keys


πŸ” Example Chat Flow

πŸ‘€ User: I’d like to order a Pizza.
πŸ€– Aadi: Great choice! How many pizzas would you like?
πŸ‘€ User: Just one.
πŸ€– Aadi: Your order for 1 Pizza has been successfully placed. βœ…
(Order details automatically saved to backend database.)


πŸ—‚οΈ Folder Structure

FOOD_RESTAURANT_CHATBOT/ β”‚ β”œβ”€β”€ backend/ β”‚ β”œβ”€β”€ db_helper.py # Database helper functions β”‚ β”œβ”€β”€ genric_fun.py # Utility functions β”‚ β”œβ”€β”€ main.py # FastAPI application entry point β”‚ β”œβ”€β”€ Dockerfile # Deployment configuration β”‚ β”œβ”€β”€ ngrok.exe # Local tunneling (for Dialogflow testing) β”‚ β”œβ”€β”€ pandeyji_eatery.db # SQLite/Database file β”‚ β”œβ”€β”€ requirements.txt # Dependencies for backend β”‚ β”œβ”€β”€ frontend/ β”‚ └── index.html # Static website with integrated chatbot β”‚ β”œβ”€β”€ .env # Environment variables (DB credentials, API keys) β”œβ”€β”€ .gitignore # Git ignore rules β”œβ”€β”€ venv/ # Virtual environment └── pycache/ # Compiled cache files

yaml Copy code


πŸ§‘β€πŸ’» How to Run Locally

  1. Clone the repository

git clone https://github.com/your-username/Food_Rest_chatbot.git cd Food_Rest_chatbot/backend

  1. Create a virtual environment

python -m venv venv source venv/bin/activate # or venv\Scripts\activate (on Windows)

  1. Install dependencies

pip install -r requirements.txt

Set up environment variables

DB_HOST=your_host DB_USER=your_user DB_PASSWORD=your_password DB_NAME=your_database

Run FastAPI server

uvicorn main:app --reload

Open frontend

Open frontend/index.html in your browser and test chatbot.

🧩 Future Improvements 1.Add live order tracking

2.Integrate payment gateway

3.Add admin dashboard for restaurant staff

4.Support voice-based ordering

πŸ‘¨β€πŸ’» Developer Aditya Mangal πŸ’Ό Full Stack Developer | AI Chatbot Enthusiast πŸ“ India πŸ”— LinkedIn:https://www.linkedin.com/in/adityamangalai/