SlideShare a Scribd company logo
Framework for API-driven Projects
@dunglas - Les-Tilleuls.coop
Kévin Dunglas
Founder of Les-Tilleuls.coop
Symfony Core Team
API Platform creator
@dunglas
@dunglas - Les-Tilleuls.coop
Les-Tilleuls.coop
Self-managed company since 2011
100% owned by employees
25 people, 97% growth in 2016
Hiring in London, Paris and Lille: jobs@les-tilleuls.coop
API Platform: A Framework for API-driven Projects
or
API Platform: A Framework for API-driven Projects
The Web in 2018
@dunglas - Les-Tilleuls.coop
APIs: the Heart of the New Web
@dunglas - Les-Tilleuls.coop
APIs: the Heart of the New Web
Central point to access data
Encapsulate the business logic
Same features available everywhere:
webapps, mobile apps, IoT, customers, providers…
@dunglas - Les-Tilleuls.coop
Progressive Web Apps
Downloaded only 1 time, works offline!
Sends async HTTP requests to the API
Huge ecosystem: React, Angular, Vue…
Holds the presentation logic
Static « website »: JS, HTML and CSS
Modernized stack:
ES2015, Babel, Webpack, Yarn, Flow, TypeScript, ReasonML…
@dunglas - Les-Tilleuls.coop
Native Mobile Apps
Sync data by sending HTTP requests to the API
JS stack:
React Native, NativeScript
Downloaded from stores (App Store, Google Play)
Look’n’Feel consistent with the platform (iOS or Android)
@dunglas - Les-Tilleuls.coop
Cloud Native Projects
Software built, tested and deployed continuously
Rich and open ecosystem:
Docker, Kubernetes, Mesos, Terraform…
Projects are hosted on public and private clouds
Containers and orchestration from dev stations to prod
A Framework
for the Modern Web
@dunglas - Les-Tilleuls.coop
Goals
Modern API formats: JSON-LD, GraphQL…
A rock-solid API-first project in minutes
Batteries included:
create, consume and deploy the API
Customizable, extensible, modular:
config, events, decoration…
Getting
Started
@dunglas - Les-Tilleuls.coop
Docker
All you need is
(but it’s optional)
@dunglas - Les-Tilleuls.coop
Install
Download the latest release on api-platform.com or GitHub
https://localhost
$ docker-compose up
API Platform: A Framework for API-driven Projects
@dunglas - Les-Tilleuls.coop
What’s Inside?
Postgres
Container 3: back office (dev)
Container 2: generated front office Progressive Web App (dev)
HTTP/2 and HTTPS proxy (dev)
Container 1: API Server (PHP + Symfony Flex)
Varnish cache (more later)
dev ➡ CI ➡ prod
Describe the
API Schema
@dunglas - Les-Tilleuls.coop
API Platform: A Framework for API-driven Projects
Map With the
Database
@dunglas - Les-Tilleuls.coop
Persistence
Public and internal models can be different
Work with any persistence layer: 2 interfaces to implement
Experimental ElasticSearch and MongoDB built-in support
RAD: built-in support for Doctrine ORM, 100% optional
Compatible with CQRS and Event Sourcing
@dunglas - Les-Tilleuls.coop
Your 1st API
is ready!
API Platform: A Framework for API-driven Projects
@dunglas - Les-Tilleuls.coop
Out of the Box Features
JSON-LD + Hydra formats
But also… GraphQL, JSONAPI, HAL, YAML, CSV, XML, raw JSON…
OpenAPI (aka Swagger) support
API documentation (Swagger UI)
POST, GET (item and lists), PUT, DELETE
Pagination for lists (30 items per page), fully configurable
Data
Validation
@dunglas - Les-Tilleuls.coop
Validation groups
Error levels
Symfony Validator integration
Custom validators
API Platform: A Framework for API-driven Projects
Filtering
@dunglas - Les-Tilleuls.coop
Creating custom filters is easy
8 built-in filters, with different strategies
API Platform: A Framework for API-driven Projects
Hypermedia
@dunglas - Les-Tilleuls.coop
API Platform: A Framework for API-driven Projects
Embedding
Relations
@dunglas - Les-Tilleuls.coop
@dunglas - Les-Tilleuls.coop
Embedded Relations
Cache Layer
(invalidation)
@dunglas - Les-Tilleuls.coop
HTTP cache (invalidation)
GET responses generated only 1 time, then served by Varnish
(can work with CloudFlare and Fastly too)
Responses are tagged with resources’s IDs they contain
(including relations, embedded resources…)
On write: cached responses containing stale data are purged
Builtin, single config flag
https://localhost:8444
Other
Features
@dunglas - Les-Tilleuls.coop
Other Features
Deprecation / API evolution
Extensible: compatible with all Symfony bundles
Every part can be replaced (dependency injection)
Authentification and authorization
JSON-LD and Hydra
@dunglas - Les-Tilleuls.coop
JSON-LD
Standardized hypermedia format: W3C recommandation (2014)
Easy to use: a standard JSON document with some specials
keys (starting with @) and mapped with a context
Backed by Google, BBC, Microsoft, US & UK govs...
Compliant with technologies of the semantic web: RDF,
SPARQL, triple store...
JSON for Linked Data
API Platform: A Framework for API-driven Projects
API Platform: A Framework for API-driven Projects
API Platform: A Framework for API-driven Projects
@dunglas - Les-Tilleuls.coop
Hydra
Allow to create auto-discoverable APIs:
resources, properties, types, operations
Standard for common API structures:
collections, paginations, filters, errors…
In-band hypermedia API docs
W3C community group
API Platform: A Framework for API-driven Projects
Client-side
tools
Admin
@dunglas - Les-Tilleuls.coop
API Platform Admin
Material Design back office interface
Built on top of React Admin
Hypermedia: parses Hydra docs
100% dynamic: no code generation
https://localhost:444
100% client-side, 100% JS: work with any Hydra enabled API
100% customizable: bring your own React components!
API Platform: A Framework for API-driven Projects
@dunglas - Les-Tilleuls.coop
Show Me the Code!
Clients
Generator
@dunglas - Les-Tilleuls.coop
React PWA Generator (default)
Scaffolds a client-side apps
Twitter Bootstrap support + accessibility (ARIA roles)
Uses ES2015’s fetch()
Parses Hydra API doc to generate files

