Download the PHP package digitaldev-lx/laravel-process-map without Composer

On this page you can find all versions of the php package digitaldev-lx/laravel-process-map. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-process-map

Laravel Process Map

Static-analysis tool that maps the business processes inside any Laravel application — without ever executing it.

digitaldev-lx/laravel-process-map reads your application's source code and registered Laravel runtime metadata (routes, schedule, broadcast channels) and produces a machine- and human-readable map of the processes it can identify: who calls what, which models are mutated where, which jobs/events/listeners participate in each flow, and which parts of the codebase look fully automated versus manual.

The output is useful for:

Table of contents

Status

Stable (1.0.x). The public Artisan signatures, exporter formats and JSON schema (schema_version: "0.1") are committed to. Breaking JSON changes will bump the schema_version field and be documented in CHANGELOG.md.

How it works

Source files are parsed via nikic/php-parser into an AST. Class metadata (extends, implements, traits, public methods, calls to dispatch()/event()/Notification::send, etc.) is collected by a single visitor and decorated per scanner type.

Routes, scheduled tasks and broadcast channels come from Laravel's runtime APIs (Router::getRoutes(), Schedule::events(), routes/channels.php) — read-only access only.

A heuristic clustering step then groups classes into business processes by stripping verbs and technical suffixes from class names, and a set of detectors annotates each process with automation level, potential bottlenecks and risks.

Requirements

Dependency Version
PHP ^8.4
Laravel ^12.0 \|\| ^13.0
nikic/php-parser ^5.0
symfony/finder ^7.0

The package is tested against the matrix above on every push (see .github/workflows/tests.yml).

Installation

Install as a dev dependency — the package is a developer/consulting tool, not a runtime concern:

Run the install command to publish the configuration and create the output directory:

To install and scan in one go:

The service provider is auto-discovered via extra.laravel.providers, so no manual registration is required.

Quick start

This produces, in storage/app/process-map/:

A typical terminal summary:

Artisan commands

Command What it does
process-map:install [--scan] Publishes the config and creates the output directory. With --scan, runs a full scan immediately.
process-map:scan [flags] Runs every enabled scanner and exporter. See flags below.
process-map:report [--output=…] Generates only the Markdown report.
process-map:json [--output=…] Generates only the JSON artefact.
process-map:mermaid [--output=…] Generates only the Mermaid diagram.

process-map:scan accepts:

If no format flag is passed, the command falls back to config('process-map.exports.*').

Output formats

JSON

Canonical artefact, schema-versioned. Excerpt:

Markdown

The Markdown exporter produces a dense, single-pass document built so a human (or an LLM) can grasp the architecture in one read. Sections produced in process-map.md:

A real, fully-rendered example produced from a small fixture app (2 models, 1 controller, 1 action, 2 jobs, 1 event, 1 listener, 1 notification, 1 policy, 1 command, 3 routes):

That fixture renders to 85 lines (~2.6 KB). A typical ~150-class Laravel application produces ~600–800 lines (~20 KB) — well inside any modern context window.

Mermaid

Generates one overview flowchart plus one diagram per detected process:

Render with the Mermaid Live Editor, the GitHub-flavoured Markdown viewer, or VS Code's Mermaid Preview extension.

Designed for LLM consumption

The Markdown report is the canonical artefact for AI-assisted development. Drop process-map.md into Claude Code, ChatGPT, Cursor, Aider or any other LLM tool and you get an instantly navigable map of the application — without the LLM having to grep, open dozens of files, or guess how the pieces fit together.

Concrete advantages when fed to an LLM:

  1. File path on every row. The Members and Unattached tables include the relative path of each class, so the LLM can open the right file directly instead of running a search.
  2. One canonical place per class. Every class appears in exactly one spot — either inside the Process block it belongs to or inside Unattached Components. No duplicate listings, no wasted tokens.
  3. Dense Notes column. Operational facts are inline: queue=reports · tries=5 · timeout=120s, channels: mail, database · queued, **sync** (no ShouldQueue). The LLM skips reading the source for the most common questions.
  4. Explicit Flow trace. The route → controller → action → job/event → listener → notification sequence is spelled out as bullet points so the request lifecycle is comprehensible in one read.
  5. Reference-aware clustering. Classes that don't match a naming convention are still attached to their process via static-call references (e.g. CreateLeadAction → dispatches SendLeadFollowUpJob pulls the job into the Lead Management block). Fewer orphans, cleaner reasoning.
  6. Hedge wording on findings. Bottlenecks/risks/recommendations are prefixed with ⚠ Bottleneck:, 🛡 Risk:, 💡 Recommendation: — the LLM treats them as investigation hints, not as facts.
  7. Schema-versioned header. Schema 0.1 lets you build reproducible prompts: pin the schema version in your tooling and your prompts keep working when you upgrade the package.
  8. Token-efficient. ~85 lines / ~2.6 KB for a 12-class fixture; ~600–800 lines / ~20 KB for a typical ~150-class Laravel app. Plenty of room left for the LLM's own reasoning and tool calls.

Quick recipe — feed it to Claude Code

A useful starter prompt once the file is in context:

"Use process-map.md as the architectural map of this app. Don't grep unless I ask — pull file paths and references from the report. When you see ⚠/🛡/💡 markers, treat them as starting points for deeper review, not as confirmed bugs."

MCP Support

Laravel Process Map ships an optional read-only MCP layer on top of laravel/mcp. It exposes the same process map as MCP resources, tools and prompts so Claude Code (and any other MCP-compatible client) can query your application architecture interactively, without you having to load a large static report into the prompt.

