Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Structure Kit Laravel Package

mehedi250/laravel-structure-kit

A browser-based scaffolding panel for Laravel that generates models, controllers, services, repositories, and migrations in one click. No terminal needed—open the UI, pick your components, and hit Generate to build a clean layered structure fast.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

The package is a developer-time code generator, not a runtime library. It registers a service provider, one Blade UI route (/structure-kit, gated to local with a 403 elsewhere), and an Artisan command (structure-kit {ModelName} {flags}). There is no runtime coupling to the application beyond that route, which is the right shape for a scaffolding tool: near-zero blast radius at runtime, but real blast radius at generation time because it writes directly into app/ and database/migrations/.

The generated architecture is opinionated: Services/Contracts + Services/Implementations, Repositories/Contracts + Repositories/Eloquent, controllers wired to service interfaces, and an interface-first repository. That is a coherent layered structure, but it is a structure, not the structure — it will fit teams already using service/repository layering and will clash with Domain/Module layouts, CQRS, or action-based patterns. The ns() fix in v0.1.6 (custom paths returned as-is instead of blindly prefixed with App\) plus per-component path overrides mitigates this, but the web UI hard-blocks any path not starting with app/, which effectively excludes Modules\* / modular monolith layouts.

Integration feasibility

Low friction: composer require, auto-discovery, no config publishing, no provider registration. Two adoption surfaces (browser panel and CLI) let us choose per-team preference. --dry-run gives a review gate on the CLI side. File-exists collisions are skipped rather than overwritten, and the web controller hardcodes force => false, so the browser path cannot clobber code. That is a sensible safety default for a low-maturity package.

Technical risk

The dominant risk is not code quality but provenance and support: 9 stars, 0 dependents, single maintainer, MIT, no documented CI or test suite, and a maturity signal limited to a README and releases. The v0.1.6 changelog is itself the best evidence of residual risk — it lists fixes for a Laravel 11 controller base-class break, service/repository interfaces being literal copies of each other, a strict_types bool cast TypeError in generated repositories, singleton state contamination across requests, --force accepted but never applied, and a commented-out dd(). Any one of those shipping into a repo means generated code is silently wrong until someone reads it.

Secondary risk: stub drift across Laravel majors. Claiming ^10 | ^11 | ^12 | ^13 support with this release cadence means each new Laravel major is a coin flip until the maintainer ships a patch.

Key questions for the maintainer / our own diligence

  • Is there a test suite, and does it assert generated file contents, not just file existence?
  • How are model names sanitized before string-substitution into stubs (reserved words, path traversal via namespace fields, multi-word models like OrderItem → order_items)?
  • Is the Artisan command also environment-gated, or only the HTTP route?
  • Can stubs be published/overridden, or are we forking to customize?
  • What is the intended policy on breaking stub changes — semver-strict, or "0.x, expect churn"?
  • Does --force remain CLI-only by design, or is that incidental?

Recommendation signal: the low opportunity score (~2.69) is the honest read — artisan make:* plus a hand-rolled base repository solves 80% of this. Value here is team consistency and onboarding speed, not capability.

Integration Approach

Stack fit

Matches our Laravel 10–13 / PHP 8.1+ baseline exactly. Install as require-dev, not require. This is the single most important integration decision: it keeps the package and its route out of production images entirely, and makes the local-only gate a defense-in-depth layer rather than the only layer.

Migration path

Additive, not a replacement. We keep artisan make:* for single files and use this for the "full slice" case (model + migration + controller + service + repository). There is no data migration and no schema coupling, so reversal cost is one composer remove plus deleting the route registration. Prior art to benchmark against: laravel-generator, blueprint, and InfyOm — all heavier, all with more surface and more maintenance load.

Compatibility

Two constraints to encode in our standards doc before rollout:

  1. Generated namespaces must be PSR-4-reachable from the project's composer.json autoload block. Custom paths that pass the UI's app/ check can still produce non-autoloadable code if we have a non-standard App\ mapping.
  2. Pin the version in composer.json (exact or ~0.1.6) and add a CI job that runs a --dry-run generation of a known model after any Laravel major bump, diffing against expected output. That is cheap and catches stub drift before a developer does.

Sequencing

  1. Pin ~0.1.6 in require-dev; verify the route 403s outside local.
  2. Write a one-page team convention doc: canonical paths, required flags (mcsrt as the default slice), and the review rule that generated code is reviewed in PR like any other code.
  3. Pilot on one greenfield feature in a single team; measure time-to-first-working-endpoint against the current make:* + manual boilerplate baseline.
  4. If the pilot holds, wrap the common invocation in a Composer script (composer make:slice Product) so nobody memorizes flags and everyone gets identical output.
  5. Re-evaluate at the next Laravel major. If stub drift appears and the maintainer is unresponsive, fork — the surface is small enough (~stub files plus one generator service) that a fork is a day of work, not a quarter.

Operational Impact

Maintenance

Runtime maintenance burden is effectively zero — no production code path, no scheduled jobs, no runtime dependencies to patch. The real cost shifts to the generated code: once written, those files are ours to own, review, and upgrade. Budget a small amount of ongoing effort for stub drift verification at each Laravel major, and treat the pinned version as a dependency in our upgrade runbook.

Support

Single maintainer, no SLA, no observable test/CI signal, MIT with a support.security key in composer.json but no stated disclosure process. We should assume we are on our own for anything beyond a bug report, and that assumption should be explicit in the adoption decision rather than discovered during an incident. The fork-and-patch path is viable given the small code surface.

Scaling

Scaling is organizational, not technical. File generation is O(files) on the developer's machine and irrelevant to production capacity. The scaling constraint is consistency: the "Remember current path" feature persists to per-browser localStorage, which means two developers can silently generate into two different namespaces from the same repo. Standardize paths in a committed doc or a Composer script wrapper; do not rely on the UI's local memory as the team source of truth.

Failure modes to instrument around

Failure Symptom Mitigation
Silent skip of existing files "Generate" reports success, nothing changes Review the returned file list, not just the toast; --dry-run first
Partially written slice Model written, service fails, half-wired feature Generate, then run php artisan migrate --pretend and a route-list check
Namespace/path mismatch Class not found at runtime CI dry-run assertion; check composer dump-autoload after generation
Stale stubs after Laravel major Generated code extends a removed base class (as in the v0.1.6 bug) Pin the version; dry-run diff gate in CI
--force on CLI Unreviewed overwrite of hand-edited files Ban --force in the convention doc; no one should need it
Stub-injection via model name Malformed or hostile class name in generated PHP Validate model name against ^[A-Z][A-Za-z0-9]*$ before generation

Ramp-up

Very low — an afternoon. The browser panel is self-explanatory and the CLI is five flags. The actual onboarding work is teaching the team to read generated code rather than trust it, which is a review-culture change, not a tooling change. Expect the first two weeks to produce one or two "we generated it into the wrong namespace" incidents; the convention doc and Composer wrapper are the fix, not additional tooling.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jhaskell13/laraflow
sebastienheyd/boilerplate-media-manager
ccast/tagixo-primix
pretendtrue/laravel-builder
sawmainek/laravel-scout-tntsearch-driver
tomshaw/laravel-calendar-table
dibakar/laravel-ownership
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo
stevenay/myanfont
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera