php-api-builder

Build RESTful PHP APIs with CRUD, JWT auth, and OpenAPI generation.

2|Updated Feb 28, 2024
One-click install
npx skills add https://github.com/coagus/php-api-builder --skill php-api-builder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: php-api-builder
Source: https://github.com/coagus/php-api-builder/tree/main/resources/skill/php-api-builder
Command: npx skills add https://github.com/coagus/php-api-builder --skill php-api-builder

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The library automates REST API creation in PHP by deriving CRUD endpoints, validation, and OpenAPI docs from entity definitions, removing boilerplate work.

Core Features & Use Cases

  • Automatic CRUD from entities, with Active Record relationships
  • JWT-based authentication, multi-database support, and OpenAPI generation
  • Quick-start patterns for building services and middleware with zero configuration

Quick Start

Define your first entity and deploy the API to auto-generate CRUD endpoints and OpenAPI docs.

Frequently Asked Questions about php-api-builder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I auto-generate a REST API in PHP from entity definitions?

To auto-generate a REST API in PHP, define entities with PHP attributes and the library derives CRUD endpoints, validation, and OpenAPI docs automatically, eliminating manual boilerplate configuration.

What's the best way to add JWT authentication to a PHP REST API?

The best way to add JWT authentication is using the library's built-in middleware configuration, which handles JWT-based authentication alongside routing setup to secure your PHP REST API endpoints.

Does this PHP API builder support OpenAPI documentation generation?

Yes, this PHP API builder supports OpenAPI documentation generation by automatically deriving API docs from your entity definitions, providing interactive endpoint discovery without manual specification writing.

How does the PHP REST API handle RFC 7807 error formatting?

The PHP REST API satisfies RFC 7807 error formatting by applying standard problem details for HTTP APIs, ensuring consistent machine-readable error responses across all generated CRUD endpoints.

Can I configure middleware and routing for a PHP REST API without manual setup?

Yes, you can configure middleware and routing with zero configuration using the library's quick-start patterns, which automatically wire up services and Active Record relationships from entity definitions.

How do column allowlists protect query-building in a PHP REST API?

Column allowlists protect query-building by restricting which database columns can be queried through the REST API, preventing unsafe or unauthorized data exposure during CRUD operations.