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

PDF
Drupal, GraphQL, Views, View Modes and Gatsby for a US Gov site CMS Philly
Jesus Manuel Olivas
 
PDF
Embracing the modern web using a Headless CMS with GatsbyJS CMS Philly
Jesus Manuel Olivas
 
PDF
JAMstack
Tomasz Bak
 
PDF
Jayway Web Tech Radar 2015
Gustaf Nilsson Kotte
 
PDF
Chiasm
Curran Kelleher
 
PDF
Java Support On Google App Engine
Xebia IT Architects
 
PDF
Introduction to Vaadin Framework
Risto Yrjänä
 
PDF
Bringing JAMStack to the Enterprise
C4Media
 
Drupal, GraphQL, Views, View Modes and Gatsby for a US Gov site CMS Philly
Jesus Manuel Olivas
 
Embracing the modern web using a Headless CMS with GatsbyJS CMS Philly
Jesus Manuel Olivas
 
JAMstack
Tomasz Bak
 
Jayway Web Tech Radar 2015
Gustaf Nilsson Kotte
 
Java Support On Google App Engine
Xebia IT Architects
 
Introduction to Vaadin Framework
Risto Yrjänä
 
Bringing JAMStack to the Enterprise
C4Media
 

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
 
Ad

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

PDF
Building APIs in an easy way using API Platform
Antonio Peric-Mazar
 
PDF
A high profile project with Symfony and API Platform: beIN SPORTS
Smile I.T is open
 
PDF
API Platform 2.1: when Symfony meets ReactJS (Symfony Live 2017)
Les-Tilleuls.coop
 
PDF
API Platform and Symfony: a Framework for API-driven Projects
Les-Tilleuls.coop
 
PPTX
Creating hypermedia APIs in a few minutes using the API Platform framework
Les-Tilleuls.coop
 
PDF
API Platform: Full Stack Framework Resurrection
Les-Tilleuls.coop
 
PDF
Using API platform to build ticketing system (translations, time zones, ...) ...
Antonio Peric-Mazar
 
PDF
Creating a modern web application using Symfony API Platform Atlanta
Jesus Manuel Olivas
 
PDF
REST easy with API Platform
Antonio Peric-Mazar
 
PDF
Creating a modern web application using Symfony API Platform, ReactJS and Red...
Jesus Manuel Olivas
 
PDF
Building APIs in an easy way using API Platform
Antonio Peric-Mazar
 
PDF
High quality ap is with api platform
Nelson Kopliku
 
PPT
Building Single Page Application (SPA) with Symfony2 and AngularJS
Antonio Peric-Mazar
 
PPT
Symfony2 and AngularJS
Antonio Peric-Mazar
 
PPTX
Building modern frontends for joomla
Ashwin Date
 
PDF
Using API Platform to build ticketing system #symfonycon
Antonio Peric-Mazar
 
PDF
Modern Functional Fluent CFML REST by Luis Majano
Ortus Solutions, Corp
 
PDF
Introduction to developing modern web apps
Fabricio Epaminondas
 
PDF
Tek13 - Creating Mobile Apps with PHP and Symfony
Pablo Godel
 
PDF
Past, Present and Future of APIs of Mobile and Web Apps
SmartBear
 
Building APIs in an easy way using API Platform
Antonio Peric-Mazar
 
A high profile project with Symfony and API Platform: beIN SPORTS
Smile I.T is open
 
API Platform 2.1: when Symfony meets ReactJS (Symfony Live 2017)
Les-Tilleuls.coop
 
API Platform and Symfony: a Framework for API-driven Projects
Les-Tilleuls.coop
 
Creating hypermedia APIs in a few minutes using the API Platform framework
Les-Tilleuls.coop
 
API Platform: Full Stack Framework Resurrection
Les-Tilleuls.coop
 
Using API platform to build ticketing system (translations, time zones, ...) ...
Antonio Peric-Mazar
 
Creating a modern web application using Symfony API Platform Atlanta
Jesus Manuel Olivas
 
REST easy with API Platform
Antonio Peric-Mazar
 
Creating a modern web application using Symfony API Platform, ReactJS and Red...
Jesus Manuel Olivas
 
Building APIs in an easy way using API Platform
Antonio Peric-Mazar
 
High quality ap is with api platform
Nelson Kopliku
 
Building Single Page Application (SPA) with Symfony2 and AngularJS
Antonio Peric-Mazar
 
Symfony2 and AngularJS
Antonio Peric-Mazar
 
Building modern frontends for joomla
Ashwin Date
 
Using API Platform to build ticketing system #symfonycon
Antonio Peric-Mazar
 
Modern Functional Fluent CFML REST by Luis Majano
Ortus Solutions, Corp
 
Introduction to developing modern web apps
Fabricio Epaminondas
 
Tek13 - Creating Mobile Apps with PHP and Symfony
Pablo Godel
 
Past, Present and Future of APIs of Mobile and Web Apps
SmartBear
 
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
 

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Doc9.....................................
SofiaCollazos
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Doc9.....................................
SofiaCollazos
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 

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