mortexa/laravel-arkitect
Laravel Arkitect helps you define and enforce architecture rules in Laravel applications. Describe layer dependencies, naming and structural conventions with an expressive API, then catch violations in tests or CI before they spread.
phparkitect/phparkitect, so the honest comparison is "buy" only if the Laravel presets and rule syntax save real engineering days; otherwise treat it as a reference implementation. v0.8.1 widened the core constraint to ^0.3.19 | ^0.4.0 | ^0.5.0, which matters for this decision: the wrapper is tracking upstream rather than pinning you to a stale analysis engine, so adopting it does not quietly freeze your rule capabilities.Consider it when:
app/ tree, where drift is a function of headcount rather than discipline.app/Domain may reference Illuminate\Http").phparkitect — v0.8.1's support for 0.3.19 through 0.5.0 means new upstream rule capabilities are reachable without waiting on the wrapper.Look elsewhere (or skip) when:
phparkitect install: if you are already on core 0.4/0.5 with your own config, the wrapper's remaining value is Laravel presets and test-suite integration, nothing more.To executives (one paragraph): Architectural drift is the slow, unglamorous tax that makes Laravel features take three sprints instead of one. This package lets us write our architecture rules down as automated tests, so violations fail the build in minutes rather than surfacing as a six-week refactor a year later. It is MIT-licensed, dev-only, ships in days not quarters, and is trivially removable — the cost of trying is a few engineer-days against a materially reduced risk of an expensive "we need to restructure the codebase" conversation. The latest release is a maintenance update that keeps it current with the underlying analysis engine, which is exactly the signal we want before adopting: the tool is being maintained, not abandoned. The trade-off to acknowledge is maturity — small community, single maintainer — so we adopt it as a pinned internal tool with an owner, not a load-bearing platform bet.
To engineering leadership: It runs inside the existing test suite — no new CI system, no runtime dependency, no production footprint. Value is concentrated in two places: enforcing module boundaries so a monolith can stay modular, and giving refactors a measurable ratchet (violation counts go down per sprint, visible in the PR). v0.8.1 broadens compatibility to phparkitect 0.3.19–0.5.0, meaning the rule engine can advance via a Composer constraint rather than a fork or an upstream PR to the wrapper — worth noting when we scope the effort. It complements, not replaces, Larastan and Deptrac; we should confirm overlap before adopting both.
To the engineering team: You get to express "controllers never talk to models directly" or "everything in app/Support is final" as a failing test with a readable message, instead of a comment in a PR that gets ignored at 5pm on a Friday. Rules are code, so they get reviewed, versioned, and deleted when they stop earning their keep. The 0.8.1 bump means you are not locked to an old phparkitect; pin the wrapper, keep the core current, and you inherit new rule types as they land.
Recommended first move: one rule, one sprint. Pick the single boundary most likely to be violated, add it as a non-blocking check, measure the violation count, and decide on blocking status at the next planning cycle. If the count is zero and stays zero, you learned something cheap; if it climbs weekly, you have a quantified case for a platform investment.
How can I help you explore Laravel packages today?