Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filament Whatsapp Conector Laravel Package

wallacemartinss/filament-whatsapp-conector

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Filament v5 Native: The package is designed specifically for Filament v5, leveraging its UI components, Livewire, and Alpine.js for real-time interactions. This ensures seamless integration with existing Filament-based admin panels.
  • Modular Design: The plugin follows a modular approach, allowing selective inclusion of resources (e.g., message history, webhook logs) via configuration methods like viewMessageHistory() and viewWebhookLogs().
  • Evolution API v2 Abstraction: The package abstracts the Evolution API v2, providing a clean facade (Whatsapp) and trait (CanSendWhatsappMessage) for programmatic interactions, reducing direct API dependency in business logic.
  • Multi-Tenancy Support: Built-in support for Filament’s native multi-tenancy, enabling tenant-specific WhatsApp instances and configurations.

Integration Feasibility

  • Laravel 11/12 Compatibility: Requires PHP 8.2+ and Laravel 11/12, aligning with modern Laravel stacks. No breaking changes expected for these versions.
  • Filament v5 Dependency: Mandatory Filament v5 integration means the package is only viable for projects already using Filament. For non-Filament projects, a custom UI layer would be required.
  • Evolution API v2 Dependency: Requires an active Evolution API v2 instance (v2.4.0+ for interactive messages). Compatibility with other WhatsApp APIs (e.g., Meta’s official API) is not supported.
  • Queue System: Relies on Laravel queues for asynchronous webhook processing and message sending. Projects without queue workers (e.g., queue:work) will need setup.

Technical Risk

  • Webhook Reliability: Webhook handling depends on external API calls and queue processing. Misconfigurations (e.g., incorrect EVOLUTION_WEBHOOK_SECRET) or queue failures could lead to missed events.
  • File Storage: Media messages (images, videos, documents) require proper storage (e.g., S3, local disk). The package defaults to Laravel’s default disk but lacks built-in validation for disk availability.
  • Interactive Messages (v2.4.0+): Features like buttons, lists, and carousels require Evolution API v2.4.0+. Projects using older versions will miss these functionalities.
  • Multi-Tenancy Complexity: While supported, multi-tenancy requires proper configuration of the tenancy array in config/filament-evolution.php. Incorrect settings may lead to data leakage or access issues.
  • Livewire/Alpine.js Dependencies: Real-time features (e.g., QR code countdown) rely on Livewire and Alpine.js. Projects with custom frontend setups may need adjustments.

Key Questions

  1. API Costs and Limits: How does the project handle Evolution API rate limits or cost management? Are there fallback mechanisms for failed API calls?
  2. Media Storage: What storage solution (e.g., S3, local) is planned for WhatsApp media files? Are there backup or redundancy plans?
  3. Queue Monitoring: How will queue failures (e.g., queue:work crashes) be monitored and alerted? Are there retries or dead-letter queues?
  4. Webhook Security: Is the EVOLUTION_WEBHOOK_SECRET securely managed (e.g., vault, env variables)? How are webhook signatures validated?
  5. Multi-Tenancy Strategy: If multi-tenancy is used, how are WhatsApp instances and configurations scoped per tenant? Are there tenant-specific API keys?
  6. Interactive Message Usage: For projects requiring interactive messages (buttons, lists), is Evolution API v2.4.0+ confirmed available?
  7. Compliance: Does the project need to comply with WhatsApp Business API policies (e.g., message templates, opt-in requirements)? How will this be enforced?
  8. Performance: How will high-volume message sending (e.g., bulk notifications) be handled? Are there concurrency limits or batching strategies?
  9. Testing: Are there plans to test webhook reliability, message delivery, and error scenarios (e.g., failed QR scans, API downtime)?
  10. Customization: Are there plans to extend or override default UI components (e.g., message history table, QR code modal)?

Integration Approach

