galase/laravel-flow-docs

Static flow documentation generator for Laravel applications.

Maintainers

Package info

github.com/Galase/laravel-flow-docs

pkg:composer/galase/laravel-flow-docs

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2026-05-20 21:01 UTC

This package is auto-updated.

Last update: 2026-05-20 21:45:20 UTC


README

Static HTML flow documentation for Laravel applications.

The package analyzes PHP source code without executing business rules. It maps controllers, services/actions/use cases, methods, route bindings, inferred models, internal calls, and line-level flow notes into presentation-friendly HTML.

Installation

composer require galase/laravel-flow-docs --dev
php artisan vendor:publish --tag=flow-docs-config
php artisan flow-docs:generate

Open:

public/docs/flow/index.html

Command

php artisan flow-docs:generate
php artisan flow-docs:generate --services
php artisan flow-docs:generate --controllers
php artisan flow-docs:generate --output=public/docs/flow
php artisan flow-docs:generate --no-routes

The command requires config/flow-docs.php to exist in the host Laravel application. If it has not been published, it exits with:

Run: php artisan vendor:publish --tag=flow-docs-config

Configuration

Published config:

return [
    'output_path' => public_path('docs/flow'),
    'app_dir' => app_path(),
    'project_name' => config('app.name', 'Laravel'),
    'controller_namespaces' => ['App\\Http\\Controllers'],
    'service_namespaces' => ['App\\Services', 'App\\Http\\Services', 'App\\Actions', 'App\\Domain'],
    'model_namespaces' => ['App\\Models', 'App'],
    'named_gateways' => ['Lytex', 'PagarMe', 'Stripe', 'PayPal'],
];

Static Analysis

The analyzer detects models from direct queries, typed returns, direct returns, and internal method returns:

private function aluno($id)
{
    return Aluno::where('id', $id)->first();
}

public function fluxo($id)
{
    $aluno = $this->aluno($id);
}

In this case, $aluno is documented as Aluno, inferred from $this->aluno().

Limits

This package is intentionally conservative. It does not execute application code and may not infer types hidden behind containers, repositories without return types, interfaces, magic methods, or highly dynamic calls.