A comprehensive guide to building a Line Chat Bot from scratch, integrating various tools, databases, and analytics platforms, and deploying the bot to production.
- Line Developer 101
- Rich Menu and Line Message Types
- Storing Chat Data with MongoDB
- Web Development 101
- Line LIFF and Continuations
- Dialogflow 101
- Dialogflow with Generative AI
- Deploying to Production
- Introduction to Line Messaging API, Events, and SDK
- Creating a Line Official Account (OA) and Generating Tokens
- Installing Required Libraries and Tools
- Building a Webhook with FastAPI
- Connecting Line OA to the Webhook
- Creating a Rich Menu
- Overview of Different Message Types
- Sending Various Message Types with Python
- Implementing Quick Reply
- Introduction to MongoDB
- Setting up a Database on MongoDB
- Getting Started with pymongo
- Storing Message Events from the Line Bot in MongoDB
- Understanding Basic Web Development Concepts
- Creating a Web Frontend with HTML and Tailwind CSS
- Building a Backend API with FastAPI
- Routing the Webhook, API, and Frontend Together
- Connecting the Frontend with Line LIFF
- Storing Data in MongoDB
- Basic Analytics with Power BI Desktop
- Querying Data for Broadcasts
- Setting up Dialogflow
- Creating Basic Intents
- Connecting Python to Dialogflow
- Creating Intents Connected to Gemini
- Setting up Document AI
- Creating Intents Linked to Document AI
- Introduction to Docker
- Creating a Docker Image
- Deploying Docker with Cloud Run
- MongoDB
- Python 3.13
- Line Developer Account
- Ngrok
- Postman
- GCP Account
- MongoDB Atlas
- GCP Account
- Docker
- Power BI Desktop
-
Clone the repository:
git clone https://github.com/falukelo/linedev-zero2hero.git
-
Navigate to the project directory:
cd line-chat-bot-zero-to-hero
pip install -r requirements.txt
ngrok is essential for creating a secure tunnel to test the webhook locally with Line's platform.
- Go to the ngrok download page.
- Download the Windows version.
- Extract the downloaded file and move
ngrok.exe
to a preferred location, such asC:\ngrok
. - Add ngrok to your PATH:
- Open the Command Prompt as an administrator.
- Run the following command to add ngrok to the PATH:
setx PATH "%PATH%;C:\ngrok"
- Verify the installation by running:
ngrok --version
- Open your terminal.
- Install ngrok using Homebrew (if Homebrew is not installed, follow the instructions here):
brew install ngrok/ngrok/ngrok
- Verify the installation:
ngrok --version
Run the following command to add your authtoken to the default ngrok.yml:
ngrok config add-authtoken <Your_Ngrok_token>