DownloadPHP low code API generator
This is a light & easy low code API generator using configuration arrays. It can be used to create API's in very short time once you are done with your database.
.env File
Configuration Rules
JavaScript Examples
SQL File
-
Sql/global.sql Import this SQL file on your MySql global instance
-
Sql/customer\_master.sql Import this SQL file on your MySql customer instance
-
Note: One can import both sql's in a single database to start with. Just configure the same detail in the environment files.
Folders
File Folder
-
Log Folder for application Log.
-
TestCase Folder for Test Cases
www Folder
-
Config Basic configuration folder
-
File Folder for uploaded files.
-
Hook Hook.
-
Supplement Customised coding for APIs
-
Validation Contains validation classes.
-
public\_html Contains index.php file.
www/File Folder
-
Dropbox/Public Uploaded files for open to web
-
Dropbox/Closed Uploaded files by authorised user
-
ServingFile/HTML HTML files to be served with dynamic response (XSLT)
-
ServingFile/PHP PHP view files to be served with dynamic response
-
ServingFile/XSLT XSLT files to be served with dynamic response
www/Supplement Folder
-
Crons Contains classes for cron API's
-
Custom Contains classes for custom API's
-
ThirdParty Contains classes for third-party API's
-
Upload Contains classes for upload file API's
Route Folder
www/Config/Route
-
/Config/Route/Private/<GroupName>
-
/Config/Route/Public
-
<GroupName> is the group user belongs to for accessing the API's
File
-
/GETroutes.php for all GET method routes configuration.
-
/POSTroutes.php for all POST method routes configuration.
-
/PUTroutes.php for all PUT method routes configuration.
-
/PATCHroutes.php for all PATCH method routes configuration.
-
/DELETEroutes.php for all DELETE method routes configuration.
SQL Folder
These files locations are used in routes config to be used for generating response.
www/Config/Sql
-
/Config/Sql/Private/GlobalDB for global database.
-
/Config/Sql/Private/CustomerDB for customer (including all hosts and their databases).
-
/Config/Sql/Public for Public Web API's (No Authentication).
File
-
/GET/<filenames>.php GET method SQL.
-
/POST/<filenames>;.php POST method SQL.
-
/PUT/<filenames>.php PUT method SQL.
-
/PATCH/<filenames>.php PATCH method SQL.
-
/DELETE/<filenames>.php DELETE method SQL.
One can replace <filenames> tag with desired name as per functionality.
Setting route CIDR
Below are route level CIDR settings for a set of system routes (starting / ending with)
`customer`.`customer_cron_request_restricted_cidr` VARCHAR(250) DEFAULT '0.0.0.0/0'
`customer`.`customer_custom_request_restricted_cidr` VARCHAR(250) DEFAULT '0.0.0.0/0'
`customer`.`customer_dropbox_request_restricted_cidr` VARCHAR(250) DEFAULT '0.0.0.0/0'
`customer`.`customer_explain_request_restricted_cidr` VARCHAR(250) DEFAULT '0.0.0.0/0'
`customer`.`customer_export_request_restricted_cidr` VARCHAR(250) DEFAULT '0.0.0.0/0'
`customer`.`customer_import_sample_request_restricted_cidr` VARCHAR(250) DEFAULT '0.0.0.0/0'
`customer`.`customer_import_request_restricted_cidr` VARCHAR(250) DEFAULT '0.0.0.0/0'
`customer`.`customer_routes_request_restricted_cidr` VARCHAR(250) DEFAULT '0.0.0.0/0'
`customer`.`customer_thirdparty_request_restricted_cidr` VARCHAR(250) DEFAULT '0.0.0.0/0'
`customer`.`customer_upload_request_restricted_cidr` VARCHAR(250) DEFAULT '0.0.0.0/0'
Configuring in Database Tables
To enable CIDR settings at Customer / Group / User level one can set them in respective table and record
-- Customer level
`customer`.`allowed_cidr` VARCHAR(250) DEFAULT '0.0.0.0/0',
-- Group level
`group`.`allowed_cidr` VARCHAR(250) DEFAULT '0.0.0.0/0',
-- User level
`user`.`allowed_cidr` VARCHAR(250) DEFAULT '0.0.0.0/0',
Contributing
Issues and feature request are welcome.<br />
Feel free to share them on issues page
Author
-
Ramesh N. Jangid (Sharma)
Github: @polygoncoin
License
Copyright © 2026 Ramesh N. Jangid (Sharma).<br />
This project is MIT licensed.
|