mohamedhekal / flowforge
Embeddable Laravel workflow engine: linear definitions, allowlisted actions, delays, and run history
v0.1.0
2026-07-16 14:23 UTC
Requires
- php: ^8.2
- illuminate/bus: ^11.0|^12.0
- illuminate/contracts: ^11.0|^12.0
- illuminate/database: ^11.0|^12.0
- illuminate/events: ^11.0|^12.0
- illuminate/http: ^11.0|^12.0
- illuminate/queue: ^11.0|^12.0
- illuminate/support: ^11.0|^12.0
Requires (Dev)
- laravel/pint: ^1.18
- orchestra/testbench: ^9.0|^10.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- phpstan/phpstan: ^2.0
README
Search terms: laravel, workflow, automation, rules, erp, queue, php, laravel-package, workflow-engine, business-process, orchestration.
Embeddable Laravel workflow engine for ERP/CRM/OMS automation: versioned linear definitions, allowlisted actions, delays, and durable run history.
Installation
composer require mohamedhekal/flowforge php artisan vendor:publish --tag=flowforge-config php artisan migrate
Publish a workflow
use Hekal\FlowForge\Facades\FlowForge; FlowForge::publish('Order notify', [ 'steps' => [ [ 'key' => 'log', 'type' => 'action', 'action' => 'log', 'params' => ['message' => 'order received'], ], [ 'key' => 'wait', 'type' => 'delay', 'seconds' => 60, ], [ 'key' => 'hook', 'type' => 'action', 'action' => 'webhook', 'params' => ['url' => 'https://example.test/hooks/order'], ], ], ], slug: 'order-notify');
Start a run
$run = FlowForge::start('order-notify', ['order_id' => 42]); // Continues via ContinueWorkflowRunJob (sync in tests; queue in production)
Custom actions
Actions are allowlisted. Register in config or at runtime:
FlowForge::extend('reserve-stock', ReserveStockAction::class);
Built-ins: log, webhook, noop.
Limitations (v0.1)
- Linear steps only (no branching / parallel)
- No approval gates
- No visual builder
- Delays use queued job delay; sync driver runs immediately
Testing
composer install && composer test
License
MIT