Skip to content

A minimalist, framework-free RESTful API boilerplate to quickly build and deploy CRUD endpoints backed by MySQL.

Notifications You must be signed in to change notification settings

fullstackondemand/rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RESTful API Boilerplate with OOP & MVC Pattern

Latest Stable Version License PHP Version Require

A minimalist, framework-free PHP RESTful API boilerplate you can fork to rapidly build your own CRUD endpoints backend by MySQL.

Installation

It's recommended that you use Composer to install Rest API.

composer create-project restjs/rest-api

This will install Rest API and all required dependencies. It requires PHP 8.2 or newer.

Folder Structure

├─── src
│     ├─── Api                                              # API Endpoint Folder
│     │     └─── [Slug]                                     # Route Folder
│     │             ├─── [Slug].php                         # Entity File
│     │             ├─── Controller.php                     # Controllers File
│     │             ├─── Model.php                          # Models File
│     │             └─── Router.php                         # Routes File
│     │
│     ├─── Middleware                                       # Middleware Folder
│     │     └─── Authorization.php                          # Authorization Middleware File
│     └─── function.php                                     # All External Functions file
│
├─── index.php                                              # Application Execute File 
├─── .env                                                   # Environment Variable File 
├─── .gitignore
├─── .htaccess 
├─── composer.json 
└─── README.md 

You may quickly test this using the built-in PHP server:

composer start

Going to http://localhost:8888/api/.

License

MIT License. © 2025 FullStackOnDemand

About

A minimalist, framework-free RESTful API boilerplate to quickly build and deploy CRUD endpoints backed by MySQL.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages