Addons Overview
Addons extend Mumara Campaigns with new features, integrations, and functionality without modifying the core application. Built on nwidart/laravel-modules v12, they follow Laravel's modular architecture, making them maintainable, upgradeable, and distributable.
What Are Addons?
Addons are self-contained Laravel modules that integrate seamlessly with Mumara Campaigns. Each addon:
- Lives in its own directory under
Addons/ - Has its own routes, controllers, views, and models
- Manages its own database migrations and seeders
- Can hook into core application events
- Serves static assets from a dedicated
public/directory - 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/
└── YourAddon/
├── module.json # Addon manifest (required)
├── composer.json # PHP dependencies
├── Config/ # Configuration files
├── Console/ # Artisan commands
├── Database/
│ ├── Migrations/ # Database migrations
│ └── Seeders/ # Data seeders
├── Helpers/ # Helper functions
├── hooks/ # Hook implementations
├── Http/
│ ├── Controllers/ # Request handlers
│ ├── Middleware/ # HTTP middleware
│ └── Requests/ # Form requests
├── Models/ # Eloquent models
├── Providers/ # Service providers
├── public/ # Web-accessible static assets
│ ├── css/
│ ├── js/
│ ├── images/
│ └── fonts/
├── Resources/
│ ├── views/ # Blade templates
│ ├── lang/ # Translations
│ └── assets/ # Source assets (SASS, uncompiled JS)
├── Routes/ # Route definitions
├── Settings/ # Addon metadata & install scripts
└── functions.php # Lifecycle functions
Only the public/ directory inside your addon is exposed to the web via a symlink. All other directories (Controllers, Models, Config, Routes, etc.) remain private and inaccessible from the browser. This is a security requirement -- never place sensitive files in public/.
How Addons Are Loaded
- Discovery -- The system scans the
Addons/directory for validmodule.jsonfiles - Activation -- Active addons are tracked in
storage/addons_statuses.json - Registration -- Service providers listed in
module.jsonare registered with Laravel - Boot -- Providers boot, loading routes, views, hooks, commands, and migrations
- Asset Linking -- A symlink from
public/Addons/{Name}toAddons/{Name}/public/makes static assets accessible - Execution -- Addon functionality becomes available throughout the application
Addon Lifecycle
| State | Description |
|---|---|
| Available | Addon files exist in Addons/ but not yet installed |
| Installed | Database migrations run, configuration published, symlink created |
| 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
- Views & Assets -- Templates and static asset management
Key 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).
Public Assets & Symlinks
Static assets (CSS, JS, images, fonts) live in your addon's public/ directory. A symlink at public/Addons/{Name}/ points to this directory, making assets web-accessible while keeping everything else private. See Views & Assets for details.
Routes & Controllers
Like standard Laravel applications, addons define routes that map URLs to controller actions. Addon routes can use middleware for authentication and authorization.
Migrations
Database migrations manage your addon's schema. They run during installation and updates, ensuring the database stays in sync with your code.