Alert Handlers
An alert handler turns domain events into alerts. Each handler implements App\Contracts\AlertHandlerContract and is registered by a module through the alertHandlers() method of the module contract. When the core receives an event, it iterates over the handlers of the modules enabled for the site and, for each one whose triggerEvents() matches, creates (or resolves) an alert.
Module Contract
Every ION Guard module implements the App\Contracts\ModuleContract interface. It is the single contract between the core and the module: the core only knows the module through these methods. The abstract class App\Contracts\BaseModule implements the entire contract with empty defaults, leaving only the four identity methods required — all others are optional and you override only what the module uses.
Creating a Module
Step-by-step guide to creating a new module for the ION Guard platform.
Hardware Drivers
Drivers translate physical BLE hardware (antennas/gateways and beacons from different manufacturers) into the platform's internal model — normalizing RSSI readings, battery mapping, and payload format. In ION Guard, the drivers do not live in the core: they belong to the Synapsys tracking module (indoor-location), which is distributed as a package and is not part of the core repository.
Modular Frontend
ION Guard modules bring their own frontend (React + Inertia). Each module is built independently and distributed as an ESM bundle; the core loads that bundle at runtime and integrates its pages, translations, and slot components — without recompiling the core.
Report Handlers
A report handler defines a report available on the platform: its filters, export formats, minimum permission, and execution logic. Each handler implements App\Contracts\ReportContract and is registered by a module through the reportHandlers() method of the module contract. Core reports also implement this contract.
Module System
ION Guard uses a modular architecture where features are encapsulated in independent modules. Each module is self-contained — it has its own models, migrations, routes, controllers, frontend pages, alert handlers, report handlers, and workers.