This project is aimed at developing an end-to-end food delivery system with a chatbot interface. Leveraging Dialogflow for natural language understanding, FastAPI for efficient backend processing, and MySQL for database management, the system provides a seamless and user-friendly experience for ordering food.
- Features
- Tech Stack
- Installation
- Usage
- Directory Structure
- Running the FastAPI Backend
- Ngrok for HTTPS Tunneling
- Contributing
- License
- Conversational Interaction: Users can place orders, modify them, and inquire about order statuses using natural language queries.
- Efficient Backend Processing: FastAPI ensures rapid and asynchronous handling of incoming requests, contributing to a responsive backend.
- Database Management: MySQL stores and retrieves data related to user profiles, menu items, and order details.
- Order Processing Automation: Automation logic streamlines order processing, reducing manual intervention and improving operational efficiency.
- Real-Time Updates: Webhooks facilitate real-time communication, providing users with instant updates on changes in order status.
- Dialogflow: Natural language understanding for user interactions.
- FastAPI: Python web framework for efficient backend processing.
- MySQL: Database management for storing critical information.
-
Clone the repository:
git clone https://github.com/your-username/food-delivery-chatbot.git cd food-delivery-chatbot
-
Install dependencies:
pip install -r backend/requirements.txt
OR
pip install mysql-connector pip install "fastapi[all]"
-
Import the MySQL database dump from the
db
directory into your MySQL database using a tool like MySQL Workbench.
- Update the Dialogflow assets in the
dialogflow_assets
directory with your own training phrases and intents. - Configure the FastAPI backend to connect to your MySQL database.
- Follow the instructions in Running the FastAPI Backend to start the server.
- Optionally, set up Ngrok for HTTPS tunneling as explained in Ngrok for HTTPS Tunneling.
food-delivery-chatbot/
|-- backend/
|-- db/
|-- dialogflow_assets/
|-- frontend/
|-- README.md
|-- .gitignore
backend
: Contains Python FastAPI backend code.db
: Contains the dump of the database. Import this into your MySQL database.dialogflow_assets
: Holds training phrases and intents for Dialogflow.frontend
: Website code.
-
Go to the
backend
directory in your command prompt. -
Run the following command:
uvicorn main:app --reload
-
Install Ngrok by downloading it from [https://ngrok.com/download].
-
Extract the zip file and place
ngrok.exe
in a folder. -
Open the command prompt, navigate to that folder, and run:
ngrok http 8000
Note: Ngrok may timeout; restart the session if you encounter a session expired message.
Contributions are welcome! Please follow the Contributing Guidelines.
This project is licensed under the MIT License.