I have been working on an open source project that is delivered as a composer package and delivers all the tools you need to run a fancy schmancy API. The project is ongoing but since we are nearing a new release, I figured I'd start a topic and update the Phalcon community as improvements to the application are made.

Anyone tasked with creating their own API should consider using this project. It has logic for:

  • Serialize input/output (JSON API and Active Model are supported out of the box)
  • End point and end point property security
  • Leverages Phalcon ORM to support common API queries here
  • Eliminates and reduces boilerplate code while leaving plenty of hooks for custom logic
  • And since it's Phalcon, it's fast! The latest version supports PHP 7 and Phalcon 3 while older versions support PHP 5.X and Phalcon 2.x
  • Query language supports automatic side loading

Here is the source code: https://github.com/gte451f/phalcon-json-api-package

Here is an example applicationt to get you started. It contains a docker-compose file to make it stupid easy to try out the application. https://github.com/gte451f/phalcon-json-api