Search by

ax0705 / flow-designer

nais

Visual business-process (BPM) designer and workflow engine for PHP: drag-and-drop schema editor, tasks for people, approvals, conditions, timers, parallel branches, subprocesses and system actions. Works with Laravel and plain PHP.

Package info

github.com/ax0705/flow-designer

pkg:composer/ax0705/flow-designer

Statistics

Installs: 11

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.2.0 2026-11-27 19:59 UTC

This package is auto-updated.

Last update: 2026-11-27 20:04:13 UTC


README

tests

Visual business-process designer and workflow engine for PHP 8.1+. Draw a process in the browser — tasks for people, approvals, conditions, timers, waiting for events, parallel branches, subprocesses, actions of your system — publish it, and the engine runs it. Works with Laravel and with plain PHP (any framework, any CRM).

Українською · Developer guide · Посібник українською · Demo app

Designer

Features

  • Drag-and-drop designer (React + xyflow, prebuilt — no Node.js needed): palette of 12 step kinds, lines with results, properties panel with a "?" help on every field, live schema check, autosave with conflict detection, versions, drafts.
  • Engine: tasks and approvals (approve / return / reject), "who" from your roles, groups (one shared task) and specific people, fallback assignees, due dates and reminders, conditions, parallel + join, timers, waiting for events with time limits, tasks that close themselves on an event, subprocesses with results, system actions with retries, pause / resume / cancel.
  • Run view: the schema with the state of every step and the lines the run went along; history in words.
  • The schema in words (Describe): steps in order, who does what, deadlines, where each result leads — for a process page, a printout or an e-mail.
  • Your app stays in charge: events, roles, task list, notifications and actions are small interfaces you implement (or use the bundled SQL task table). Multi-tenant. Texts in any language (included: English, Ukrainian, Polish, German, Lithuanian, Latvian, Estonian, Finnish, Crimean Tatar).
  • Storage: MySQL / MariaDB, PostgreSQL, SQLite via PDO — or your own tables.

Install

composer require ax0705/flow-designer

Tested on every change: PHP 8.1 – 8.5; Laravel 12 and 13 (11 works, but no longer gets security fixes); MySQL 8, PostgreSQL 17, SQLite.

In 30 lines (plain PHP)

use FlowDesigner\{Catalog, Config, Engine, Schema};
use FlowDesigner\Designer\{Definitions, DesignerConfig};
use FlowDesigner\Locks\FileLocker;
use FlowDesigner\Storage\{PdoStore, SchemaInstaller};
use FlowDesigner\Tasks\PdoTaskGateway;

$pdo = new PDO('sqlite:' . __DIR__ . '/flow.sqlite');
(new SchemaInstaller($pdo))->install();

$catalog = (new Catalog())->event('deal.won', 'Deal won')->selector('role', 'Role', [['value' => 'sales', 'label' => 'Sales']]);
$config  = new Config(locales: ['en'], locale: 'en');
$store   = new PdoStore($pdo);
$tasks   = new PdoTaskGateway($pdo);
$engine  = new Engine($store, $config, $catalog, new MyDirectory(), $tasks, locker: new FileLocker(__DIR__ . '/locks'));

// designer page: print (new DesignerConfig($catalog, $config))->designer($draft, 'main', 'en', $urls) as JSON
// + <script src="vendor/ax0705/flow-designer/dist/flow-designer.js">; save/publish via Definitions.

$engine->event('main', 'deal.won', ['type' => 'deal', 'ref' => '42', 'label' => 'ACME renewal']);  // something happened
$finished = $tasks->finish('main', $taskId, 'approved', $userId);                                 // a person decided
$engine->taskFinished($finished);
$engine->tick();                                                                                  // every minute (cron)

Laravel

composer require ax0705/flow-designer
php artisan migrate
php artisan vendor:publish --tag=flow-designer-assets

The service provider registers everything (Engine, Definitions, DesignerConfig…) and schedules flow:tick. Bind your Directory / Notifier / TaskGateway and fill the Catalog — see the guide.

Demo

git clone https://github.com/ax0705/flow-designer && cd flow-designer && composer install
php -S 127.0.0.1:8090 -t examples/plain-php

Development

composer install && vendor/bin/phpunit      # PHP tests (SQLite)
FLOW_TEST_DSN='pgsql:host=127.0.0.1;dbname=flow' FLOW_TEST_USER=… FLOW_TEST_PASSWORD=… vendor/bin/phpunit   # on a real database
npm install && npm run build                # rebuilds dist/ (commit the result)

License

MIT © ax0705