(experimental Swagger support)
$ docker-compose exec client 

generate-api-platform-client
API Platform: A Framework for API-driven Projects
@dunglas - Les-Tilleuls.coop
The Stack
React, ES2015+, JSX
React Router: client-side routing library
Redux: extensible container to manage the states of the app
Redux Form: forms
Redux Thunk: async actions (AJAX requests)
Optional: Twitter Bootstrap
API Platform: A Framework for API-driven Projects
@dunglas - Les-Tilleuls.coop
Other Skeletons
React Native (@mysiar)
Your preferred technology: Pull Requests very appreciated!
TypeScript definitions (@soyuka)
Vue.js (@alOneh)
Angular (momenttech/lysis)
@dunglas - Les-Tilleuls.coop
React Native
$ generate-api-platform-client 
—g react-native
Deploy in
Clouds
@dunglas - Les-Tilleuls.coop
Kubernetes & Helm
k8s: « Production-Grade Container Orchestration »
Google GKE / Amazon EKS / Azure AKS
Helm: K8S package manager (like APT or Homebrew)
Open Source
@dunglas - Les-Tilleuls.coop
Deploy in the Cloud
A Helm chart is provided with API Platform
# …Build and push the Docker images…
# …Connect to your Kubernetes cluster…
$ helm install ./api/helm/api --name api
The project is deployed,
managed, and scales!
GraphQL?
@dunglas - Les-Tilleuls.coop
GraphQL Support
$ docker-compose exec php 

composer req webonyx/graphql-php
API Platform: A Framework for API-driven Projects
@dunglas - Les-Tilleuls.coop
They Already Use API Platform
@dunglas - Les-Tilleuls.coop
They Build API Platform
10 maintainers
MIT licensed (Free Open Source Software)
150+ contributors
2.9k GitHub Stars
3000+ commits
Thanks!
Any questions?
api-platform/api-platform @ApiPlatform
https://api-platform.com

More Related Content

