qalainau/filament-team-chat
Self-hosted Slack-like team chat for Filament v5. Channels, DMs, threads, reactions, mentions, file sharing, search, and unread tracking work out of the box. No external services needed—just Livewire polling and your existing auth and users.
Architecture fit. The package is additive rather than invasive: ten prefixed tables (tc_*), a panel plugin registration, and a HasTeamChat trait on User. It does not alter your existing schema, auth, or user table beyond the trait, and it runs entirely on your existing stack — no Pusher, Redis, or separate socket server. For an application already on Filament, this is a near-zero-architecture-change adoption, which is unusual and attractive for a chat capability. The programmatic API (SendMessage, ToggleReaction, MarkAsRead, SearchMessages, Channel::create, findOrCreateDirectMessage) is the real integration surface — it means seeding, imports, webhooks, and bot-style notifications are day-one capabilities, not roadmap items.
Integration feasibility. Three hard gates decide feasibility before any code is written:
@source registration is mandatory. The package ships unstyled utility classes; Filament v5 only compiles what your theme globs. Without the @source line plus npm run build, the UI renders broken. This is a build-pipeline change, not an app change, and it must be owned by whoever owns the frontend build.Beyond those, the install is roughly 30 minutes of composer, publish, migrate, plugin registration, and trait addition.
Technical risk.
0.x version means minor bumps may carry breaking changes.public. Attachments for private channels and DMs may be retrievable by URL without authorization. This must be validated and, if confirmed, mitigated by switching to a private/S3 disk with signed URLs — assuming the package's link generation supports it.tenancy.enabled is true but the resolver returns null (e.g. Filament::getTenant() outside a tenant-aware context), scoping behaviour must be explicitly tested for cross-tenant leakage.Key questions.
tc_messages soft-delete satisfy them?LIKE scans, and what is the expected message volume at 12 and 36 months?Assessment: adopt only behind a two-week spike and feature flag, only if Filament v5 is already the platform target, and only with a named internal owner. Otherwise, treat it as a reference implementation to fork rather than a dependency to consume.
Stack fit. The package wants a specific combination: Laravel 13, Filament v5, PHP 8.3+, Livewire polling, and a compiled Filament theme. It also fits a specific org shape: self-hosted, data-residency-sensitive, no desire to procure Slack/Teams or operate a WebSocket tier. It does not fit: apps needing real-time, apps on older Filament, or teams without a frontend build step in CI.
Migration path. This is additive — no backfill of existing schema. Two migration scenarios:
Channel::create + members()->attach, done.SendMessage so mentions, attachments, and read-receipt side effects are handled by the package rather than raw inserts. Budget this as a discrete workstream; raw SQL inserts will bypass mention parsing and attachment metadata.Compatibility.
composer require qalainau/filament-team-chat:0.5.1 (or ~0.5.0 at tightest), not ^0.5. At 0.x, a 0.6 release can break you silently.database/migrations, not loaded from the package. New migrations in future releases must be re-published and diffed manually. Add a release-checklist step and a git diff review of the vendor directory on every upgrade.config/team-chat.php on day one even if unchanged, so config drift is visible in review rather than inferred from defaults.Sequencing (recommended).
@source line, npm run build. Validate with two browsers, two users, public channel auto-join, sub-3s cross-window delivery. This proves the whole pipeline before any commitment.null tenant, authorization on channel creation and DM initiation, and modifyAvailableUsersQueryUsing to restrict the DM/mention directory to the intended population.features array; expose to a single pilot team. Disable channels or threads if the org only wants DMs — the toggles make a partial rollout genuinely cheap.Maintenance. Low ongoing code maintenance, moderate recurring ceremony. The recurring tasks are: rebuild the Filament theme on every package upgrade (required — new utility classes are otherwise missing), re-publish and diff migrations when new ones appear, and review config changes across minor versions. Budget roughly 2–4 hours per package release and one half-day per quarter for version review. The bigger cost is framework coupling: every Filament or Laravel upgrade requires a chat compatibility check, so the chat package effectively becomes a gating item in the platform upgrade plan.
Support. There is no commercial support, no SLA, and a very thin community. Realistically the org becomes its own first-line support: triage from the four Livewire components (Sidebar, MessageFeed, MessageComposer, ThreadPanel) and config/team-chat.php. The 102-test suite is the saving grace — it gives an internal owner a fast feedback loop for a fork, and makes "we can maintain this ourselves" a defensible statement. If the business case depends on this package, name an owner and reserve 10–15% of one engineer's capacity. Without that, do not adopt.
Scaling. Two independent curves:
tc_messages and tc_attachments are not. Define a retention policy and an attachment storage lifecycle before month six, not after. Verify whether search is indexed or table-scanning before message counts reach the millions.Failure modes and first-response playbook.
| Symptom | Likely cause | First check |
|---|---|---|
| Unstyled / broken chat UI | Theme not rebuilt or @source missing |
Theme CSS globs, npm run build in CI |
| Messages don't appear for other users | Polling disabled, Livewire broken, or worker starvation | Browser network tab for poll cadence; Livewire version |
| Blank page / route 500 | Migrations not run or tc_ tables missing |
php artisan migrate:status |
| No mention or DM notifications | Notifications table absent | notifications table existence |
| Users see other tenants' channels | Resolver returned null or tenancy disabled |
tenancy.enabled, resolver output per request |
| Attachment 403 / broken previews | Disk permissions or public-disk assumption | uploads.disk, storage symlink |
| Directory shows unintended users | No modifyAvailableUsersQueryUsing restriction |
Plugin configuration |
Add a monitoring signal: a synthetic check that posts a message and asserts persistence, plus error-rate alerting on the chat route. Silent polling failures are the worst-class incident here because the UI looks alive while being stale.
Ramp-up. A competent Laravel/Filament developer reaches working local chat in half a day and productive feature work in two days; the API surface is small and well-documented in the README. A full team including the frontend build owner should budget one week to reach a defensible pilot. Non-technical stakeholders need no training — the interaction model is Slack-shaped and requires no explanation. The genuine ramp-up cost is not learning the package; it is establishing the upgrade discipline (pinned version, migration diffs, theme rebuild in CI) that keeps it from degrading quietly over the next 12 months.
How can I help you explore Laravel packages today?