SlideShare a Scribd company logo
by Jesus Manuel Olivas / octahedroid
Building a modern application using
Symfony API Platform and GatsbyJS
Jesus Manuel Olivas
jmolivas.com
@jmolivas
Agenda
Symfony API Platform
GraphQL
JAMstack
GatsbyJS
Web Development 101
Web Development 101
Traditional monolithic stack
Visitor Server
Database
Server render (traditional)
Server Client
SPA (client side)
Server Client
The Modern Stack (JAMstack)
Visitor CDN
Building a modern application using  Symfony API Platform and GatsbyJS PHP QRO
JAMstack (pre-render markup)
Server ClientBuild Server
The API Platform Framework
REST and GraphQL
framework to build modern
API-driven projects
The API Platform Framework
https://github.com/api-platform/api-platform
The server skeleton includes the
Symfony microframework and
the Doctrine ORM. 
The API Platform Components
Build a fully-featured
hypermedia or GraphQL API
in minutes.
The API Components
api/config/packages/api_platform.yaml
API formats
formats:
jsonld: [‘application/ld+json'] # first one is the default
json: ['application/json']
jsonhal: ['application/hal+json']
xml: ['application/xml', 'text/xml']
yaml: ['application/x-yaml']
csv: ['text/csv']
html: ['text/html']
console make:entity
Add New Entity
use DoctrineORMMapping as ORM;
use RamseyUuidUuid;
use GedmoTimestampableTraitsTimestampableEntity;
class EntityBase
{
use TimestampableEntity;
/**
* @var string
* @ORMColumn(name="uuid", type="string")
!*/
protected $uuid;
public function getUuid()
{
return $this!->uuid;
}
YourEntity extends EntityBase 1/2
/**
* @GedmoTimestampable(on="create")
* @ORMColumn(type="datetime", nullable=true)
!*/
protected $createdAt;
/**
* @GedmoTimestampable(on="update")
* @ORMColumn(type="datetime", nullable=true)
!*/
protected $updatedAt;
public function !__construct()
{
$this!->uuid = Uuid!::uuid4()!->toString();
$this!->createdAt = new DateTime();
$this!->updatedAt = $this!->createdAt;
}
}
YourEntity extends EntityBase 2/2
console make:migration
console doctrine:migrations:migrate
Sync entities with DB
GraphQL is an open-source
data query and manipulation
language for APIs.
GraphQL
To enable GraphQL and GraphiQL interface
in your API, simply require
“webonyx/graphql-php”
package using composer
GraphQL
GraphQL demo
User Authentication
Allowing users to authenticate and identify
themselves, so that some or all of the page can
be personalized for them.
Examples include displaying a user's name and
avatar, or showing authorized users private
content.
Login using JWT
FOSUserBundle || Doctrine User Provider 
LexikJWTAuthenticationBundle
JWTRefreshTokenBundle
User Authentication
Use Doctrine ORM Filters
Register EventListeners for JWT & Auth
Use Serialization Groups (encode/decode)
Create custom GraphQL Queries or Mutations
Tips
GatsbyJS
Gatsby is a free and open source
framework based on React that
helps developers build blazing
fast  websites and apps
package.json
"dependencies": {
"gatsby": "^2.17.11",
"gatsby-source-graphql": "^2.1.28",
“react": "^16.11.0",
"react-dom": "^16.11.0"
},
gatsby-config.js
{
resolve: "gatsby-source-graphql",
options: {
typeName: "Symfony",
fieldName: "symfony",
url: `${process.env.SYMFONY_URL}/graphql`,
},
},
GatsbyJS
Gatsby demo
Centralize data with GraphQL
Easier to explore
Single source of truth
More scalable & team-friendly
Consistent, shareable dev workflow
Go Static for everything else
Blazing fast performance
Simpler deployment flow
Immutable deployments
Reduced DevOps overhead
Resources
https://api-platform.com/docs
https://symfonycasts.com/tracks/rest
https://www.gatsbyjs.org/docs/
Thank you.
Any Questions?

More Related Content

What's hot (20)

PPTX
New Chargeback - Sergio Ocon - ManageIQ Design Summit 2016
ManageIQ
 
PDF
JAMstack WTJ
zonathen
 
PDF
Google App Engine Introduction
Simon Su
 
PDF
Kubernetes - training micro-dragons without getting burnt
Amir Moghimi
 
PDF
WebAPI::DBIC - Automated RESTful API's
Michael Francis
 
PDF
Camunda GraphQL Extension (09/2017 Berlin)
Harald J. Loydl
 
PDF
What's new in Silverstripe 4? (StripeCon APAC 2016)
Ingo Schommer
 
PDF
Blazing fast sites using Blaze, Hybrid CMS NYC
Jesus Manuel Olivas
 
PDF
Gatsby (Code.Talks) 2019
Stefan Adolf
 
PPTX
JAMStack
Ivan Brygar
 
PDF
Simpler Web Architectures Now! (At The Frontend 2016)
Gustaf Nilsson Kotte
 
PPTX
Mvc framework
Dhurham Fahem
 
PPTX
Why XAF and XPO?
Jose Javier Columbie
 
PPTX
How to ease the learning curve
Jose Javier Columbie
 
PPTX
VueJs Workshop
Unfold UI
 
PDF
A Simpler Web App Architecture (jDays 2016)
Gustaf Nilsson Kotte
 
PPTX
Magento Cloud - Introduction
Oleg Posyniak
 
PPTX
SoCal Code Camp 2011 - ASP.NET MVC 4
Jon Galloway
 
PDF
How To Write Dynamic Migrations - Mohit Aghera
DrupalMumbai
 
PDF
Veda online
IEA-ETSAP
 
New Chargeback - Sergio Ocon - ManageIQ Design Summit 2016
ManageIQ
 
JAMstack WTJ
zonathen
 
Google App Engine Introduction
Simon Su
 
Kubernetes - training micro-dragons without getting burnt
Amir Moghimi
 
WebAPI::DBIC - Automated RESTful API's
Michael Francis
 
Camunda GraphQL Extension (09/2017 Berlin)
Harald J. Loydl
 
What's new in Silverstripe 4? (StripeCon APAC 2016)
Ingo Schommer
 
Blazing fast sites using Blaze, Hybrid CMS NYC
Jesus Manuel Olivas
 
Gatsby (Code.Talks) 2019
Stefan Adolf
 
JAMStack
Ivan Brygar
 
Simpler Web Architectures Now! (At The Frontend 2016)
Gustaf Nilsson Kotte
 
Mvc framework
Dhurham Fahem
 
Why XAF and XPO?
Jose Javier Columbie
 
How to ease the learning curve
Jose Javier Columbie
 
VueJs Workshop
Unfold UI
 
A Simpler Web App Architecture (jDays 2016)
Gustaf Nilsson Kotte
 
Magento Cloud - Introduction
Oleg Posyniak
 
SoCal Code Camp 2011 - ASP.NET MVC 4
Jon Galloway
 
How To Write Dynamic Migrations - Mohit Aghera
DrupalMumbai
 
Veda online
IEA-ETSAP
 

Similar to Building a modern application using Symfony API Platform and GatsbyJS PHP QRO (20)

PDF
Creating a modern web application using Symfony API Platform Atlanta
Jesus Manuel Olivas
 
PDF
Choisir entre une API RPC, SOAP, REST, GraphQL? 
Et si le problème était ai...
François-Guillaume Ribreau
 
PPTX
Integrate any Angular Project into WebSphere Portal
Himanshu Mendiratta
 
PDF
Creating a modern web application using Symfony API Platform, ReactJS and Red...
Jesus Manuel Olivas
 
PPTX
Alfresco Development Framework Basic
Mario Romano
 
PDF
Serverless Beyond Functions - CTO Club Made in JLM
Boaz Ziniman
 
PDF
API Platform 2.1: when Symfony meets ReactJS (Symfony Live 2017)
Les-Tilleuls.coop
 
PDF
High quality ap is with api platform
Nelson Kopliku
 
PDF
Your API on Steroids - Retrofitting GraphQL by Code, Cloud Native or Serverless
QAware GmbH
 
PDF
Graphql usage
Valentin Buryakov
 
PDF
Going FaaSter, Functions as a Service at Netflix
Yunong Xiao
 
PDF
Devops on serverless
Sébastien ☁ Stormacq
 
PDF
Python Ireland Nov 2009 Talk - Appengine
Python Ireland
 
PPTX
StrongLoop Overview
Shubhra Kar
 
PDF
Using eZ Platform in an API Era
eZ Systems
 
PPT
Php Asp Net Interoperability Rc Jao
jedt
 
PDF
Aws Lambda in Swift - NSLondon - 3rd December 2020
Andrea Scuderi
 
PPTX
The next step from Microsoft - Vnext (Srdjan Poznic)
Geekstone
 
PPTX
Serverless Developer Experience I AWS Dev Day 2018
AWS Germany
 
PPT
Mobile Interface to CMS Based On HTML5 and Drupal: A Case Study
Hima Javvadi
 
Creating a modern web application using Symfony API Platform Atlanta
Jesus Manuel Olivas
 
Choisir entre une API RPC, SOAP, REST, GraphQL? 
Et si le problème était ai...
François-Guillaume Ribreau
 
Integrate any Angular Project into WebSphere Portal
Himanshu Mendiratta
 
Creating a modern web application using Symfony API Platform, ReactJS and Red...
Jesus Manuel Olivas
 
Alfresco Development Framework Basic
Mario Romano
 
Serverless Beyond Functions - CTO Club Made in JLM
Boaz Ziniman
 
API Platform 2.1: when Symfony meets ReactJS (Symfony Live 2017)
Les-Tilleuls.coop
 
High quality ap is with api platform
Nelson Kopliku
 
Your API on Steroids - Retrofitting GraphQL by Code, Cloud Native or Serverless
QAware GmbH
 
Graphql usage
Valentin Buryakov
 
Going FaaSter, Functions as a Service at Netflix
Yunong Xiao
 
Devops on serverless
Sébastien ☁ Stormacq
 
Python Ireland Nov 2009 Talk - Appengine
Python Ireland
 
StrongLoop Overview
Shubhra Kar
 
Using eZ Platform in an API Era
eZ Systems
 
Php Asp Net Interoperability Rc Jao
jedt
 
Aws Lambda in Swift - NSLondon - 3rd December 2020
Andrea Scuderi
 
The next step from Microsoft - Vnext (Srdjan Poznic)
Geekstone
 
Serverless Developer Experience I AWS Dev Day 2018
AWS Germany
 
Mobile Interface to CMS Based On HTML5 and Drupal: A Case Study
Hima Javvadi
 
Ad

More from Jesus Manuel Olivas (19)

PDF
Remix & GraphQL: A match made in heaven with type-safety DX
Jesus Manuel Olivas
 
PDF
Drupal 10 Party GraphQL
Jesus Manuel Olivas
 
PDF
How to use Drupal to create editorial experiences your content creators will...
Jesus Manuel Olivas
 
PDF
Beyond Static: Building a Dynamic Application with Gatsby
Jesus Manuel Olivas
 
PDF
Embracing the modern web using a Headless CMS with GatsbyJS Stanford
Jesus Manuel Olivas
 
PDF
Building a dynamic application with GatsbyJS-Tec-Mexicali
Jesus Manuel Olivas
 
PDF
Building a modern web application in the cloud partnercon
Jesus Manuel Olivas
 
PDF
Embracing the modern web using Drupal as a Headless CMS with Gatsby BADCamp
Jesus Manuel Olivas
 
PDF
Embracing the modern web using Drupal as Headless CMS with GatsbyJS NYC
Jesus Manuel Olivas
 
PDF
Writing a slack chatbot seattle
Jesus Manuel Olivas
 
PDF
Building a Modern Web Application in the Cloud TecNerd
Jesus Manuel Olivas
 
PDF
How to keep Drupal relevant in the Git-based and API-driven CMS era Florida
Jesus Manuel Olivas
 
PDF
How to keep Drupal relevant in the Git-based and API-driven CMS era DrupalCampNJ
Jesus Manuel Olivas
 
PDF
Tools and Projects Dec 2018 Edition
Jesus Manuel Olivas
 
PDF
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCamp
Jesus Manuel Olivas
 
PDF
Battle of the CMS DrupalCampLA
Jesus Manuel Olivas
 
PDF
Writing a slack chatbot DrupalCampLA
Jesus Manuel Olivas
 
PDF
Improving your Drupal 8 development workflow DrupalCampLA
Jesus Manuel Olivas
 
PDF
Writing a slack chatbot mxlos
Jesus Manuel Olivas
 
Remix & GraphQL: A match made in heaven with type-safety DX
Jesus Manuel Olivas
 
Drupal 10 Party GraphQL
Jesus Manuel Olivas
 
How to use Drupal to create editorial experiences your content creators will...
Jesus Manuel Olivas
 
Beyond Static: Building a Dynamic Application with Gatsby
Jesus Manuel Olivas
 
Embracing the modern web using a Headless CMS with GatsbyJS Stanford
Jesus Manuel Olivas
 
Building a dynamic application with GatsbyJS-Tec-Mexicali
Jesus Manuel Olivas
 
Building a modern web application in the cloud partnercon
Jesus Manuel Olivas
 
Embracing the modern web using Drupal as a Headless CMS with Gatsby BADCamp
Jesus Manuel Olivas
 
Embracing the modern web using Drupal as Headless CMS with GatsbyJS NYC
Jesus Manuel Olivas
 
Writing a slack chatbot seattle
Jesus Manuel Olivas
 
Building a Modern Web Application in the Cloud TecNerd
Jesus Manuel Olivas
 
How to keep Drupal relevant in the Git-based and API-driven CMS era Florida
Jesus Manuel Olivas
 
How to keep Drupal relevant in the Git-based and API-driven CMS era DrupalCampNJ
Jesus Manuel Olivas
 
Tools and Projects Dec 2018 Edition
Jesus Manuel Olivas
 
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCamp
Jesus Manuel Olivas
 
Battle of the CMS DrupalCampLA
Jesus Manuel Olivas
 
Writing a slack chatbot DrupalCampLA
Jesus Manuel Olivas
 
Improving your Drupal 8 development workflow DrupalCampLA
Jesus Manuel Olivas
 
Writing a slack chatbot mxlos
Jesus Manuel Olivas
 
Ad

Recently uploaded (20)

PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
Digital Circuits, important subject in CS
contactparinay1
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 

Building a modern application using Symfony API Platform and GatsbyJS PHP QRO