The layer is off by default. Activating it does not relax any of the package's security guarantees: it remains strictly read-only — no shell, no SQL, no external HTTP, no .env exposure.

When to use which

Want… Use
Static documentation you commit to the repo, an audit attachment, or a quick LLM context paste The Markdown / JSON / Mermaid exports
An interactive session where the LLM picks the right slice of the map per question; very large apps; reusable prompts; per-process inspection The MCP layer

Installation

The dependency ships with the package — there is nothing extra to install. You only have to opt in:

The status command prints the current toggles and the security policy flags so any deviation from the read-only defaults is visible at a glance.

Resources

URI Returns
process-map://summary App metadata, totals, schema and package version
process-map://processes Compact list of detected processes with counts
process-map://process/{slug} Full detail of one process (template URI)
process-map://routes All registered routes
process-map://classes Discovered classes grouped by type
process-map://risks Consolidated risks across processes
process-map://recommendations Recommendations + bottleneck hints
process-map://mermaid Raw Mermaid diagram

Tools (every one read-only)

get_process_map_summary, list_processes, get_process_details, get_process_components, get_process_risks, get_process_recommendations, get_related_classes (depth-bounded), get_route_map, get_mermaid_diagram, refresh_process_map (re-runs the static scan; gated by process-map.mcp.tools.allow_refresh_scan), compare_process_maps (stub; gated by process-map.mcp.tools.allow_compare_scans, lands in v1.2).

Prompts

audit_process, refactor_process_safely, document_process, find_automation_opportunities, generate_technical_handover, prepare_mcp_tools_from_actions. Every prompt accepts the process slug (or name / entity) where applicable and a small set of tuning arguments.

Example — talking to Claude Code

Once the server is registered and the scan has been run, you can drop this into Claude Code:

"Use the Laravel Process Map MCP server to inspect the lead-management process before making any change. List the available processes first, then call get_process_details, get_process_components, get_process_risks and get_mermaid_diagram. Propose a safe refactoring plan via the refactor_process_safely prompt. Do not modify code until I approve."

Security envelope (always enforced)

Configuration

Publish the configuration:

The published file lives at config/process-map.php and exposes the following groups:

For modular layouts (DDD, nwidart/laravel-modules), add additional roots under directories:

Available scanners

Scanner What it produces
ModelScanner Eloquent models with table, fillable, casts, traits, soft-delete and factory flags
ControllerScanner Controllers with public actions, form requests, dispatched events
ActionScanner Action classes with main entry method (handle/execute/__invoke/run), dispatched jobs, fired events
JobScanner Jobs with ShouldQueue, $queue, $tries, $timeout, $backoff
EventScanner Events with broadcasting flags and Dispatchable/SerializesModels traits
ListenerScanner Listeners with the event they handle and queue flag
NotificationScanner Notifications with channels (via()) and to* delivery methods
PolicyScanner Policies split into standard abilities (view, create, …) and custom abilities, mapped to a model name
CommandScanner Artisan commands with signature and description
RouteScanner Registered routes with controller, methods, name, middleware, domain
ScheduleScanner Scheduled tasks with cron expression, command, mutex, timezone, withoutOverlapping, onOneServer
BroadcastScanner Channels declared via Broadcast::channel() in routes/channels.php

Each scanner can be turned off in config('process-map.scan.*').

Process detection

The NamingConventionProcessDetector is intentionally simple:

  1. Walk every DiscoveredClass of a participating type.
  2. Strip the business suffix (e.g. Action, Job).
  3. Strip the leading verb (e.g. Create, Send).
  4. Strip common participles (e.g. Created, Updated).
  5. Cluster by what remains. Clusters with at least 2 classes become a process.

Then the detectors annotate:

The output is always best-effort. Hedge wording (Potential…, May indicate…) is intentional and propagated to the Markdown report.

Programmatic API

Resolve the singleton ProcessMap from the container:

The string returned by exportMarkdown() is identical to the file written by process-map:report and is safe to drop straight into an LLM prompt (see Designed for LLM consumption).

ProcessMapResult is a typed, readonly DTO:

Use cases:

Safety guarantees

The package is strictly read-only. It never:

Analysis is performed via AST parsing. Reflection is opt-in through process-map.safe_reflection.enabled and only used for safe metadata lookups (interfaces, traits, parent class).

A dedicated test (tests/Unit/ReadOnlyInvariantTest.php) scans the package's own src/ directory for forbidden helpers (DB::, dispatch(, event(, Notification::send, Mail::send, Http::*) and fails the build if any are introduced.

Limitations

Roadmap

Version Highlights
v1.0 Static scan, JSON/Markdown/Mermaid exporters, heuristic process detection with reference-aware clustering, dense LLM-ready Markdown.
v1.1 (current) Read-only MCP layer (laravel/mcp) — 8 resources, 11 tools, 6 prompts. Process slugs in core.
v1.2 HTML dashboard, snapshot history, compare_process_maps tool.
v1.3 GitHub Action, scan diff between commits, architectural regression detection.
v2.0 Plugin SPI for custom scanners and detectors; potential schema upgrade.

Contributing

Issues and pull requests are welcome at github.com/digitaldev-lx/laravel-process-map.

Before opening a PR, run the quality checks locally:

Bug reports should include:

See .github/ISSUE_TEMPLATE for the templates.

License

MIT — see LICENSE.md.

Built by DigitalDev.


All versions of laravel-process-map with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
laravel/framework Version ^12.0 || ^13.0
laravel/mcp Version ^0.7
nikic/php-parser Version ^5.0
symfony/finder Version ^7.4 || ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package digitaldev-lx/laravel-process-map contains the following files

Loading the files please wait ...