Stack Fit

  • Laravel 11/12: The package is fully compatible with Laravel’s latest versions, using modern features like enums, model macros, and queue improvements.
  • Filament v5: Native integration with Filament’s resource system, Livewire components, and Tailwind CSS. No conflicts expected with Filament’s core or other Filament plugins.
  • Queue System: Leverages Laravel queues (database, Redis, etc.) for asynchronous webhook processing. Projects already using queues will have minimal overhead.
  • Storage: Uses Laravel’s filesystem (local, S3, etc.) for media storage. No additional storage layer is required beyond what the project already supports.
  • Frontend: Relies on Filament’s built-in Livewire/Alpine.js setup. Custom frontend projects would need to replicate this functionality.

Migration Path

  1. Prerequisites Check:
    • Verify Laravel 11/12 and Filament v5 are in use.
    • Confirm Evolution API v2 instance is available (v2.4.0+ for interactive messages).
    • Ensure a queue worker (queue:work) is configured or planned.
  2. Installation:
    • Composer install: composer require wallacemartinss/filament-whatsapp-conector.
    • Publish config and migrations: php artisan vendor:publish --tag="filament-evolution-config" and php artisan vendor:publish --tag="filament-evolution-migrations".
    • Run migrations: php artisan migrate.
  3. Configuration:
    • Set up .env with EVOLUTION_URL, EVOLUTION_API_KEY, and webhook settings.
    • Configure Tailwind CSS to include the plugin’s assets.
    • Register the plugin in PanelProvider:
      FilamentEvolutionPlugin::make()
          ->whatsappInstanceResource()
          ->viewMessageHistory()
          ->viewWebhookLogs();
      
  4. Webhook Setup:
    • Define a route for webhooks (e.g., api/webhooks/evolution).
    • Verify the route handles incoming requests and validates the EVOLUTION_WEBHOOK_SECRET.
  5. Queue Worker:
    • Start the queue worker: php artisan queue:work. For production, use Supervisor or similar.
  6. Testing:
    • Test QR code generation and scanning for WhatsApp instances.
    • Verify message sending (text, media, interactive) via the Filament action and facade.
    • Simulate webhook events to ensure logs and message history are recorded.

Compatibility

  • Filament Plugins: The package is designed to coexist with other Filament plugins. However, conflicts may arise if other plugins modify Filament’s core components (e.g., Livewire scripts, Tailwind classes).
  • Laravel Packages: No known conflicts with popular Laravel packages (e.g., Spatie, Laravel Nova). However, packages modifying Filament’s internals (e.g., custom Livewire components) may require testing.
  • Custom Filament Themes: If the project uses a custom Filament theme, ensure the plugin’s Tailwind classes are not overridden. The @source directive in resources/css/filament/admin/theme.css should suffice.
  • Multi-Tenancy: If using Laravel Breeze/Jetstream or custom multi-tenancy, ensure the tenancy config aligns with the project’s tenant model (e.g., team_id column).

Sequencing

  1. Phase 1: Setup and Configuration
    • Install the package and publish assets.
    • Configure .env and config/filament-evolution.php.
    • Register the plugin in PanelProvider.
    • Set up webhook route and queue worker.
  2. Phase 2: Core Functionality
    • Test WhatsApp instance creation and QR code scanning.
    • Verify message sending via the Filament action and facade.
    • Confirm webhook events are logged and processed.
  3. Phase 3: Advanced Features
    • Enable message history and webhook logs resources.
    • Implement interactive messages (if using Evolution API v2.4.0+).
    • Integrate the CanSendWhatsappMessage trait into business logic.
  4. Phase 4: Optimization
    • Schedule cleanup command (evolution:cleanup) for maintenance.
    • Monitor queue performance and adjust concurrency if needed.
    • Set up alerts for webhook failures or queue backlogs.

Operational Impact

Maintenance

  • Configuration Management:
    • Centralized config in config/filament-evolution.php and .env simplifies maintenance.
    • Environment variables for sensitive data (API keys, secrets) align with Laravel best practices.
  • Cleanup Command:
    • Automated cleanup of old webhooks/messages via evolution:cleanup reduces manual database maintenance.
    • Scheduling this command (e.g., daily) is recommended for production.
  • Updates:
    • Minor updates (e.g., bug fixes) can be applied via Composer. Major updates may require testing for Filament/Evolution API compatibility.
    • Monitor the package’s [changelog](https://github.com/wallacem
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
ecotone/kafka
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata