Skip to main content

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
Key Architecture Principle

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

  1. Discovery -- The system scans the Addons/ directory for valid module.json files
  2. Activation -- Active addons are tracked in storage/addons_statuses.json
  3. Registration -- Service providers listed in module.json are registered with Laravel
  4. Boot -- Providers boot, loading routes, views, hooks, commands, and migrations
  5. Asset Linking -- A symlink from public/Addons/{Name} to Addons/{Name}/public/ makes static assets accessible
  6. Execution -- Addon functionality becomes available throughout the application

Addon Lifecycle

StateDescription
AvailableAddon files exist in Addons/ but not yet installed
InstalledDatabase migrations run, configuration published, symlink created
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

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).

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.