PDF
API Platform and Symfony: a Framework for API-driven Projects
PDF
Apache Kafka Introduction
PPTX
RESTful API - Best Practices
PDF
Introduction to WebSockets Presentation
PPTX
Introduction to kubernetes
PPTX
Apache Ranger
PPTX
APACHE KAFKA / Kafka Connect / Kafka Streams
PDF
(Draft) Kubernetes - A Comprehensive Overview
API Platform and Symfony: a Framework for API-driven Projects
Apache Kafka Introduction
RESTful API - Best Practices
Introduction to WebSockets Presentation
Introduction to kubernetes
Apache Ranger
APACHE KAFKA / Kafka Connect / Kafka Streams
(Draft) Kubernetes - A Comprehensive Overview

What's hot (20)

PPTX
Rate limits and all about
PPTX
Virtual Flink Forward 2020: A deep dive into Flink SQL - Jark Wu
PDF
The Dual write problem
PPTX
Zookeeper 활용 nifi clustering
PDF
An introduction to MongoDB
PDF
Atomicity In Redis: Thomas Hunter
PPTX
Thrift vs Protocol Buffers vs Avro - Biased Comparison
PDF
Introduction to GitHub Actions
PPTX
Domain Driven Design
PPTX
MongoDB
PDF
Introduction to Kong API Gateway
PPTX
CAP Theorem - Theory, Implications and Practices
PDF
CI CD Basics
PDF
Microservice Architecture
PDF
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model Serving
PDF
Event driven autoscaling with keda
PPTX
Kafka presentation
PDF
Kubernetes Docker Container Implementation Ppt PowerPoint Presentation Slide ...
PDF
Kubernetes: A Short Introduction (2019)
PDF
Building an API Security Strategy
Rate limits and all about
Virtual Flink Forward 2020: A deep dive into Flink SQL - Jark Wu
The Dual write problem
Zookeeper 활용 nifi clustering
An introduction to MongoDB
Atomicity In Redis: Thomas Hunter
Thrift vs Protocol Buffers vs Avro - Biased Comparison
Introduction to GitHub Actions
Domain Driven Design
MongoDB
Introduction to Kong API Gateway
CAP Theorem - Theory, Implications and Practices
CI CD Basics
Microservice Architecture
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model Serving
Event driven autoscaling with keda
Kafka presentation
Kubernetes Docker Container Implementation Ppt PowerPoint Presentation Slide ...
Kubernetes: A Short Introduction (2019)
Building an API Security Strategy
Ad

Similar to API Platform: A Framework for API-driven Projects (20)

PDF
API Platform 2.1: when Symfony meets ReactJS (Symfony Live 2017)
PDF
API Platform: Full Stack Framework Resurrection
PPTX
Creating hypermedia APIs in a few minutes using the API Platform framework
PDF
[GIDS 2024] Navigating Innovation with Open Hybrid Cloud and Openshift AI.pdf
PDF
Drupal 8 and iOS - an Open Source App
PPTX
AWS re:Invent 2016 : announcement, technical demos and feedbacks
PDF
Docker and Containers overview - Docker Workshop
PPTX
Docker and containers - For Boston Docker Meetup Workshop in March 2015
PPTX
Docker Training - June 2015
PDF
Introduction to Apache Kafka and why it matters - Madrid
PDF
28March2024-Codeless-Generative-AI-Pipelines
PDF
A high profile project with Symfony and API Platform: beIN SPORTS
PDF
Introducing Kafka's Streams API
PPTX
DevNation
PPTX
StrongLoop Overview
PDF
Made for Mobile - Let Office 365 Power Your Mobile Apps
PDF
Project Flogo: An Event-Driven Stack for the Enterprise
PPTX
Vert.x devoxx london 2013
PDF
DevOps Con 2015: Radical Agility with Autonomous Teams and Microservices in t...
PDF
Radical Agility with Autonomous Teams and Microservices in the Cloud
API Platform 2.1: when Symfony meets ReactJS (Symfony Live 2017)
API Platform: Full Stack Framework Resurrection
Creating hypermedia APIs in a few minutes using the API Platform framework
[GIDS 2024] Navigating Innovation with Open Hybrid Cloud and Openshift AI.pdf
Drupal 8 and iOS - an Open Source App
AWS re:Invent 2016 : announcement, technical demos and feedbacks
Docker and Containers overview - Docker Workshop
Docker and containers - For Boston Docker Meetup Workshop in March 2015
Docker Training - June 2015
Introduction to Apache Kafka and why it matters - Madrid
28March2024-Codeless-Generative-AI-Pipelines
A high profile project with Symfony and API Platform: beIN SPORTS
Introducing Kafka's Streams API
DevNation
StrongLoop Overview
Made for Mobile - Let Office 365 Power Your Mobile Apps
Project Flogo: An Event-Driven Stack for the Enterprise
Vert.x devoxx london 2013
DevOps Con 2015: Radical Agility with Autonomous Teams and Microservices in t...
Radical Agility with Autonomous Teams and Microservices in the Cloud
Ad

