zedmagdy/filament-chat
Filament v4+ chat plugin for Laravel: configurable chat sources, 1:1 and group conversations, text + file attachments via Spatie Media Library, read/unread tracking, search, and real-time updates via polling or broadcasting (Reverb/Pusher).
Architecture Fit
PanelProvider, Pages), reducing friction for teams already using Filament.Integration Feasibility
table_prefix configuration. Assumes a relational database (no NoSQL support).Technical Risk
messages_per_page, conversations_per_page) may need adjustment for large-scale deployments (e.g., 10K+ messages).getAvailableParticipantsQuery) must be implemented carefully to avoid performance issues with broad queries.Key Questions
config/filament-chat.php.conversations_per_page and messages_per_page tuned for your dataset size.Message model or use custom fields.chat_* tables).Stack Fit
PanelProvider and Page classes, requiring minimal boilerplate beyond the provided Artisan commands.config/filament-chat.php for disk/collection overlaps.Migration Path
composer require zedmagdy/filament-chat
php artisan vendor:publish --tag="filament-chat-migrations"
php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider" --tag="medialibrary-migrations"
php artisan migrate
HasChats trait to participant models (e.g., User, Patient).use ZEDMagdy\FilamentChat\Traits\HasChats;
class User extends Authenticatable { use HasChats; }
php artisan make:chat-source Staff --model=User
ChatSource and override methods (e.g., getAvailableParticipantsQuery).AdminPanelProvider:
->plugin(FilamentChatPlugin::make()->sources([StaffChatSource::class]))
FILAMENT_CHAT_REALTIME_MODE=broadcasting in .env if using WebSockets.config/broadcasting.php.Compatibility
Sequencing
Maintenance
composer.json if stability is critical:
"zedmagdy/filament-chat": "^1.0"
MessageSent and MessagesRead events for debugging.chat-attachments collection).Support
php artisan queue:work --sleep=3 --tries=1
Scaling
messages_per_page limits. Optimize with:
conversations.source, messages.conversation_id, participants.conversation_id.softDeletes.How can I help you explore Laravel packages today?