adultdate / filament-wirechat
Filament v4 Chat plugin: conversations, direct messages, public chat widget, notifications, responsive UI with emoji picker.
dev-master
2025-08-29 18:02 UTC
Requires
- php: ^8.1
- filament/filament: ^3.2|^4.0
- illuminate/support: ^11.0|^12.0
- livewire/livewire: ^3.5
This package is not auto-updated.
Last update: 2025-08-29 21:35:57 UTC
README
A modern Filament v4 chat plugin that provides:
- Conversations & Direct Messages
- Public Chat Widget (embeddable anywhere)
- Filament notifications on new messages
- Admin pages for Conversations, Messages, and Settings
- Mobile‑first, modern UI with emoji picker
- Two‑column user chat page (left conversation list, right message panel)
- Custom CSS/JS bundled with the plugin
- WireChat-inspired architecture (based on ideas from
namumakwembo/wirechat
)
Works with Laravel 11+, PHP 8.2+, Filament v4 (also supports v3.2+).
Quick Start
composer require adultdate/filament-wirechat php artisan vendor:publish --tag=wirechat-config php artisan vendor:publish --tag=wirechat-migrations php artisan vendor:publish --tag=wirechat-assets --force php artisan migrate
Register the plugin in your Filament Panel provider:
// app/Providers/Filament/AdminPanelProvider.php use AdultDate\WireChat\WireChatPlugin; public function panel(\Filament\Panels\Panel $panel): \Filament\Panels\Panel { return $panel ->plugins([ WireChatPlugin::make(), ]); }
Ensure your User model uses the trait and defines relationships:
// app/Models/User.php use AdultDate\WireChat\Concerns\HasWireChat; class User extends Authenticatable { use HasApiTokens, HasFactory, Notifiable, HasWireChat; }
Add the public widget to any Blade view:
<x-wirechat::public-widget />
Open the user chat page (route):
GET /wirechat
(authenticated users)
Features
- Conversations (one-to-one) with pivot membership
- Messages with read receipts, typing indicator, soft deletes
- Filament Notifications when a user receives a new message
- Admin Resources:
- Conversations: list, view, manage members
- Messages: table, filters, soft-delete/restore
- Settings: global switches like enabling widget, max message length, rate limits
- Responsive UI built with Tailwind + Livewire v3
- Emoji Picker (
emoji-picker-element
web component) - Extensible events on message created/read
- Policy-ready; hook up your authorization logic
Configuration
After publishing, edit config/wirechat.php
:
return [ 'user_model' => App\Models\User::class, 'table_prefix' => 'wirechat_', 'enable_public_widget' => true, 'enable_notifications' => true, 'max_message_length' => 4000, 'rate_limit' => [ 'messages_per_minute' => 60, ], ];
Publishable Tags
wirechat-config
–config/wirechat.php
wirechat-migrations
– database tableswirechat-assets
–/public/vendor/wirechat
(CSS/JS)wirechat-views
– Blade views
Credits
- Inspired by architectural patterns from [
namumakwembo/wirechat
]. - Built for Filament v4.
License
MIT