Skip to content

Docuccino

Beautiful, accurate OpenAPI docs for Laravel — generated from the real shape of your code. Deep type inference, byte-for-byte deterministic output, and a semantic diff you can gate CI on.

Documentation from your code, not from annotations

Section titled “Documentation from your code, not from annotations”

Point Docuccino at your routes and it reads your controllers, form requests, resources, DTOs, enums, and exception handling to produce an accurate OpenAPI 3.2 document — then serves it in a built-in interactive viewer. You add annotations only where you want to say something your code can’t.

Under the hood, Docuccino builds a UIR (Universal Intermediate Representation): an OpenAPI-shaped document that also carries a stable identity for every operation and schema, and a record of where each detail came from. That’s what powers the deterministic output and the semantic diff.

Where do your docs need to be readable? Pick the tab that matches:

Terminal window
composer require docuccino/laravel
composer require --dev docuccino/inference-phpstan
php artisan docuccino:export

Readers hit /docs/api on a deployed environment: the adapter ships to production and serves the committed artifact, while the analysis engine stays a dev dependency.

Your OpenAPI document lands where you point it, and the bundled viewer is live at /docs/api in your local environment. Nothing else to configure — installation walks through it properly.

Deep type inference

Response and request shapes are inferred from your real types — array shapes, generics, and conditional returns included. Your existing type hints and PHPStan extensions make your docs better automatically.

Query parameters, for free

Filters, sorts, includes, and pagination for list endpoints are detected from your code — even when the query is built several method calls deep. No hand-written parameter lists to maintain.

Error responses, automatically

Docuccino reads your actual exception handling — render callbacks, exception render(), Responsable::toResponse() — so 422, 404, 403, and your custom error shapes are documented with zero configuration.

Deterministic output

The same code always produces byte-for-byte identical output — no timestamps, no absolute paths, no shuffling. Commit the file and your diffs stay clean; a tool upgrade moves at most a single generator version line (and nothing at all in the OpenAPI export).

A diff you can gate CI on

docuccino:diff --enforce compares two versions of your API and enforces a versioning policy. Ship a breaking change without the right version bump and the build fails.

A format you can build on

The UIR is a documented format with a published JSON Schema. Export it with docuccino:export --format=uir, validate it with docuccino:validate, and read every detail’s provenance — the same document the emitters and the diff run on.

A small invoices API in the shape Docuccino emits, rendered by the bundled Scalar viewer — the same viewer your app serves at /docs/api. No screenshots: this is the live component reading an OpenAPI 3.1 document.

Docuccino documents Laravel applications today. Everything downstream of route analysis — the UIR, the emitters, the diff, the lint — is framework-agnostic, so an adapter for another framework plugs into machinery that already exists.