alizharb / forgepulse
A dynamic workflow builder for Laravel.
Fund package maintenance!
alizharb
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 17
Watchers: 0
Forks: 1
Open Issues: 0
pkg:composer/alizharb/forgepulse
Requires
- php: ^8.3
- illuminate/contracts: ^12.0
- illuminate/support: ^12.0
- laravel/framework: ^12.0
- livewire/livewire: ^3.0|^4.0
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.0|^8.0
- orchestra/testbench: ^8.0|^9.0|^10.0
- pestphp/pest: ^2.0|^3.0
- pestphp/pest-plugin-arch: ^2.0|^3.0
- pestphp/pest-plugin-laravel: ^2.0|^3.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
README
ForgePulse is a powerful, production-ready Laravel package for building dynamic workflows with a drag-and-drop interface, conditional branching, and real-time execution tracking.
Note: This project was formerly known as FlowForge. It has been renamed to ForgePulse.
β¨ Features
Explore Full Features & Screenshots β
- π¨ Drag-and-Drop Workflow Designer - Visual workflow builder using Livewire 4 and Alpine.js
- π Conditional Branching - Complex if/else rules with 22+ comparison operators (v1.2.0)
- π Workflow Versioning - Automatic version tracking with rollback capability (v1.2.0)
- π¨ Modern UI - Glassmorphism toolbar, draggable minimap, keyboard shortcuts (v1.2.0)
- β©οΈ Undo/Redo - Full state management with βZ/ββ§Z support (v1.2.0)
- πΊοΈ Interactive Minimap - Real-time workflow overview with click navigation (v1.2.0)
- β¨οΈ Keyboard Shortcuts - Efficient workflow editing with hotkeys (v1.2.0)
- π Enhanced Dark Mode - Beautiful UI with global dark mode support (v1.2.0)
- β±οΈ Timeout Orchestration - Configure step timeouts with automatic termination (v1.1.0)
- βΈοΈ Pause/Resume Workflows - Pause and resume executions mid-flow (v1.1.0)
- π Parallel Execution - Execute multiple steps concurrently (v1.1.0)
- π Execution Scheduling - Schedule workflows for future execution (v1.1.0)
- π REST API - Full API for mobile monitoring and integrations (v1.1.0)
- π Workflow Templates - Save, load, and reuse workflow configurations
- β‘ Real-Time Execution Tracking - Live monitoring with Livewire reactivity
- π Laravel 12 Integration - Seamless integration with events, jobs, and notifications
- π Role-Based Access Control - Granular permissions for workflow actions
- π― 7 Step Types - Actions, conditions, delays, notifications, webhooks, events, and jobs
- π Execution Logging - Detailed step-by-step execution logs with performance metrics
- π Multi-Language - Built-in support for English, Spanish, French, German, and Arabic (v1.2.0)
- π PHP 8.3+ & Laravel 12 - Modern codebase with enums, readonly properties, and attributes
- β Fully Tested - Comprehensive test suite with Pest 3
π Requirements
- PHP 8.3, 8.4, or 8.5
- Laravel 12
- Livewire 4
π¦ Installation
Install the package via Composer:
composer require alizharb/forgepulse
Publish the configuration file:
php artisan vendor:publish --tag=forgepulse-config
Publish and run the migrations:
php artisan vendor:publish --tag=forgepulse-migrations php artisan migrate
Optionally, publish the views and assets:
php artisan vendor:publish --tag=forgepulse-views php artisan vendor:publish --tag=forgepulse-assets php artisan vendor:publish --tag=forgepulse-lang
Asset Inclusion
To ensure the ForgePulse UI renders correctly, you must include the package's CSS file in your application's layout (usually resources/views/layouts/app.blade.php):
<link href="{{ asset('vendor/forgepulse/css/forgepulse.css') }}" rel="stylesheet">
π Quick Start
1. Create a Workflow
use AlizHarb\ForgePulse\Models\Workflow; use AlizHarb\ForgePulse\Enums\WorkflowStatus; $workflow = Workflow::create([ 'name' => 'User Onboarding', 'description' => 'Automated user onboarding process', 'status' => WorkflowStatus::ACTIVE, ]);
2. Add Workflow Steps
use AlizHarb\ForgePulse\Enums\StepType; // Send welcome email $workflow->steps()->create([ 'name' => 'Send Welcome Email', 'type' => StepType::NOTIFICATION, 'position' => 1, 'configuration' => [ 'notification_class' => \App\Notifications\WelcomeEmail::class, 'recipients' => ['{{user_id}}'], ], ]); // Wait 1 day $workflow->steps()->create([ 'name' => 'Wait 24 Hours', 'type' => StepType::DELAY, 'position' => 2, 'configuration' => [ 'seconds' => 86400, ], ]);
3. Execute the Workflow
// Execute asynchronously (queued) $execution = $workflow->execute([ 'user_id' => $user->id, 'email' => $user->email, ]); // Execute synchronously $execution = $workflow->execute(['user_id' => $user->id], async: false);
4. Use the Visual Builder
Include the Livewire component in your Blade view:
<livewire:forgepulse::workflow-builder :workflow="$workflow" />
π Documentation
For comprehensive documentation, visit our interactive documentation site or check the docs/ directory.
Key Topics
π― Step Types
ForgePulse supports 7 step types out of the box:
Action Step
Execute custom action classes:
use AlizHarb\ForgePulse\Enums\StepType; $step = $workflow->steps()->create([ 'type' => StepType::ACTION, 'configuration' => [ 'action_class' => \App\Actions\ProcessUserData::class, 'parameters' => ['user_id' => '{{user_id}}'], ], ]);
Notification Step
Send Laravel notifications:
$step = $workflow->steps()->create([ 'type' => StepType::NOTIFICATION, 'configuration' => [ 'notification_class' => \App\Notifications\OrderConfirmation::class, 'recipients' => ['{{user_id}}'], ], ]);
Webhook Step
Make HTTP requests to external services:
$step = $workflow->steps()->create([ 'type' => StepType::WEBHOOK, 'configuration' => [ 'url' => 'https://api.example.com/webhook', 'method' => 'POST', 'headers' => ['Authorization' => 'Bearer token'], 'payload' => ['data' => '{{context}}'], ], ]);
See full documentation for all step types β
π Conditional Branching
Add conditions to steps for dynamic workflow paths:
use AlizHarb\ForgePulse\Enums\StepType; $step->update([ 'conditions' => [ 'operator' => 'and', 'rules' => [ ['field' => 'user.role', 'operator' => '==', 'value' => 'premium'], ['field' => 'order.total', 'operator' => '>', 'value' => 100], ], ], ]);
Supported Operators
Basic Operators:
- Equality:
==,===,!=,!== - Comparison:
>,>=,<,<= - Arrays:
in,not_in - Strings:
contains,starts_with,ends_with - Null checks:
is_null,is_not_null,is_empty,is_not_empty
Advanced Operators (v1.2.0):
- Pattern matching:
regex,not_regex - Range checks:
between,not_between - Array operations:
in_array,not_in_array,contains_all,contains_any - Length comparisons:
length_eq,length_gt,length_lt
// Example: Regex pattern matching $step->update([ 'conditions' => [ 'operator' => 'and', 'rules' => [ ['field' => 'email', 'operator' => 'regex', 'value' => '/^[a-z]+@company\.com$/'], ['field' => 'age', 'operator' => 'between', 'value' => [18, 65]], ['field' => 'permissions', 'operator' => 'contains_all', 'value' => ['read', 'write']], ], ], ]);
π Workflow Templates
Save workflows as reusable templates:
// Save as template $template = $workflow->saveAsTemplate('User Onboarding Template'); // Create workflow from template $newWorkflow = $template->instantiateFromTemplate('New Onboarding'); // Export template to file $templateManager = app(\AlizHarb\ForgePulse\Services\TemplateManager::class); $path = $templateManager->export($template); // Import template from file $workflow = $templateManager->import($path, 'Imported Workflow');
β‘ Real-Time Execution Tracking
Monitor workflow execution in real-time:
<livewire:forgepulse::workflow-execution-tracker :execution="$execution" />
The tracker automatically polls for updates and displays:
- Execution status and progress
- Step-by-step execution logs
- Performance metrics
- Error messages
β±οΈ Timeout Orchestration (v1.1.0)
Configure timeouts for individual steps to prevent long-running operations:
$step->update([ 'timeout' => 30, // seconds ]);
If a step exceeds its timeout, it will be automatically terminated and marked as failed. Requires the pcntl PHP extension. Gracefully degrades if not available.
βΈοΈ Pause/Resume Workflows (v1.1.0)
Pause and resume workflow executions:
// Pause execution $execution->pause('Waiting for manual approval'); // Resume execution $execution->resume(); // Check if paused if ($execution->isPaused()) { echo "Paused: " . $execution->pause_reason; }
π Parallel Execution (v1.1.0)
Execute multiple steps concurrently for improved performance:
// Configure steps to run in parallel $step1->update([ 'execution_mode' => 'parallel', 'parallel_group' => 'email-notifications', ]); $step2->update([ 'execution_mode' => 'parallel', 'parallel_group' => 'email-notifications', ]); // Both steps will execute concurrently
π Execution Scheduling (v1.1.0)
Schedule workflows for future execution:
$execution = $workflow->execute([ 'scheduled_at' => now()->addHours(2), 'context' => ['user_id' => 123], ]);
π REST API (v1.1.0)
ForgePulse provides a full REST API for mobile monitoring and integrations:
# List workflows GET /api/forgepulse/workflows # Get workflow details GET /api/forgepulse/workflows/{id} # List executions GET /api/forgepulse/executions # Get execution details GET /api/forgepulse/executions/{id} # Pause execution POST /api/forgepulse/executions/{id}/pause # Resume execution POST /api/forgepulse/executions/{id}/resume
Configure API settings in config/forgepulse.php:
'api' => [ 'enabled' => true, 'middleware' => ['api', 'auth:sanctum'], ],
π Workflow Versioning (v1.2.0)
ForgePulse automatically tracks workflow versions, enabling you to view history and rollback changes:
// Automatic versioning on save (enabled by default) $workflow->save(); // Creates version automatically // Manual version creation $version = $workflow->createVersion('Before major changes'); // View version history $versions = $workflow->versions; // Rollback to a previous version $workflow->restoreVersion($versionId); // Compare versions $latestVersion = $workflow->latestVersion(); $diff = $latestVersion->compare($previousVersion);
Configure versioning in config/forgepulse.php:
'versioning' => [ 'enabled' => true, 'max_versions' => 50, 'auto_version_on_save' => true, 'retention_days' => 90, ],
π Events
ForgePulse dispatches the following events:
WorkflowStarted- When workflow execution beginsWorkflowCompleted- When workflow completes successfullyWorkflowFailed- When workflow execution failsStepExecuted- After each step execution
Listen to these events in your EventServiceProvider:
use AlizHarb\ForgePulse\Events\WorkflowCompleted; use App\Listeners\SendWorkflowCompletionNotification; protected $listen = [ WorkflowCompleted::class => [ SendWorkflowCompletionNotification::class, ], ];
π Multi-Language Support
ForgePulse includes built-in translations for:
- π¬π§ English
- πͺπΈ Spanish
- π«π· French
- π©πͺ German
- πΈπ¦ Arabic (with RTL support)
Set your application locale:
app()->setLocale('es'); // Spanish app()->setLocale('fr'); // French app()->setLocale('de'); // German app()->setLocale('ar'); // Arabic
βοΈ Configuration
The configuration file (config/forgepulse.php) allows you to customize:
- Execution settings (timeout, retries, queue)
- Role-based permissions
- Template storage
- Event hooks
- Notification channels
- Caching options
- UI preferences
Team Integration (Optional)
ForgePulse supports optional team integration. To enable it:
-
Enable teams in
config/forgepulse.php:'teams' => [ 'enabled' => true, 'model' => \App\Models\Team::class, ],
-
Ensure your
teamstable exists before running migrations. If enabled, ForgePulse will add ateam_idforeign key to theworkflowstable.
Permissions
By default, ForgePulse enforces Role-Based Access Control (RBAC). To disable all permission checks (e.g., for local testing or demos), update your configuration:
'permissions' => [ 'enabled' => false, // ... ],
π§ͺ Testing
Run the test suite:
composer test
Run tests with coverage:
composer test:coverage
Run static analysis:
composer analyse
Format code:
composer format
π Security
If you discover any security-related issues, please email harbzali@gmail.com instead of using the issue tracker.
π₯ Credits
π License
The MIT License (MIT). Please see License File for more information.
π€ Contributing
Please see CONTRIBUTING for details.
π Changelog
Please see CHANGELOG for more information on what has changed recently.
π Support
If you find this package helpful, please consider:
- β Starring the repository
- π Reporting bugs
- π‘ Suggesting new features
- π Improving documentation
- π Contributing code
Made with β€οΈ by Ali Harb
Release Date: November 27, 2025 | Version: 1.2.0
