knuckleswtf/scribe
Generate human-friendly API docs from your Laravel codebase. Scribe outputs a sleek single-page HTML doc with code samples and “Try It Out”, plus Postman collections and OpenAPI specs. It can extract params from validation/FormRequests and auto-generate sample responses.
API Documentation as a First-Class Product Feature:
Developer Experience (DX) Roadmap:
git push to main).Build vs. Buy Decision:
afterExtracting) or custom strategies to adapt to non-standard APIs (e.g., GraphQL-like endpoints, WebSocket routes).Key Use Cases:
@deprecated with UI badges (e.g., for sunsetting old routes).@deprecated in docs).swagger-ui-express, connexion) or custom scripts."Scribe eliminates the $50K/year cost of manual API documentation by auto-generating interactive, always-up-to-date docs from our Laravel codebase. With zero maintenance overhead, frontend teams can self-serve API examples (e.g., ‘Try It Out’ panels), reducing onboarding time by 60%. It also future-proofs our APIs with OpenAPI/Postman exports for partners—all while cutting dev time spent on Swagger annotations or Postman collections by 75%."
Key Outcomes:
*"Scribe turns your Laravel API into self-documenting code. No more:
- Writing Swagger annotations by hand.
- Maintaining Postman collections in sync with routes.
- Debugging stale Markdown docs.
How it works:
- Auto-discovers routes, validation rules, and API Resources.
- Generates examples from Eloquent models/factories (no mock data needed).
- Exports to HTML (interactive), OpenAPI (3.0/3.1), or Postman.
- Extensible: Add custom strategies for edge cases (e.g., GraphQL-like endpoints).
Tech Deep Dive:
- Parses FormRequests and validation rules for request params.
- Calls endpoints safely to fetch real response examples.
- Supports deprecation tags, custom response types, and Blade syntax in configs.
- Hooks (e.g.,
afterExtracting) let you modify extracted data before rendering.Migration Path:
- Drop-in install (
composer require knuckleswtf/scribe).- Configure
scribe.php(5-minute setup).- Run
php artisan scribe:generatein CI/CD.Why not [Alternative X]?
- Scribe is Laravel-native (handles FormRequests, API Resources, etc.).
- Interactive HTML > static Markdown/Postman.
- No vendor lock-in (MIT license, OpenAPI exports)."*
Dev-Focused Benefits:
How can I help you explore Laravel packages today?