Building a Headless WordPress App with REST API

Building a Headless WordPress App with REST API
Building a Headless WordPress App with REST API
English | MP4 | AVC 1280×720 | AAC 48KHz 2ch | 2h 08m | 384 MB

Headless applications use content management systems like WordPress as data resources and present the data independently. In this course, Morten Rand-Henriksen shows how to build these data-driven front-end applications on top of the WordPress REST API. Follow along with the evolution of the course project, Task Book, a standalone app using WordPress REST API to receive and send data using authenticated requests over OAuth2, as Morten explains key concepts and techniques. Find out how to build a basic plugin to add new content types, roles, capabilities, and fields to WordPress and the REST API; set up authentication with OAuth2; and configure the headless app logic with JavaScript. Plus, find out how to display task data and generate simple charts using the Chart.js library.

Topics include:

  • Previewing the content model and user flow
  • Extending WordPress and the REST API with a custom plugin
  • Creating new meta boxes and fields
  • Configuring OAUth2
  • Sending authentication requests to the REST API
  • Requesting login tokens
  • Setting up the authorization and logout loops
  • Requesting and displaying tasks
  • Displaying a chart of task data
Table of Contents

1 Building a headless app with the WP REST API
2 Prerequisites for this course
3 Introduction to the Task Book app
4 Content model for the application
5 User flow for the application
6 Create a functionality plugin
7 Add custom post type for tasks
8 Create new roles
9 Create new capabilities
10 Test the REST response
11 Create a status field
12 Set status field automatically
13 Add CMB2 for custom meta boxes
14 Create a custom meta box and fields
15 Display REST fields using CMB2
16 Install and configure the OAuth2 plugin
17 Send authenticated requests to the REST API
18 Restrict REST access based on roles
19 Review of user flow
20 JavaScript modules and structure
21 Login by requesting a token
22 Set up the authorization loop
23 Set up the logout loop
24 Request and display latest 10 tasks
25 Request and display single tasks
26 Send POST request on new update task
27 Display a chart based on task data
28 Further information