More from Les-Tilleuls.coop (11)

PDF
Symfony on steroids
: Vue.js, Mercure, Panther
PDF
Official "push" and real-time capabilities for Symfony and API Platform (Merc...
PDF
Progressively enhance your Symfony 4 app using Vue, API Platform, Mercure and...
PDF
HTTP/2: speed up your apps and dispatch real time updates (Symfony and API Pl...
PDF
Panther: test your Symfony apps with real web browsers
PDF
Symfony 2 : Performances et Optimisations
PDF
Diaporama du sfPot Lillois du 20 mars 2014
PDF
Workshop HTML5 : référencement grâce à la sémantique
PDF
Atelier #3 intégration html
PDF
Atelier #2 initiation à css
PDF
Atelier initiation au html5
Symfony on steroids
: Vue.js, Mercure, Panther
Official "push" and real-time capabilities for Symfony and API Platform (Merc...
Progressively enhance your Symfony 4 app using Vue, API Platform, Mercure and...
HTTP/2: speed up your apps and dispatch real time updates (Symfony and API Pl...
Panther: test your Symfony apps with real web browsers
Symfony 2 : Performances et Optimisations
Diaporama du sfPot Lillois du 20 mars 2014
Workshop HTML5 : référencement grâce à la sémantique
Atelier #3 intégration html
Atelier #2 initiation à css
Atelier initiation au html5

Recently uploaded (20)

PPTX
innovation process that make everything different.pptx
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
PDF
Slides PDF The World Game (s) Eco Economic Epochs.pdf
PDF
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
PPT
tcp ip networks nd ip layering assotred slides
PPTX
Job_Card_System_Styled_lorem_ipsum_.pptx
PPTX
Internet___Basics___Styled_ presentation
PPTX
Introuction about WHO-FIC in ICD-10.pptx
PPTX
Digital Literacy And Online Safety on internet
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PPTX
international classification of diseases ICD-10 review PPT.pptx
PPTX
Power Point - Lesson 3_2.pptx grad school presentation
PPTX
introduction about ICD -10 & ICD-11 ppt.pptx
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PPTX
E -tech empowerment technologies PowerPoint
PPTX
Funds Management Learning Material for Beg
PPT
FIRE PREVENTION AND CONTROL PLAN- LUS.FM.MQ.OM.UTM.PLN.00014.ppt
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PPTX
Introduction to Information and Communication Technology
innovation process that make everything different.pptx
SASE Traffic Flow - ZTNA Connector-1.pdf
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
Slides PDF The World Game (s) Eco Economic Epochs.pdf
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
tcp ip networks nd ip layering assotred slides
Job_Card_System_Styled_lorem_ipsum_.pptx
Internet___Basics___Styled_ presentation
Introuction about WHO-FIC in ICD-10.pptx
Digital Literacy And Online Safety on internet
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
international classification of diseases ICD-10 review PPT.pptx
Power Point - Lesson 3_2.pptx grad school presentation
introduction about ICD -10 & ICD-11 ppt.pptx
Tenda Login Guide: Access Your Router in 5 Easy Steps
E -tech empowerment technologies PowerPoint
Funds Management Learning Material for Beg
FIRE PREVENTION AND CONTROL PLAN- LUS.FM.MQ.OM.UTM.PLN.00014.ppt
Module 1 - Cyber Law and Ethics 101.pptx
Introduction to Information and Communication Technology

API Platform: A Framework for API-driven Projects