ovac/idoc
IDoc is a Laravel package that generates API documentation from your routes and controller annotations. It provides a clean, searchable interface with minimal setup, helping keep your API reference accurate and in sync with your codebase.
Architecture fit. ovac/idoc is a Laravel-native package: a service provider, a published config file, and Artisan entrypoints that inspect the application's route table and controller metadata to emit an OpenAPI 3.0 document plus an interactive docs UI. Architecturally this is a code-first, in-process generator — it lives inside the app it documents rather than alongside it. That means near-zero coupling to your application code, no separate service to deploy, and no schema registry to keep in sync manually. It is a good fit for teams that treat the Laravel route/controller layer as the source of truth, and a poor fit for contract-first organizations where a hand-authored spec is the governance artifact.
Integration feasibility. Installation is a Composer require plus config publish and a single Artisan invocation — low friction. The real cost is annotation discipline: the quality of the generated spec is a direct function of how much intent the package can infer or parse from controllers, FormRequests, and API Resources. Conventional REST controllers with typed FormRequests and Eloquent API Resources should produce a usable baseline; controllers with dynamic responses, response macros, custom serializers, traits, or container-resolved dispatch will produce specs that are plausible but incomplete. Budget a discovery phase before committing to a rollout.
Technical risk.
__call routes, middleware-driven auth schemes, or polymorphic payloads. A wrong spec is worse than no spec because downstream SDK generators and partner integrations trust it.Key questions.
any schema?Stack fit. Appropriate for Laravel 10/11/12 monoliths and modular monoliths, and for individual services in a larger fleet. It slots in as a require-dev dependency with a CI generation step. It does not replace API gateway documentation, contract testing, or a schema registry — it feeds them. Teams already using Scramble or Scribe will find significant overlap rather than complementarity; treat this as a candidate replacement, not an addition.
Migration path.
idoc in a branch and produce a structural diff — endpoint coverage, missing schemas, changed auth declarations.Compatibility. Output is standard OpenAPI 3.0, so it plugs into Spectral (linting), openapi-diff (breaking-change detection in CI), Redocly/Stoplight (portal rendering), Backstage (catalog), and openapi-generator (client SDKs). The weak link is SDK codegen, which is unforgiving of loose schemas — validate generated clients against a real environment before publishing. Pin the package version in composer.lock; do not run dev-main in a release pipeline.
Sequencing.
Maintenance. Runtime footprint is negligible if scoped to dev/CI. The recurring cost is annotation upkeep: specs drift the moment developers skip attributes during feature work, and drift is silent. Mitigate by making the generated spec a reviewable artifact in every API PR and adding a coverage metric to the definition of done. Package upgrades are coupled to Laravel major releases — plan them into the same upgrade window.
Support. MIT, community-maintained, no vendor SLA. With a small contributor base, expect to read the source rather than find answers; Stack Overflow coverage will be thin. Assign an internal owner (API platform or developer-experience engineer) with authority to patch or fork. This is the single largest operational risk and should be stated explicitly in the adoption decision.
Scaling. Per-application generation scales cleanly because it is a build-time step; cost grows linearly with route count, and apps beyond a few hundred endpoints may need artifact caching. Organizationally, the model produces N independent specs — at which point the problem shifts from generation to aggregation. Plan for a catalog/portal layer rather than expecting each app to host its own docs.
Failure modes.
openapi-diff in CI.Ramp-up. A competent Laravel developer reaches a first working spec in one to two days. Team-wide consistency takes one to two sprints and requires a short written style guide for annotations plus lint enforcement — without it, every developer invents their own schema conventions. For the TPM, define adoption success up front: endpoint coverage percentage, CI check green rate, count of downstream consumers actively reading the spec, and a documented go/no-go review at the end of the pilot.
How can I help you explore Laravel packages today?