mevdschee/php-crud-api

Single file PHP script that adds a REST API to a SQL database

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 48 minutes ago
Added to GitGenius on September 18th, 2026
Created on February 10th, 2015
Open Issues & Pull Requests: 85 (+0)
GitHub issues: Enabled
Number of forks: 1,028
Total Stargazers: 3,736 (+0)
Total Subscribers: 166 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 9.1 hours
Mean response time: 21.0 days
90th percentile: 116.5 days
Tracked items: 49

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 12
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 877 days
Stale 30+ days: 11
Stale 90+ days: 8

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • help wanted (25)
  • enhancement (17)
  • bug (4)
  • question (2)
  • invalid (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

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.