happenv-com/laravel-true-modular
76.1
Strong · 9 November 2026
7.1k
lines of production code
PHP
primary language
7
measurements over time
What this system is
Features
Added modular monolith development guidelines and skills
Added documentation and AI assistant skills for the \happenv-com/laravel-true-modular\ architecture, guiding developers to build features within self-contained modules rather than the \app/\ directory. The new \core.blade.php\ guidelines and \modular-monolith-development\ skill explain the declarative \Module\ builder pattern, the three-phase lifecycle (register, initialize, boot), and cross-module wiring rules. They also document how to disable modules via environment variables or configuration files without removing them from \composer.json\, and provide CLI commands like \module:list\ and \module:impact\ for inspecting dependencies.
resources · high confidence
Initial release of Laravel True Modular package
This entry introduces the \happenv-com/laravel-true-modular\ package, which transforms a Laravel application into a modular monolith. The package provides a custom \Application\ class that sorts module service providers in topological dependency order and adds an \initialize()\ lifecycle phase between \register()\ and \boot()\. It includes a \ModuleProvider\ base class for auto-wiring module assets, routes, and configs, along with CLI commands for architecture analysis (\module:graph\, \module:impact\, etc.) and module scaffolding. The package requires PHP 8.3+ and Laravel 12/13.
(repo-wide) · high confidence
Introduce Architecture SDK and modular command infrastructure
This change introduces a new Architecture SDK and a suite of new Artisan commands for module management and analysis. Users can now scaffold new modules with \module:make\, validate activation states with \module:check\, and cache module registries for performance via \true-modular:cache\ and \true-modular:clear\. The update also adds architecture analysis commands (\module:graph\, \module:impact\, \module:why\) to visualize dependencies and impact, alongside an interactive \true-modular:setup\ command to convert existing applications into a modular monolith structure. Existing commands like \module:list\, \module:seed\, and \module:make:migration\ have been refactored to use the new architecture index and registry, supporting new output formats and vendor-agnostic naming.
src/Commands · high confidence
Modular application scaffolding, model extensions, and boot-time performance improvements
This release introduces a stub-driven module scaffolding system (ModuleGenerator) that generates modules from publishable stubs and registers them in composer.json, alongside a fluent ModularApplication entry point for configuring module directories and namespaces. It adds a ModelExtension system allowing modules to dynamically register Eloquent attribute resolvers and relationship methods on core models. Performance is significantly improved by caching the module registry and sorting service providers once per process rather than per boot, and by using a namespace matcher to avoid repeated lookups. The Application class now includes a fallback for getNamespace() to prevent crashes when the root autoload is removed during setup, and the module\_path helper now respects the configured modules directory.
src · high confidence
New Architecture SDK for module dependency analysis and visualization
This change introduces the Architecture SDK within the src/Architecture directory, providing a new capability to analyze and visualize module dependencies. It includes a DependencyGraph for tracking direct and transitive relationships, an ArchitectureIndex to aggregate module descriptors and dependency edges, and specialized analyzers (Graph, Impact, Why) to compute dependency trees, impact assessments, and dependency paths. The SDK also features a pluggable renderer system supporting multiple output formats, including text, JSON, DOT (Graphviz), Mermaid, and tree views with box-drawing glyphs, allowing users to inspect module structures in various ways.
src/Architecture · high confidence
New stub-driven module scaffold with publishable templates
The module scaffolding system now uses a set of new stub files to generate module structures, making the generated code publishable and customizable. This includes a composer.json stub for autoloading and service provider registration, a config stub for versioning, a web route stub pointing to a welcome controller, a controller stub that returns the module version, and a service provider stub that configures the module's name, config, and routes.
stubs, stubs/module · high confidence
New true-modular:setup command to convert Laravel apps into modular architecture
The new \true-modular:setup\ command automates the conversion of a standard Laravel application into a modular structure. It moves the existing \app/\ directory into a \core\ module, rewrites all PHP namespaces from \App o the new core module namespace, and scaffolds a \CoreServiceProvider\ to maintain compatibility with the original \AppServiceProvider\. The command also updates \bootstrap/app.php\ to use the new \ModularApplication\, registers the core module as a Composer path package in \composer.json\, and empties \bootstrap/providers.php\ to rely on module auto-discovery. A final scan identifies any remaining files that still reference the old \App amespace for manual cleanup.
src/Setup · high confidence
Behavioural changes
Module boot performance and stability improvements
The module provider traits have been refactored to significantly reduce boot-time overhead by deferring expensive file-system operations (such as listing migration directories and resolving publish targets) until they are actually needed by the migrator or the vendor:publish command, rather than computing them on every application boot. Additionally, the system now safely handles missing module directories (common in fresh checkouts where empty directories are not tracked by Git) by logging warnings and skipping capabilities instead of crashing, and module assets, routes, and other resources are now resolved via the module's vendor path rather than relative base paths.
src/ModuleProvider/Concerns/PackageServiceProvider · high confidence
Module package concerns refactor and health check support
The module package concerns have been migrated to the \Happenv\\LaravelTrueModular\\ModuleProvider\\Concerns\\Package\ namespace, requiring updates to any code referencing the old \Happenv\\LaravelTrueModularModuleProvider\ path. A new \HasHealthChecks\ trait allows modules to register health check classes via \hasHealthCheck\ and \hasHealthChecks\. Several traits (\HasBroadcasts\, \HasCommands\, \HasMigrations\, \HasRoutes\, \HasSchedule\) now use a shared \MergesFlattened\ trait to simplify how they accept and merge lists of items. The \HasConfigs\ trait now throws an \InvalidModule\ exception if a config file is declared more than once, preventing silent overwrites. The \HasInertia\ trait introduces a dedicated \inertiaNamespace\ property, separating it from the general view namespace. Additionally, \HasMorphMapDefinitions\ now requires the module name to be set before defining morph maps, throwing a clear error if called prematurely.
src/ModuleProvider/Concerns/Package · high confidence
Module provider namespace migration and health check support
The ModuleProvider classes have been migrated to the new \Happenv\\LaravelTrueModular\\ModuleProvider\ namespace, updating all internal trait imports and return types to \static\. This change introduces support for health checks by adding the \HasHealthChecks\ trait to the \Module\ class and the \GuardsModulePaths\ trait to \ModuleProvider\. Additionally, the provider now registers the \ModuleManifestRepository\ singleton during the module registration phase, and migration processing has been moved to the main boot sequence rather than being console-only.
src/ModuleProvider · high confidence
Module system performance and activation overhaul
The module system has been refactored to significantly improve boot performance and introduce granular module control. A new caching layer (ModuleRegistryCache) stores the module scan and topological order to disk, eliminating the need to parse every module's composer.json on every boot. Module discovery now supports filtering by module type and exposes both runtime and development dependencies for accurate graph ordering. A new ModuleActivation component allows modules to be disabled via environment variables or a JSON file, automatically excluding their owned vendor packages from Laravel's package manifest to prevent dangling aliases. Additionally, a ModuleActivationAudit tool validates the configuration, reporting issues such as orphaned modules, broken dependencies, and contested package ownership.
src/ModuleSystem · high confidence
Test coverage
Added comprehensive test coverage for the modular architecture and module management system; Added test fixtures for module service provider ordering.
Dependencies
Updated development dependencies and added test fixtures for modular architecture
The project's development dependencies have been expanded to include Laravel Access Control (^2.0), Laravel Pint (^1.29), Orchestra Testbench (^11.1), Rector (^2.5), Larastan (^3.10), and Livewire (^3.0), while the minimum stability has been raised from 'dev' to 'stable'. Additionally, a new set of test fixtures under \tests/fixtures/app-modules\ has been introduced, defining a sample modular dependency graph (kernel, core, sale, pim, amazon) to support testing of the library's module management capabilities.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 64 → 76 (+12.2)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 74 → 74 (+0.0)
- Architecture 88 → 87 (-0.8)
- Maturity 49 → 79 (+29.8)
- Readiness 73 → 73 (+0.0)
- Security 100 → 100 (+0.0)
Resolved (4)
- Ambiguous distinction between getModuleNames and getAllModules. Without seeing the return types' internal structure (though both are array), it is unclear if getAllModules returns full ModuleDescriptor objects while getModuleNames returns strings, or if they are redundant. Given the presence of getModuleNamespace (singular) and getModuleNames (plural), the naming suggests getModuleNames returns names, but getAllModules is vague compared to specific descriptors.
- Duplicate types with identical public interfaces. AppModulesLocator appears to be a specialized or concrete implementation of ModuleLocator but exposes the exact same method signatures (byClass, byPath, byComposerPackage). If AppModulesLocator is the only implementation, ModuleLocator should likely be an interface or abstract class, or AppModulesLocator should be removed if it adds no distinct behavior visible in the signature.
- Inconsistent naming convention for setter/getter pairs. The setters use the singular form of the property (e.g., moduleComposerType, modulesDirectory) while the getters use the plural form (e.g., getModuleComposerType, getModulesDirectory). This breaks the standard setX/getX or withX/getX symmetry.
- Redundant 'Reverse' methods. The existence of findFilesReverse and findClassesReverse suggests a specific traversal order (likely reverse topological or reverse directory order). However, exposing two separate methods for this is less flexible than a single method with an optional parameter or a builder pattern. It clutters the API surface.
Changes since last survey
- 4 commits — 4 feature/other, 0 fixes
By area
- (root) — 1 commit
- .github/workflows — 1 commit
- src/Application.php — 1 commit
- src/Architecture — 1 commit
Notable commits
- change: chore(deps): bump the github-actions group across 1 directory with 3 updates (#27)
- change: chore(deps-dev): update boundwize/structarmed requirement (#24)
- change: feat(application): let an application extend the modular Application (#30)
- change: feat(graph): --once lists every module once, under its shortest path (#28)
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
happenv-com/laravel-true-modular was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 9 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 3a9bbe2b4337b2b0121a2e8f82b04e2edc883d8f — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-bb0cb800cd0f.