Aivanta Chatbot Documentation
Welcome to the official documentation for v1.0.
The Ultimate AI-Powered Assistant for Laravel Applications.
Automate tasks, manage data, and engage users via Web & WhatsApp.
1. Introduction
Aivanta Chatbot is a powerful, plug-and-play module designed to transform any Laravel application into an intelligent platform. By integrating OpenAI and Meta's WhatsApp Cloud API, it provides a seamless conversational interface for users to interact with your system's data.
Key Capabilities
- Dual Interface: A beautiful floating web widget and a fully synchronized WhatsApp bot.
- Smart CRUD Operations: Create projects, tasks, and clients using natural language.
- Data Analysis & Export: Ask for reports and export them to CSV or PDF instantly.
- File Processing: Upload CSV files directly to the chat for bulk import.
2. Installation Guide
Follow these steps to integrate the Aivanta Chatbot module into your Laravel application.
Prerequisites
- PHP: 8.1 or higher
- Laravel: 10.x or higher
- Database: MySQL/MariaDB
Step 1: Install Dependencies
Run the following command to install the necessary packages:
composer require openai-php/laravel guzzlehttp/guzzle
Step 2: Environment Configuration
Add the following keys to your .env file:
OPENAI_API_KEY=sk-your-openai-api-key
WHATSAPP_ACCESS_TOKEN=your-meta-access-token
WHATSAPP_PHONE_NUMBER_ID=your-phone-number-id
WHATSAPP_VERIFY_TOKEN=your-secure-verify-token
Step 3: Database Setup
Publish and migrate the required tables.
1. Settings Table
Schema::create('settings', function (Blueprint $table) {
$table->id();
$table->string('key')->unique();
$table->text('value')->nullable();
$table->string('group')->default('general');
$table->timestamps();
});
Run migrations:
php artisan migrate
Step 4: Frontend Integration
Include the chatbot widget in your main layout file (e.g., resources/views/layouts/app.blade.php).
<!-- Add this before the closing </body> tag -->
<x-chatbot.widget />
3. Configuration & Customization
The module comes with a robust Admin Settings Page to manage behavior and branding without touching code.
General Settings
| Feature | Description |
|---|---|
| Enable Chatbot | Toggle to show/hide the widget on the frontend. |
| Bot Name | Customize the assistant's name (e.g., "Support Bot"). |
Appearance (Theming)
Match the chatbot to your brand identity using the color pickers:
- Primary Color: Used for the header and user bubbles.
- Secondary Color: Used for accents (buttons).
WhatsApp Integration
Configure the Meta Cloud API connection:
- Access Token: Your token from the Meta App Dashboard.
- Phone Number ID: From the WhatsApp Setup page.
- Verify Token: Must match the detailed webhook configuration.
4. User Guide
For Administrators
- System Overview: Ask "How many active projects do we have?"
- Task Management: Assign tasks to team members.
- Export Reports: Click the "Download" icon to export data.
For Clients / Users
- Project Tracking: Ask "What is the status of my project?"
- Support: Report issues directly via chat.
5. Developer Notes
Extending the Brain (`ChatbotService`)
To add support for new models (e.g., Tickets), update the getEntitySchemas method:
protected function getEntitySchemas(): string
{
return <<<SCHEMA
- Project: title, status, budget
- Task: title, priority, due_date
- Ticket: subject, status, priority (NEW)
SCHEMA;
}
Customizing the Widget
The widget is built with Alpine.js. Modify resources/views/components/chatbot/widget.blade.php to add new UI elements.
Support & Updates
For technical support, contact support@muhammad-ajmal.com.
© 2026 Aivanta. All rights reserved.