
AIRCON LINE Bot
A conversational LINE chatbot that simplifies air conditioner service booking through natural chat.
View on GitHub
Overview
AIRCON LINE Bot transforms traditional service management into a chat-first experience.
Users can manage bookings directly through LINE without forms or complex UI.
The system uses Google Gemini API to extract structured data from natural language and stores all records in MongoDB.
Responses are delivered using LINE Flex Messages for a smooth and interactive experience.
Demo
Tech Stack
Core
- Node.js (JavaScript)
- MongoDB
- Docker
Backend & Integration
- Express.js
- line/bot-sdk
- Mongoose
- Google Gemini API
- Axios
Tools
- dotenv
- nodemon
- uuid
Architecture
Flow Overview
- User sends a message via LINE
- Webhook receives request (
/api/line/webhook) - Express processes incoming event
- Middleware handles authentication & logging
- Controller routes the event
- Handler interprets user intent
- Services handle logic:
- Store data in MongoDB
- Extract structured data via Gemini API
- Response is sent back via LINE Flex Message
System Components
- app.js — Application entry point
- routes/linebotRoute.js — Webhook endpoint
- controllers/linebotController.js — Event orchestrator
- handlers/ — Message & postback logic
- services/ — Business logic + AI integration
- models/Customer.js — Database schema
- middleware/ — Authentication & logging
- utils/ — Flex Message builder
Key Highlights
- Chat-based booking (no forms)
- AI-powered data extraction (Gemini API)
- Fully containerized with Docker
- Real-time interaction via LINE Messaging API
- Clean and scalable backend architecture