syofyanzuhad/filament-chatflow

A conversational chatbot flow builder plugin for Filament v3 with conditional logic and floating chat widget

Fund package maintenance!
syofyanzuhad

Installs: 9

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/syofyanzuhad/filament-chatflow

v2.0.7 2025-11-23 12:17 UTC

This package is auto-updated.

Last update: 2025-11-23 12:17:40 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A powerful conversational flow builder plugin for Filament v3. Create interactive chatbot experiences with conditional logic, multi-language support, and comprehensive analytics.

Note: This is the stable branch for Filament v3. For Filament v4 support, use the v4 branch or install version ^2.0.

Features

  • ๐ŸŽจ Visual Flow Builder - Build chat flows with an intuitive form-based interface
  • ๐Ÿ’ฌ Floating Chat Widget - Beautiful, responsive chat widget that works on all pages
  • ๐ŸŒ Multi-Language Support - Built-in support for multiple languages (English & Indonesian included)
  • ๐Ÿ“Š Analytics Dashboard - Track conversation metrics, completion rates, and drop-off points
  • ๐Ÿ“ง Email Transcripts - Automatically send conversation transcripts via email
  • ๐ŸŽฏ Conditional Logic - Create complex conversation flows with if-else branching
  • ๐Ÿ”” Sound Notifications - Optional sound notifications for new messages
  • ๐ŸŒ™ Dark Mode Support - Full dark mode compatibility
  • โšก Rate Limiting - Built-in API rate limiting for security
  • ๐Ÿงช Comprehensive Testing - Full test coverage with Pest v4

Requirements

  • PHP 8.3 or higher
  • Laravel 12.x
  • Filament 3.x
  • Livewire 3.x

Installation

  1. Install the package via composer:
composer require syofyanzuhad/filament-chatflow
  1. Run the installation command:
php artisan filament-chatflow:install

This will publish the config file, migrations, and ask to run migrations.

Alternatively, you can publish and run the migrations manually:

php artisan vendor:publish --tag="filament-chatflow-migrations"
php artisan migrate
  1. Register the plugin in your Filament Panel Provider:
use Syofyanzuhad\FilamentChatflow\FilamentChatflowPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            FilamentChatflowPlugin::make(),
        ]);
}

Configuration

Publish the config file (if not already published):

php artisan vendor:publish --tag="filament-chatflow-config"

The config file contains options for:

  • Widget appearance and behavior
  • Conversation expiration settings
  • Email transcript configuration
  • Analytics settings
  • Rate limiting
  • Security options
  • And more...

Usage

Creating a Chatflow

  1. Navigate to Chatflow in your Filament panel

  2. Click New Chatflow

  3. Fill in basic information:

    • Name
    • Description
    • Welcome message (multi-language supported)
    • Widget position (bottom-right, bottom-left, top-right, top-left)
    • Theme color
    • Email and notification settings
  4. Click Save and you'll be redirected to the Flow Builder

Building the Conversation Flow

The Flow Builder allows you to create conversation steps:

  1. Message Steps - Display information to users
  2. Question Steps - Present options for users to choose
  3. End Steps - Conclude the conversation

Each step supports:

  • Multi-language content (English & Indonesian by default)
  • Nested child steps for complex flows
  • Quick reply options with branching logic

Example flow structure:

Welcome Message
โ””โ”€โ”€ Question: "How can we help you?"
    โ”œโ”€โ”€ Option 1: "Product Inquiry"
    โ”‚   โ””โ”€โ”€ Message: "Visit our catalog..."
    โ”œโ”€โ”€ Option 2: "Technical Support"
    โ”‚   โ””โ”€โ”€ Question: "What issue?"
    โ”‚       โ”œโ”€โ”€ "Login Issue" โ†’ Solution steps
    โ”‚       โ””โ”€โ”€ "Performance" โ†’ Solution steps
    โ””โ”€โ”€ Option 3: "Other"
        โ””โ”€โ”€ Message: "Contact us..."

Adding the Chat Widget to Your Frontend

Add the chat widget to your layout blade file:

<body>
    <!-- Your content -->

    @livewire('chatflow-widget', ['chatflow' => App\Models\Chatflow::find(1)])
</body>

Or use the chatflow ID directly:

@livewire('chatflow-widget', ['chatflow' => $chatflow])

Viewing Conversations

Navigate to Conversations in your Filament panel to:

  • View all conversation history
  • Filter by chatflow, status, date range, or language
  • See detailed message timelines
  • Track user information and metadata

Analytics Dashboard

The Analytics widget on your dashboard shows:

  • Total conversations
  • Active conversations
  • Completed today
  • Average completion rate

Access detailed analytics in the Chatflow Resource to see:

  • Completion rates over time
  • Drop-off points (where users abandon)
  • Popular conversation paths
  • Hourly distribution

API Endpoints

The package provides API endpoints for programmatic access:

// Get chatflow configuration
GET /api/chatflow/{chatflow}/config

// Start a conversation
POST /api/chatflow/{chatflow}/start

// Send a message
POST /api/chatflow/message

// End a conversation
POST /api/chatflow/end

// Get conversation history
GET /api/chatflow/history

Seeding Sample Data

Run the seeder to create a sample customer support chatflow:

php artisan db:seed --class="Syofyanzuhad\\FilamentChatflow\\Database\\Seeders\\ChatflowSeeder"

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.