Addons Overview
Addons extend Mumara Campaigns with new features, integrations, and functionality without modifying the core application. They follow Laravel's modular architecture patterns, making them maintainable, upgradeable, and distributable.
What Are Addons?
Addons are self-contained modules that integrate seamlessly with Mumara Campaigns. Each addon:
- Lives in its own directory under
/Addons - Has its own routes, controllers, views, and models
- Can hook into core application events
- Manages its own database migrations
- Can be installed, updated, and removed independently
What Can Addons Do?
Extend the User Interface
- Add new pages and menu items
- Inject content into existing pages via hooks
- Create custom dashboards and widgets
- Add new settings panels
Add New Features
- Implement new campaign types
- Create custom contact import sources
- Add reporting and analytics
- Build automation triggers
Integrate External Services
- Connect to CRMs (Salesforce, HubSpot)
- Integrate payment gateways
- Add SMS providers
- Connect to analytics platforms
Customize Behavior
- Modify email processing workflows
- Add custom validation rules
- Implement custom authentication methods
- Create scheduled background tasks
Addon Architecture
Addons are built on the nwidart/laravel-modules package, providing a robust modular foundation:
Addons/
├── YourAddon/
│ ├── module.json # Addon manifest
│ ├── composer.json # PHP dependencies
│ ├── Config/ # Configuration files
│ ├── Console/ # Artisan commands
│ ├── Database/
│ │ ├── Migrations/ # Database migrations
│ │ └── Seeders/ # Data seeders
│ ├── Entities/ # Eloquent models
│ ├── Http/
│ │ ├── Controllers/ # Request handlers
│ │ ├── Middleware/ # HTTP middleware
│ │ └── Requests/ # Form requests
│ ├── Providers/ # Service providers
│ ├── Resources/
│ │ ├── views/ # Blade templates
│ │ ├── lang/ # Translations
│ │ └── assets/ # CSS, JS, images
│ ├── Routes/ # Route definitions
│ ├── Settings/ # Addon settings
│ ├── hooks/ # Hook implementations
│ ├── Helpers/ # Helper functions
│ └── functions.php # Lifecycle functions
How Addons Are Loaded
- Discovery - The system scans the
/Addonsdirectory for valid addon folders - Activation - Active addons are tracked in
/storage/addons_statuses.json - Registration - Service providers from
module.jsonare registered - Boot - Providers boot, loading routes, views, hooks, and commands
- Execution - Addon functionality becomes available
Addon Lifecycle
| State | Description |
|---|---|
| Available | Addon files exist but not installed |
| Installed | Database configured, addon ready to use |
| Active | Currently enabled and running |
| Inactive | Installed but disabled |
Addon Types
Addons can be categorized by their primary function:
| Type | Description | Examples |
|---|---|---|
| Integration | Connect external services | CRM connectors, payment gateways |
| Feature | Add new capabilities | Advanced reporting, A/B testing |
| Enhancement | Improve existing features | Custom editors, bulk tools |
| Utility | System utilities | Backup tools, log analyzers |
License Types
Addons support multiple licensing models:
| Type | Description |
|---|---|
native | Verified against Mumara's main license |
marketplace | Verified via Mumara Marketplace |
remote | Custom remote license verification |
free | No license required |
Getting Started
Ready to build your first addon? Continue to:
- Creating an Addon - Generate and configure your addon
- Directory Structure - Understand the file layout
- Configuration - Set up addon metadata and settings
Key Concepts
Before diving in, familiarize yourself with these concepts:
Service Providers
Service providers bootstrap your addon, registering routes, views, commands, and other services. Every addon has at least one service provider.
Hooks
Hooks let you extend core functionality without modifying source files. Your addon can listen to events (module hooks) or inject content (output hooks).
Routes & Controllers
Like standard Laravel applications, addons define routes that map URLs to controller actions. Addon routes can use middleware for authentication and authorization.
Views & Assets
Blade templates render your addon's UI. Assets (CSS, JS) can be compiled with Laravel Mix and published to the public directory.
Migrations
Database migrations manage your addon's schema. They run during installation and updates, ensuring the database stays in sync with your code.