This is a project-based course. The project is an app to track stress levels before and after the completion of a task. Get an overview before you get started.
- [Instructor] To showcase the potential and opportunities that are available when we start working with a standalone application powered by the WordPress REST API, we're going to build a small project together, a simple standalone application that helps people understand and put into perspective their anxieties and stresses around tasks and projects. I've called it Task Book, and within this project, you'll find many of the most common things people want to do with the WordPress REST API. Here's how Task Book works. The user opens the app, creates a new task, giving it a name and a short description, and then writes down what their predictions are for that task or project.
They're also asked what their stress level is coming into the task on a scale from very stressed to very relaxed. When the task is completed, the user returns to the task to write down what actually happened and set a new stress level indicating how they felt during the task itself. Once the user starts logging tasks, they can view a simple chart that shows the difference between pre- and post-task stress levels and get an idea of whether their anxiety going into a task is in alignment with the actual experience of performing that task.
They can also return to individual tasks to see their own predictions and actual outcomes on a task by task basis. To achieve all this, we need to build two discrete components, a WordPress plugin and a standalone web app. The WordPress plugin registers a new custom post type called Task, and that custom post type has an array of new custom content fields. It also registers a new user role, Task Logger, and restricts their access to only their own tasks and nothing else.
On the other end, the app provides the user experience for the end user. It has a login view, a list view for all tasks, a new tasks view, an update or view tasks view, and a review view that visualizes stress levels across tasks. In the next chapter, we'll start by setting up the plugin and extending WordPress to collect the necessary data, and then move onto the standalone app and get everything working properly. But before we get that far, let's plan out exactly how the plugin and the app should work.
- Planning the application
- Extending WordPress with a plugin
- Setting up the standalone application
- Configuring OAuth 2 in WordPress
- Building the task list view
- Building the new task view
- Creating a new task via the REST API
- Displaying conditional content
- Visualizing data using Graph.js