Skip to main content

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

  1. Discovery - The system scans the /Addons directory for valid addon folders
  2. Activation - Active addons are tracked in /storage/addons_statuses.json
  3. Registration - Service providers from module.json are registered
  4. Boot - Providers boot, loading routes, views, hooks, and commands
  5. Execution - Addon functionality becomes available

Addon Lifecycle

StateDescription
AvailableAddon files exist but not installed
InstalledDatabase configured, addon ready to use
ActiveCurrently enabled and running
InactiveInstalled but disabled

Addon Types

Addons can be categorized by their primary function:

TypeDescriptionExamples
IntegrationConnect external servicesCRM connectors, payment gateways
FeatureAdd new capabilitiesAdvanced reporting, A/B testing
EnhancementImprove existing featuresCustom editors, bulk tools
UtilitySystem utilitiesBackup tools, log analyzers

License Types

Addons support multiple licensing models:

TypeDescription
nativeVerified against Mumara's main license
marketplaceVerified via Mumara Marketplace
remoteCustom remote license verification
freeNo license required

Getting Started

Ready to build your first addon? Continue to:

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.