In our recent podcast episode, we spoke with Kevin Dunglas, CEO at Les-Tilleuls.coop, a professional services organization made up of API experts who created the open-source framework, API Platform. Appropriately fitting into our API Open Source October theme, our conversation with Kevin included some implementation tips and a walkthrough of the benefits of API Platform and how it utilizes OpenAPI.
The Goal of API Platform
“The goal of API Platform is to be very easy to use so that developers can create a prototype and start working on the project quickly. And then to scale that project from there.” — Kevin Dunglas
The API Platform Framework is a set of tools to build and consume web APIs, allowing developers to create REST and GraphQL APIs, scaffold Jamstack web apps, and stream changes in real time. Dunglas expresses that the platform’s goal is to be able to both support more minor API creation that can be built in a ‘day or less’ and to also support larger API projects with custom business logic.
API Platform is built on top of other various products. The server skeleton includes the Symfony framework and the Doctrine ORM, and their scaffolding tool supports the various JavaScript libraries. Finally, their development environment and deployment mechanism leverage tools like Docker, Kubernetes, and Helm.
API Platform as an Open-Source Framework
“Using API Platform, the goal is to scale a tiny prototype to production of a deeper project without having to touch much of the code. And mostly thanks to the open-source community, we’ve been able to improve the framework’s extensibility. It’s because it’s an open-source project that we are able to have this ability to do something very quickly but also to scale effectively.” — Kevin Dunglas
Seven years ago, Kevin’s team created a GitHub repository called API Platform, containing the code of an internal framework to build Web APIs. Since then, it’s blossomed into a project that has gained plenty of interest from outside developers and contributors, receiving over 7,000 stars on GitHub. Kevin suspects the popularity has something to do with the platform being integrated with the Symphony framework, a prevalent web framework.
“When you build APIs with the official distribution of Symphony, you get an API platform with the framework, even if you can also use API Platform as a standard tool without Symphony. So here we are today, and I’m still the main contributor of that platform, but I’m mostly focused on the architecture part now,” shares Kevin.
Some of the organizations using open-source projects on the API Platform Framework include AudienceHero, Bolt, CoopCycle, Mobicoop, Sylius, and even the French government. You can get involved in the API Platform Community by visiting their community page.
Utilizing PHP in the API Platform Framework
“We hesitated when we started the project to use PHP at the time, but PHP was still very popular in France, and Symphony is still very popular as well, so we stuck with it. PHP is improving every year, and PHP 81 will have a lot of exciting new features.” — Kevin Dunglas.
PHP is a widely-used open-source general-purpose scripting language. Kevin notes that PHP is faster than other languages like Python. Still, for those who are not already familiar with PHP, there may be some issues utilizing it or contributing to it from an open-source point of view.
While I’m not the biggest fan of PHP myself, I am a fan of things you can’t kill. PHP keeps coming back better and stronger than before, and there are definitely some use cases for it where appropriate. Stoplight, however, utilizes typescript for our work, but we enjoyed having a guest on the show that brings a different perspective.
Overall, it was a thrill having a different kind of guest experience than we usually have on the show. We enjoyed getting to spotlight one of the many excellent open-source tools out there that can help with API design and development. If you’d like to learn about Stoplight’s open-source tools for linting, mocking, documentation, and more, check out our Open Source page.
To hear the full implementation story and more about the framework, check out the podcast episode on API Intersection. For more on API platform open source tools, head to our open source page.