rakutentech/laravel-request-docs
Automatically generate clean, interactive API documentation for your Laravel application directly from your routes, form requests, and API resources—no manual annotations or extra config required. Just install the package and instantly browse every endpoint, parameter, and response.
Architecture fit. rakutentech/laravel-request-docs is a dev-time introspection layer over Laravel's router and Eloquent metadata, not a runtime dependency of the application. It registers a documentation route (default /request-docs) served by package middleware and renders a UI from discovered routes, controller docblocks, form-request validation rules, and model attributes. Because it does not sit in the production request path and requires no schema changes, it belongs conceptually alongside route:list, static analysis, and linting in the engineering toolchain rather than in the application architecture. That makes it low-coupling and low-blast-radius — the main architectural decision is simply whether it is a require-dev dependency or a shipped-but-disabled one.
Integration feasibility. Integration is a Composer install plus a published config file. No migrations, no service contracts to implement, no changes to existing controllers required to get baseline value — documentation is derived from code that already exists. Incremental value (richer descriptions, example responses) comes from docblocks and saved example payloads, which is opt-in and can be adopted route-by-route. Realistic effort for a pilot: under a day for a developer, plus a follow-up to wire it into CI.
Technical risk.
enabled flag and route middleware must be explicitly gated by environment, and that gate must be verified in the deployed staging/production config, not just locally. Any team that relies on "we'll remember to turn it off" is taking on meaningful risk.Key questions for the maintainer/team.
APP_ENV=production?Stack fit. Well-suited to a conventional Laravel monolith or modular monolith already using FormRequests, API Resources, and route model binding — that is exactly the code shape the package knows how to read. It fits less cleanly in architectures where the public API surface is defined outside Laravel's router (e.g. an OpenAPI-first gateway, or a separate spec repo), because in those cases the package would document an implementation detail rather than the contract.
Migration path. There is no migration in the data sense. The adoption path is: add as a require-dev dependency (or a production dependency with a hard environment gate, if you want the UI available in a staging environment consumers can reach); publish the config; set the enable flag from an environment variable defaulting to false; define the middleware/auth group that protects the route; run the generation command; review the rendered output for accidentally exposed internal routes; then commit the config.
Compatibility. v2.44 is a minor release with no deprecations or breaking changes signalled — the only delta from v2.43 is the Laravel 13.x compatibility line. Within the 2.x line, upgrade risk is effectively zero. The forward-looking consideration is the reverse direction: this release tells us the package is keeping pace with Laravel's annual major cadence, which is the single most important sustainability indicator for a dev-tooling dependency. The counterpart risk is that a compat bump landing as an automated PR means the package's own compatibility story is only as deep as its test suite; teams on Laravel 13 should run a short spike confirming the docs UI renders correctly against routes using newer framework features (attribute-based routing config, enum casts, etc.) before treating it as validated.
Sequencing.
^2.44, publish config with the enable flag defaulting to false and gated on a non-production environment variable.Maintenance. Ongoing cost is low and mostly config-shaped: a pinned version, one config file, and occasional re-verification when Laravel ships a major. The real maintenance burden is organizational — keeping example responses current and free of sensitive data, and pruning routes from the docs surface as internal endpoints are added. Budget for that as a recurring team habit, not as a package cost.
Support. Community-maintained under the Rakuten org with no commercial SLA and no vendor escalation path. The v2.44 release is a good signal: a compatibility PR was raised and merged promptly rather than the package sitting dormant through a framework major. But automated compat PRs indicate a small maintainer surface area. Practical mitigation is the low switching cost — because the tool has no runtime coupling, replacing it (with Scribe or an OpenAPI-first pipeline) is a contained effort rather than a refactor.
Scaling. Generation cost scales with route count, model count, and relationship depth — not with traffic. Applications in the several-hundred-route range may see slow UI loads or timeouts if docs are generated on demand per request; the fix is pre-generation into a static artifact. Memory pressure during model introspection on very wide models (many attributes, deep relationship graphs) is the more likely ceiling than CPU. None of this affects production request latency.
Failure modes.
Ramp-up. Near zero for a PHP developer — install, publish, open the URL. The ramp-up cost sits with consumers (frontend, mobile, QA, external integrators), who need a short orientation on reading the UI, understanding that validation rules shown are the source of truth, and knowing that example responses are illustrative rather than contractual. That orientation is worth doing once, deliberately, because the package's value is entirely realized by the people reading it.
How can I help you explore Laravel packages today?