KopiBot AI / Dokumentasi HTML
Semua Dokumen GitHub Repo Kembali ke Landing Page
☕ AI Agent Coffee Shop Commerce Platform

Platform AI untuk otomatisasi order, customer service, loyalty customer, Customer CRM, Customer Portal, dan manajemen multi cabang coffee shop.

🚀 Features

  • AI Chatbot Order Menu
  • WhatsApp / Telegram / Discord Integration
  • Multi Branch Management
  • AI Upselling & Promo Recommendation
  • Order via Website & Chat Apps
  • Variant Product & Topping Support
  • Loyalty Point, Customer CRM, dan Customer Portal
  • Multi Currency, Tax & Timezone
  • AI Customer Interaction Automation

💻 Tech Stack

PHP Native • MySQL • OpenAI • Anthropic
WhatsApp Gateway • REST API • LLM AI

☕ Suitable For

Coffee Shop • Cafe • Restaurant • Bakery • Beverage Store

Dibuat & Dikembangkan oleh

Kukuh TW

📧 Email: kukuhtw@gmail.com

📱 WhatsApp: wa.me/628129893706

🌄 Instagram: @kukuhtw

X/Twitter: @kukuhtw

Facebook: facebook.com/kukuhtw

LinkedIn: linkedin.com/in/kukuhtw

GitHub: github.com/kukuhtw/toko_kopi

🌐 Demo: botlelang.com/toko_kopi

© 2026 Kukuh TW. All rights reserved.

README Project

KopiBot - AI Chatbot Order System

## AI Agent Coffee Shop Commerce Platform Platform AI untuk otomatisasi order, customer service, loyalty customer, Customer CRM, Customer Portal, dan manajemen multi cabang coffee shop. ### Features - AI Chatbot Order Menu - WhatsApp / Telegram / Discord Integration - Multi Branch Management - AI Upselling & Promo Recommendation - Order via Website & Chat Apps - Variant Product & Topping Support - Loyalty Point, Redeem Point, and Customer CRM - Customer Self-Service Dashboard - Multi Currency, Tax, and Timezone ### Tech Stack PHP Native - MySQL - OpenAI - Anthropic WhatsApp Gateway - REST API - LLM AI ### Suitable For Coffee Shop - Cafe - Restaurant - Bakery - Beverage Store Dibuat dan dikembangkan oleh: Kukuh TW Email : kukuhtw@gmail.com WhatsApp : https://wa.me/628129893706 Instagram : @kukuhtw X/Twitter : @kukuhtw GitHub : https://github.com/kukuhtw/toko_kopi Facebook : https://www.facebook.com/kukuhtw LinkedIn : https://linkedin.com/in/kukuhtw Demo: https://botlelang.com/toko_kopi Copyright 2026 Kukuh TW. All rights reserved.

Sistem chatbot pemesanan kopi berbasis PHP 8 native, tanpa framework besar, dengan satu codebase untuk multi-cabang, multi-channel, multi-bahasa, promo engine, loyalty point, Customer CRM, Customer Portal, dan plugin system.


Fitur

Kategori Detail
Chatbot AI Intent detection berbasis rule dan LLM untuk order, promo, dan customer interaction
Multi Cabang Satu brand, banyak cabang dengan menu, promo, pengaturan, mata uang, dan timezone terpisah
Multi Channel Website, WhatsApp, Telegram, dan Discord dengan logika chatbot yang sama
Plugin System Tambah fitur tanpa ubah kode inti melalui action/filter hooks
Shopping Cart Tambah, edit, hapus, clear, promo, dan checkout berbasis session
Checkout Flow Chatbot meminta data customer langkah demi langkah sampai order siap dibuat
Loyalty Point Earn point otomatis, cek saldo, redeem point via chatbot dan halaman order web
Promo Engine Diskon persen, nominal, promo code, jadwal promo, min order, dan rekomendasi promo
Payment Gateway Midtrans dan Xendit via plugin
Menu Management Upload CSV, variant size/price, topping, dan override per cabang
Dashboard Super admin lintas cabang, branch admin per cabang, Customer CRM, histori loyalty customer, dan Customer Portal self-service
Customer CRM Normalisasi identitas customer berbasis email/WhatsApp, notifikasi loyalty, dan log CRM per cabang
Customer Portal Login customer ringan via kontak + nomor order untuk cek order history, loyalty, profile, dan repeat order
Dokumentasi HTML README dan docs Markdown tersedia juga sebagai halaman HTML
Export CSV Export order, menu, promo, dan data dashboard terkait

Persyaratan


Instalasi

Panduan lengkap ada di __DOC_CODE_0__.

Cara 1 - Web Installer

  1. Salin folder proyek ke C:\xampp\htdocs\toko_kopi\
  2. Buka:
http://localhost/toko_kopi/public/install.php
  1. Ikuti wizard sampai database, .env, dan akun admin selesai dibuat.
  2. Hapus public/install.php setelah instalasi selesai.

Cara 2 - Instalasi Manual

  1. Buat database toko_kopi
  2. Import:
database/schema.sql
database/seed.sql
  1. Salin .env.example menjadi .env
  2. Isi konfigurasi database dan BASE_URL
  3. Pastikan folder berikut bisa ditulis:
uploads/
storage/logs/

LLM API key tidak diisi di .env, tetapi dikelola lewat dashboard Super Admin.


URL Penting

URL Keterangan
http://localhost/toko_kopi/public/ Landing page
http://localhost/toko_kopi/public/readme.php README versi HTML
http://localhost/toko_kopi/public/docs/index.php Pusat dokumentasi HTML
http://localhost/toko_kopi/public/docs/sirclo-full-connector.php Tutorial integrasi SIRCLO
http://localhost/toko_kopi/public/login.php Login admin
http://localhost/toko_kopi/public/chat.php Chat demo
http://localhost/toko_kopi/public/order.php?branch={slug} Halaman order per cabang
http://localhost/toko_kopi/public/customer/login.php Login Customer Portal
http://localhost/toko_kopi/public/customer/ Overview Customer Portal
http://localhost/toko_kopi/public/customer/orders.php Riwayat order customer
http://localhost/toko_kopi/public/customer/loyalty.php Dashboard loyalty customer
http://localhost/toko_kopi/public/customer/profile.php Profil dan preferensi customer

Akun Default

Role Email Password
Super Admin admin@tokokopi.com password
Admin Jakarta Selatan admin.jaksel@tokokopi.com password
Admin Bandung admin.bandung@tokokopi.com password
Admin Surabaya admin.surabaya@tokokopi.com password

Ganti password setelah login pertama.


Struktur Direktori

toko_kopi/
|-- app/
|   |-- Config/
|   |-- Helpers/
|   |-- Models/
|   |-- Plugin/
|   `-- Services/
|-- database/
|   |-- schema.sql
|   |-- seed.sql
|   `-- add_loyalty_point_plugin.sql
|-- plugins/
|   |-- customer-crm/
|   |-- loyalty-point/
|   |-- midtrans-payment/
|   |-- xendit-payment/
|   |-- telegram-channel/
|   |-- discord-channel/
|   |-- fonnte-whatsapp/
|   |-- twilio-whatsapp/
|   |-- vonage-whatsapp/
|   |-- baileys-whatsapp/
|   |-- messagebird-whatsapp/
|   |-- upselling/
|   |-- rekomendasi-promo/
|   |-- cms-berita/
|   |-- sirclo-full-connector/
|   `-- plugins.json
|-- public/
|   |-- index.php
|   |-- readme.php
|   |-- chat.php
|   |-- order.php
|   |-- docs/
|   |-- api/
|   |-- customer/
|   `-- dashboard/
|-- docs/
|   |-- instalasi.md
|   |-- lisensi.md
|   |-- plugin-system.md
|   |-- sirclo-full-connector.md
|   |-- tutorial-membuat-plugin.md
|   `-- customer-agent-architecture.md
|-- uploads/
`-- storage/logs/

Channel Configuration

WhatsApp

Didukung beberapa provider:

Webhook:

POST /api/whatsapp/webhook.php?branch={id}

Telegram

POST /api/channel/webhook.php?channel=telegram

Discord

POST /api/channel/webhook.php?channel=discord

Channel Custom

Tambahkan lewat implementasi ChannelInterface dan filter channel.registered.


Plugin System

Plugin memungkinkan developer menambah fitur tanpa mengubah kode inti.

Struktur Plugin Minimal

plugins/nama-plugin/
|-- plugin.php
`-- NamaPlugin.php

Hook Penting

Hook Type Keterangan
order.created action Order baru berhasil dibuat
order.status_changed action Status order berubah
order.completed action Order selesai
order.payment_updated action Status bayar berubah
cart.total filter Modifikasi total harga
cart.before_checkout filter Validasi sebelum checkout
chat.message_received action Pesan masuk dari channel manapun
chat.before_ai filter Sebelum dikirim ke LLM
chat.after_ai filter Setelah LLM merespons
llm.providers filter Tambah AI provider custom
channel.registered filter Tambah channel baru
dashboard.nav_items filter Tambah menu sidebar

Referensi:

Plugin yang Sudah Tersedia

Plugin diaktifkan lewat __DOC_CODE_0__. Pada state proyek saat ini, loyalty-point dan customer-crm aktif dan saling terhubung.


Integrasi SIRCLO

Proyek ini sekarang memiliki plugin sirclo-full-connector sebagai fondasi integrasi ke SIRCLO.

Cakupan yang sudah tersedia:

Penting:

Dokumentasi lengkap:

File utama plugin:


Loyalty Point

Fitur loyalty saat ini mendukung:

File utama:


Customer CRM

Plugin customer-crm menambahkan lapisan Customer CRM yang fokus pada identitas dan komunikasi loyalty.

Fitur utamanya:

File utama:


Customer Portal

Selain dashboard admin, proyek ini sekarang memiliki Customer Portal self-service.

Alur login:

Halaman utama:

Yang bisa dilakukan customer:


LLM Integration

Konfigurasi lewat dashboard Super Admin.

Provider Contoh Model
OpenAI gpt-4o, gpt-4o-mini
Anthropic claude-3-5-haiku, claude-3-5-sonnet
Rule-based tanpa API key

Provider custom bisa ditambahkan lewat plugin.


API Endpoints

Endpoint Method Keterangan
/api/chat/send.php POST Kirim pesan ke chatbot web
/api/whatsapp/webhook.php POST Webhook WhatsApp
/api/channel/webhook.php?channel={name}&branch={id} POST Webhook channel plugin
/api/cart/add.php POST Tambah item ke cart
/api/cart/update.php POST Update quantity item
/api/cart/clear.php POST Kosongkan cart
/api/loyalty/status.php POST Cek saldo loyalty customer dan status redeem di cart
/api/loyalty/redeem.php POST Pakai atau batalkan redeem point
/api/order/checkout.php POST Buat order dari cart
/api/order/status.php GET Cek status order
/api/upload/menu.php POST Upload CSV menu
/api/upload/promo.php POST Upload CSV promo
/api/export/orders-branch.php GET Export order branch
/api/export/orders-super.php GET Export order semua cabang

Simulasi Chat

Coba percakapan berikut di /chat.php:

menu
harga latte
promo
pesan 2 latte
cart
ubah latte jadi 1
poin saya
pakai poin 10
hapus poin
checkout

Di halaman order web, redeem point juga bisa dipakai langsung dari panel loyalty saat checkout.

Portal customer juga dapat diakses langsung setelah checkout lewat tombol Dashboard Customer, dengan prefill kontak dan nomor order terakhir.

Regression Check

Untuk cek cepat flow entity extraction dan chatbot tanpa browser, jalankan:

php scripts/chat-regression.php
php scripts/chat-regression.php --verbose
php scripts/chat-regression.php --branch=1

Script ini menguji skenario umum seperti deskripsi menu, query budget, order dengan varian, order dengan hint harga, dan lookup promo.


Dokumentasi

Versi HTML yang bisa dibuka langsung di browser:

Dokumen Markdown sumber:


Keamanan


Kontribusi

  1. Fork repo ini
  2. Buat branch fitur
  3. Commit dengan pesan jelas
  4. Buka Pull Request

Untuk fitur besar, pertimbangkan bentuk plugin agar core tetap bersih.


Lisensi

GNU Affero General Public License v3.0 (AGPL-3.0)

Proyek ini menggunakan model dual license:

Kapan AGPL cocok

Kapan commercial license dibutuhkan

Detail lebih lengkap ada di __DOC_CODE_0__.

Untuk commercial inquiry:

Catatan: penjelasan ini bersifat praktis untuk proyek dan bukan nasihat hukum formal.