PHP-CRUD-API is a single-file REST API server that automatically exposes a SQL database through HTTP endpoints.
The tool solves the problem of manually building CRUD endpoints for database tables. It works by reading your database schema and generating REST operations for all tables without requiring you to write controller code. You upload the single PHP file to your server, configure database credentials at the bottom of the file, and immediately have a working API. The project implements the TreeQL specification, which extends REST conventions to support complex filtering, sorting, and relationship traversal through query parameters.
The tool suits projects where you need rapid API prototyping or have simple CRUD requirements without complex business logic. It works with MySQL, MariaDB, PostgreSQL, SQL Server, and SQLite. If your database includes spatial data, PostgreSQL with PostGIS or MySQL with spatial extensions are supported. The simplicity of deployment—a single file requiring only PHP 7.2 or higher with PDO drivers—makes it attractive for shared hosting environments where framework installation is difficult. For developers already using Laravel, Symfony, or SlimPHP, the project can be integrated as a Composer dependency rather than deployed standalone. The README does not compare this tool to other automatic API generators.
The project shows consistent maintenance with regular updates to the codebase. Development activity includes ongoing refinement of core functionality and bug fixes across multiple database backends. The tool receives attention to edge cases and compatibility across different SQL database systems. Updates address both feature requests and stability improvements in the single-file architecture.