ebdsystems / archflow
Laravel architecture scaffold and lint package
v1.2.8
2026-04-11 13:14 UTC
Requires
- php: ^8.2
- illuminate/support: ^13.0 || ^14.0 || ^15.0
- nikic/php-parser: ^5.0
README
Package for Laravel module scaffold and architecture validation.
Install
composer require ebdsystems/archflow php artisan archflow:install php artisan archflow:doctor --strict
archflow:install also publishes tenant runtime support and starter quality-gate tests:
- app/Support/Tenant/TenantContextStore.php
- app/Models/Concerns/HasTenantScope.php
- app/Domain/Shared/Tenant/TenantContext.php
- tests/Feature/Archflow/ArchflowDoctorTest.php
- tests/Feature/Archflow/ArchflowLintReportTest.php
- tests/Feature/Archflow/ArchflowSyncDocsTest.php
- tests/Unit/Domain/Shared/TenantContextTest.php
- tests/Unit/Domain/Shared/TenantContextStoreTest.php
Recommended Sequence (Install and Use)
1. Validate bootstrap
php artisan archflow:doctor --strict php artisan archflow:sync-docs-check --strict
2. Generate module scaffold
php artisan make:module Product php artisan make:module Product --force
3. Validate architecture and reports
php artisan arch:lint php artisan arch:lint --report-json php artisan arch:lint --report-path=tools/architecture/lint-report-ci.json --report-json php artisan archflow:metrics php artisan archflow:pr-gate --strict
4. Run complete pipeline
php artisan archflow:run php artisan archflow:run --ci php artisan archflow:run --full-tests php artisan archflow:run --skip-install --skip-tests php artisan archflow:run --pr-gate-baseline-context=main --update-pr-gate-baseline
Composer shortcuts:
composer archflow:run composer archflow:ci
5. Safe rollback
php artisan make:module:rollback Product --dry-run php artisan make:module:rollback Product php artisan make:module:rollback Product --force
6. Async domain events worker (optional)
php artisan domain-events:work --queue=domain-events --tries=5 --backoff=5
Commands
- php artisan archflow:install
- php artisan archflow:doctor
- php artisan archflow:sync-docs-check
- php artisan archflow:metrics
- php artisan archflow:adr:auto
- php artisan archflow:pr-gate
- php artisan domain-events:work
- php artisan archflow:run
- php artisan make:module Product
- php artisan make:module Product --force
- php artisan make:module:rollback Product --dry-run
- php artisan make:module:rollback Product
- php artisan make:module:rollback Product --force
- php artisan arch:lint
Lint report JSON
php artisan arch:lint --report-json php artisan arch:lint --report-json --report-path=tools/architecture/lint-report-ci.json
Pipeline options
php artisan archflow:run php artisan archflow:run --ci php artisan archflow:run --full-tests php artisan archflow:run --tests-path=tests/Feature/Archflow php artisan archflow:run --skip-install --skip-tests php artisan archflow:run --skip-metrics --skip-adr --skip-pr-gate php artisan archflow:run --pr-gate-baseline-context=main --update-pr-gate-baseline composer archflow:run composer archflow:ci
Default archflow:run stages
- archflow:install
- archflow:doctor
- archflow:sync-docs-check
- arch:lint --report-json
- archflow:metrics
- archflow:adr:auto
- archflow:pr-gate
- test
Generated reports
- tools/architecture/lint-report.json
- tools/architecture/metrics.json
- tools/architecture/pr-gate-report.json
- tools/architecture/pr-gate-baselines/-.json
- docs/adr/*_archflow_pipeline.md
Estrutura
- src/
- config/
- stubs/
- tools/
- docs/
Release
- Changelog: CHANGELOG.md
- License: LICENSE
- Checklist: docs/release-checklist.md
Usage Manual
For a full operational guide (install, create modules, test modules, delete modules, and rename modules):
- docs/scaffold/module-usage-manual.md