PushService, SubscriptionManager), enabling selective adoption (e.g., only use push notifications without full Filament admin).web-push PHP library (for server-side push handling) and filament/support (for Filament-specific utilities).| Risk Area | Assessment | Mitigation Strategy |
|---|---|---|
| Filament Version Lock | Hard dependency on Filament v3.x; breaking changes may occur with major Filament updates. | Pin to a specific Filament version in composer.json; monitor Filament’s deprecations. |
| Web Push Complexity | Misconfigured VAPID keys, CORS, or service worker scope can break notifications. | Use the package’s built-in validation (e.g., PushService::validateSubscription()). |
| Browser Support | Safari/Edge may have limited PWA support; some users may opt out. | Implement fallback UX (e.g., email/SMS as secondary channels) via Filament’s notification system. |
| Scalability | High-volume pushes may overwhelm Laravel queues. | Configure web-push batching and use Laravel’s batch: command for queue workers. |
| Security | VAPID keys must be protected; subscription data may leak if exposed. | Store keys in Laravel’s .env; use Filament’s policy gates to restrict access. |
Filament Version:
Push Use Cases:
Infrastructure:
/_ah/queue/push is exposed.Frontend Setup:
Scaling:
Monitoring:
queue:work or Horizon for async pushes.Prerequisites:
composer require filament/filament).php artisan filament-webpush:generate-keys).Installation:
composer require andrefelipe18/filament-webpush
php artisan vendor:publish --provider="Andrefelipe18\FilamentWebpush\FilamentWebpushServiceProvider"
config/filament-webpush.php) and update with your VAPID keys.Frontend Setup:
import { registerServiceWorker } from 'filament-webpush';
registerServiceWorker('/service-worker.js');
Backend Integration:
use Andrefelipe18\FilamentWebpush\Widgets\PushSubscriptionWidget;
PushSubscriptionWidget::make()->subscribeUsers();
PushService:
use Andrefelipe18\FilamentWebpush\Facades\PushService;
PushService::send('Welcome!', ['user_id' => 1]);
Testing:
filament_webpush_subscriptions table (or custom adapter).| Component | Compatibility Notes |
|---|---|
| Filament v3.x | Full support. Avoid v2.x (breaking changes). |
| Laravel 10+ | Tested on Laravel 10/11; may need minor tweaks for older versions. |
| PHP 8.1+ | Requires PHP 8.1+ (for named arguments, attributes). |
| Service Workers | Must use W3C-compliant service workers (no legacy PushManager). |
| Databases | Defaults to Eloquent; supports custom storage (e.g., Redis via subscription_adapter). |
Phase 1: Setup (1-2 days)
Phase 2: Core Functionality (2-3 days)
Phase 3: Advanced Features (3-5 days)
Phase 4: Optimization (Ongoing)
andrefelipe18/filament-webpush for updates (MIT license allows forks if needed).web-push PHP library may require updates for security patches (e.g., VAPID key rotation).composer.json to avoid breaking changes:
"andrefelipe18/filament-webpush": "^1.0",
"web-push": "^5.0"
.env (never in Git).php artisan config:cache) in production.How can I help you explore Laravel packages today?