PHPackages                             mohamedzaki/laravel-process-builder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. mohamedzaki/laravel-process-builder

ActiveLibrary

mohamedzaki/laravel-process-builder
===================================

A visual process builder for designing Laravel routes, controllers, actions, validations, services, and application workflows.

v0.2.0(1mo ago)38↓75%1[5 PRs](https://github.com/imohamedzaki/laravel-process-builder/pulls)MITPHPPHP ^8.2CI passing

Since Jul 15Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/imohamedzaki/laravel-process-builder)[ Packagist](https://packagist.org/packages/mohamedzaki/laravel-process-builder)[ Docs](https://github.com/imohamedzaki/laravel-process-builder)[ RSS](/packages/mohamedzaki-laravel-process-builder/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (20)Versions (5)Used By (0)

Laravel Process Builder
=======================

[](#laravel-process-builder)

**Design Laravel processes visually. Generate clean Laravel code.**

A visual process builder for designing Laravel routes, controllers, actions, validations, services, and application workflows — conceptually similar to the Joget Process Builder, but generating clean, native, maintainable Laravel code instead of running inside a proprietary engine.

> Status: feature-complete MVP, pre-1.0. All planned milestones (scanning, visual editor, validation, preview, safe generation, backups/rollback, audit logging, Artisan commands) are implemented and tested. See [IMPLEMENTATION\_STATUS.md](IMPLEMENTATION_STATUS.md) for details.

---

Table of contents
-----------------

[](#table-of-contents)

1. [Overview](#overview)
2. [Features](#features)
3. [Requirements](#requirements)
4. [Installation](#installation)
5. [Configuration](#configuration)
6. [Dashboard access](#dashboard-access)
7. [Authorization](#authorization)
8. [Enabling code generation](#enabling-code-generation)
9. [Creating a process](#creating-a-process)
10. [Scanning existing routes](#scanning-existing-routes)
11. [Previewing generated code](#previewing-generated-code)
12. [Generating code](#generating-code)
13. [Rollback](#rollback)
14. [Artisan commands](#artisan-commands)
15. [Process definition format](#process-definition-format)
16. [Managed-file behavior](#managed-file-behavior)
17. [Security warnings](#security-warnings)
18. [Development setup](#development-setup)
19. [Running Workbench](#running-workbench)
20. [Running tests](#running-tests)
21. [Building frontend assets](#building-frontend-assets)
22. [Contributing](#contributing)
23. [Roadmap](#roadmap)
24. [License](#license)

---

Overview
--------

[](#overview)

Laravel Process Builder lets you design an application flow — route → middleware → form request → controller → action → model operation → event → job → response — on a visual canvas, then generate real, idiomatic Laravel files from that design. Existing application code is always treated as read-only; only files explicitly managed by the package may ever be written or overwritten.

Features
--------

[](#features)

- Read-only scanner for existing routes and controllers (Project Explorer).
- Visual React Flow canvas with a typed node palette and property inspector.
- File-based, Git-friendly JSON process definitions.
- Multi-stage compiler producing clean, PSR-12, strictly typed Laravel code.
- Two-step preview → generate workflow with signed confirmation tokens.
- Managed-file ownership rules, checksums, and conflict detection.
- Automatic backups and one-click rollback.
- JSON-lines audit log of every process/generation/backup/rollback event.
- Artisan commands for install, doctor, scan, validate, preview, generate, backups, rollback, and installing bundled demo processes.

Requirements
------------

[](#requirements)

```
PHP: ^8.2
Laravel: ^12.0 | ^13.0

```

Laravel 13 installations will naturally require PHP 8.3+ through Laravel's own constraints.

Installation
------------

[](#installation)

Because this package exposes application architecture and code-generation capability, install it as a **development dependency**:

```
composer require mohamedzaki/laravel-process-builder --dev

php artisan process-builder:install
php artisan vendor:publish --tag=process-builder-assets
```

The dashboard's JavaScript and CSS ship pre-built inside the package — you do **not** need Node.js, npm, or a build step in your application. `vendor:publish --tag=process-builder-assets` only copies those already-built files into your app's `public/vendor/process-builder` directory. (Node/npm are only needed if you're developing this package itself — see [Development setup](#development-setup).)

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag=process-builder-config
```

Key environment variables:

```
PROCESS_BUILDER_ENABLED=true
PROCESS_BUILDER_GENERATION_ENABLED=false
PROCESS_BUILDER_PATH=process-builder
```

See [config/process-builder.php](config/process-builder.php) for the full set of options (environments whitelist, middleware, authorization gate, output directories, backup retention, scanner exclusions).

Dashboard access
----------------

[](#dashboard-access)

Once enabled and in an authorized environment, visit:

```
/process-builder

```

The dashboard is disabled by default outside of `local`, `development`, and `testing` environments, regardless of the `enabled` flag.

If the page loads blank with no visible error, the built assets haven't been published yet — run `php artisan vendor:publish --tag=process-builder-assets` (see [Installation](#installation)). The dashboard view itself will also render an on-page message telling you to do this.

Authorization
-------------

[](#authorization)

`process-builder:install` generates `app/Providers/ProcessBuilderAuthServiceProvider.php`, a small dedicated provider containing the `manage-process-builder` gate (denying everyone by default). It never edits your existing `AppServiceProvider`/`AuthServiceProvider`, since those can contain arbitrary application code. Register the generated provider:

- **Laravel 11+**: add it to the array in `bootstrap/providers.php`: ```
    App\Providers\ProcessBuilderAuthServiceProvider::class,
    ```
- **Laravel 10 and earlier**: add the same line to the `providers` array in `config/app.php`.

Then edit the stub to add your real authorization check:

```
Gate::define('manage-process-builder', fn ($user) => $user->isAdmin());
```

Without this gate defined, anyone who can reach the route can use the dashboard — fine for local development, but it must be locked down before the package is ever enabled outside `local`/`development`/`testing`.

Enabling code generation
------------------------

[](#enabling-code-generation)

Generation is disabled by default. Enable it explicitly per environment:

```
PROCESS_BUILDER_GENERATION_ENABLED=true
```

Every write additionally requires a valid preview confirmation token, an authorized environment, and (if the target file is already managed) a checksum match against the last known generated state.

Creating a process
------------------

[](#creating-a-process)

Open the dashboard, use **New Process**, drag nodes from the palette onto the canvas, connect them, and fill in each node's properties in the right-hand inspector. Save persists a JSON definition under `process-builder/definitions/`.

Scanning existing routes
------------------------

[](#scanning-existing-routes)

Use the **Project Explorer** tab, or:

```
php artisan process-builder:scan
```

This is entirely read-only and never modifies your application.

Previewing generated code
-------------------------

[](#previewing-generated-code)

Use the **Preview** action in the toolbar, or:

```
php artisan process-builder:preview {process}
```

This compiles the process in memory and returns generated code and diffs without writing anything to disk.

Generating code
---------------

[](#generating-code)

```
php artisan process-builder:generate {process}
```

Requires generation to be enabled, a valid preview, and an authorized environment. Existing non-managed files are never overwritten.

Rollback
--------

[](#rollback)

```
php artisan process-builder:backups {process}
php artisan process-builder:rollback {process} {backup}
```

Artisan commands
----------------

[](#artisan-commands)

```
php artisan process-builder:install
php artisan process-builder:doctor
php artisan process-builder:scan
php artisan process-builder:list
php artisan process-builder:show {process}
php artisan process-builder:validate {process?}
php artisan process-builder:preview {process}
php artisan process-builder:generate {process}
php artisan process-builder:backups {process}
php artisan process-builder:rollback {process} {backup}
php artisan process-builder:demo [--force]
```

`process-builder:demo` installs two bundled example processes — "Create Order" (linear route → validation → controller → action → model → event → resource → response) and "Approve Leave Request" (adds a branching condition, a job, and multiple response outcomes) — useful for exploring the dashboard and the generated code output without building a process from scratch.

Process definition format
-------------------------

[](#process-definition-format)

See [docs/process-definition-schema.md](docs/process-definition-schema.md).

Managed-file behavior
---------------------

[](#managed-file-behavior)

See [docs/code-generation.md](docs/code-generation.md) and [docs/security.md](docs/security.md).

Security warnings
-----------------

[](#security-warnings)

The dashboard is a highly privileged developer tool: it can read application architecture and write PHP files. Keep it disabled in production, behind authentication and an authorization gate, and never expose it publicly. See [docs/security.md](docs/security.md) for the full threat model.

Development setup
-----------------

[](#development-setup)

```
git clone
cd laravel-process-builder
composer install
npm install
```

Running Workbench
-----------------

[](#running-workbench)

```
composer run serve
```

Then visit `http://127.0.0.1:8000/process-builder`.

For frontend hot-reload during development, run Vite alongside it:

```
npm run dev
```

Running tests
-------------

[](#running-tests)

```
composer test        # PHPUnit
composer analyse      # PHPStan / Larastan
composer format        # Laravel Pint
npm run test           # Vitest
npm run typecheck      # TypeScript
npm run build           # Production frontend build
```

Building frontend assets
------------------------

[](#building-frontend-assets)

```
npm run build
```

Compiled assets are emitted to `dist/` with a Vite manifest, and are published to the host application via `php artisan vendor:publish --tag=process-builder-assets`.

Contributing
------------

[](#contributing)

Issues and pull requests are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for setup instructions, coding standards, and the required quality gate. Please also review our [Code of Conduct](CODE_OF_CONDUCT.md) and [Security Policy](SECURITY.md).

Roadmap
-------

[](#roadmap)

See [docs/roadmap.md](docs/roadmap.md) for planned Phase 2–4 features (deeper AST analysis, listener/notification builders, a runtime workflow engine, BPMN import/export, and more).

License
-------

[](#license)

MIT. See [LICENSE](LICENSE).

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance92

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

45d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/76117390?v=4)[Mohamed Zaki](/maintainers/imohamedzaki)[@imohamedzaki](https://github.com/imohamedzaki)

---

Top Contributors

[![imohamedzaki](https://avatars.githubusercontent.com/u/76117390?v=4)](https://github.com/imohamedzaki "imohamedzaki (21 commits)")

---

Tags

artisancode-generationdeveloper-toolslaravellaravel-packagelow-codephpreact-flowvisual-editoworkflowlaravelworkflowcode-generationprocess-builderreact-flow

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mohamedzaki-laravel-process-builder/health.svg)

```
[![Health](https://phpackages.com/badges/mohamedzaki-laravel-process-builder/health.svg)](https://phpackages.com/packages/mohamedzaki-laravel-process-builder)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3365.5M359](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

80732.6M270](/packages/laravel-mcp)[laravel/boost

Laravel Boost accelerates AI-assisted development by providing the essential context and structure that AI needs to generate high-quality, Laravel-specific code.

3.6k31.1M880](/packages/laravel-boost)[laravel/surveyor

Static analysis tool for Laravel applications.

89228.4k17](/packages/laravel-surveyor)[laravel/ai

The official AI SDK for Laravel.

1.1k6.4M360](/packages/laravel-ai)[laravel/sail

Docker files for running a basic Laravel application.

1.9k220.0M1.5k](/packages/laravel-sail)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
