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 Structura Laravel Package

kaue-f/laravel-structura

Laravel Structura provides a structured, modular foundation for Laravel apps, with generators and conventions for domains, services, repositories, actions, and DTOs. It keeps business logic organized, reduces boilerplate, and makes large codebases easier to maintain.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for architecture scaffolding: Structura generates Data objects, services, caches, helpers, and resources from a single command surface. This lets a PM treat "standard project architecture" as a purchasable/adoptable capability rather than an internal platform investment, freeing engineering time for product differentiation.
  • Time-to-market for new Laravel services: Generator-driven scaffolding (now with config-driven defaults, path handling, and --raw escape hatches) shortens the path from ticket to working endpoint. This is directly relevant to roadmap commitments where delivery velocity is the constraint.
  • Standardization across teams and squads: The Data architecture (make(), from(), fromRequest(), fromArray(), Arrayable, JsonSerializable) plus default CacheSupport establishes conventions for request-to-domain handoff and serialization. This supports decisions to consolidate multiple ad-hoc patterns into one, reducing review friction and onboarding cost.
  • API and integration surface decisions: First-class Request/FormRequest support and JSON serialization mean Data objects can serve as the contract boundary for API payloads and third-party integrations — a relevant input when deciding how to model external contracts.
  • Tech-debt and refactor planning: The v5.0.0 DTO → Data rename and the v5.1.0 consolidation of generator defaults indicate an actively evolving API. This informs sequencing decisions: adopt on new services first, defer retrofit of stable services.
  • Enablement and tooling investments: The updated Laravel Boost skill (SKILL.md) supports AI-assisted and onboarding workflows, which is a lever for reducing ramp-up time on new hires or contract teams.
  • Quality-gate decisions: New PHP syntax validation on generated files and expanded test coverage (constructors, validation, serialization, edge cases) reduce the "generated code is untrusted code" objection — useful when justifying adoption to a risk-averse engineering lead.

When to Consider This Package

Consider adopting when:

  • You are starting a new Laravel service or module where architecture conventions are not yet entrenched and boilerplate cost is real.
  • Your domain is DTO/Data-heavy — API resources, request validation handoff, cache layers, service result patterns — where the package's opinions map directly onto your needs.
  • You have multiple teams or recurring project templates and want a shared, documented convention rather than a wiki page nobody reads.
  • You want consistency enforced by tooling (generators + config) instead of by code review.
  • You are on a supported Laravel version and can absorb a composer update-only upgrade path (v5.1.0 is explicitly non-breaking from v5.0.0).
  • You already use or plan to use Laravel Boost, where the bundled skill adds incremental value.

Look elsewhere or defer when:

  • You have an established architecture with stable service/repository/DTO patterns; retrofit cost likely exceeds benefit, and generated code will diverge from house style.
  • The project is small or short-lived — the convention overhead and a new dependency outweigh boilerplate savings.
  • You need long-term vendor stability guarantees. This is a single-maintainer package with a breaking change in the prior minor-major (v4 → v5.0.0, DTO → Data). Treat it as a fast-moving dependency requiring upgrade capacity, not a frozen foundation.
  • Your team has strong, differing opinions on Data/Service layering; a generator that imposes defaults can become a source of friction and inconsistent partial adoption.
  • You require enterprise support, SLAs, or security review sign-off that a community package cannot provide.
  • Upgrading from v4.x without capacity to execute the v5.0.0 migration (DTO → Data) — the cost is non-trivial and must be planned, not incidental.

How to Pitch It (Stakeholders)

For executives (one paragraph): Structura is a Laravel code-generation package that standardizes how we build the repetitive scaffolding around every feature — data transfer objects, services, caches, helpers. Adopting it on new work reduces boilerplate hours per feature, makes codebases look the same across teams, and shortens onboarding because conventions are encoded in tooling rather than documents. The v5.1.0 release is additive and non-breaking: better Data object construction (including directly from HTTP requests), JSON serialization, safer generator defaults, and expanded test coverage including syntax validation of generated files. Risk is contained: it is a single-maintainer open-source dependency, so we recommend adopting it on new services first, keeping generated code reviewable, and budgeting for periodic upgrades — not mandating it retroactively across existing systems.

For engineering leadership: v5.1.0 matures the Data layer introduced in v5.0.0. InteractsWithData now covers make(), from(), fromArray(), and fromRequest() (including FormRequest), plus Arrayable inputs and JsonSerializable output — meaning Data objects can sit cleanly at the HTTP boundary and in API responses without custom adapters. Generators now lean on package config rather than per-command options, Cache classes extend CacheSupport by default with --raw as the opt-out, and helper/service generation gained configurable paths and ServiceResult/Makeable integration. Critically for risk: generated files are now PHP-syntax-validated in tests, and the release is explicitly non-breaking from v5.0.0 — composer update plus an optional structura:config review. If we are on v4.x, the v5.0.0 DTO → Data migration must be sequenced first.

For engineering teams (adoption ask): Use Structura for new modules; run structura:config to review defaults before generating; keep generated output in code review (it is a starting point, not an untouchable artifact); and update the Boost skill via boost:install if used. Track upgrade notes each release, since the package has demonstrated willingness to make breaking architectural changes between majors.

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.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core