banner

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

  1. User sends a message via LINE
  2. Webhook receives request (/api/line/webhook)
  3. Express processes incoming event
  4. Middleware handles authentication & logging
  5. Controller routes the event
  6. Handler interprets user intent
  7. Services handle logic:
    • Store data in MongoDB
    • Extract structured data via Gemini API
  8. 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