Getting Started Guide (Frontend)

Last updated on
2 March 2023

This documentation needs work. See "Help improve this page" in the sidebar.

Who is this guide for?

Developers who are consuming data from Drupal’s JSON:API.

What will they learn?

They will learn how to retrieve data from Drupal for their application.

Goal

Create a decoupled frontend application that demonstrates best practices for consuming data from Drupal JSON:API.

Questions the guide should answer

  1. How do I use JSON:API? - https://www.drupal.org/docs/core-modules-and-themes/core-modules/jsonapi...
    1. Error handling
  2. Are there any existing JS libraries I should use as a starting point?
  3. Understanding the Drupal data model
  4. How can I find documentation for a specific site’s JSON:API content architecture
  5. How can I preview data from a specific site’s JSON:API?

Examples:

Outline

  1. Concept: JSON:API
  2. Scaffold the application using a framework of choice. E.g. `create-react-app`
  3. Existing JS libraries to use as a starting point
  4. Task: Create a list of pages
  5. Task: Display an individual page - hard code node id?
  6. Task: Create a menu based on Drupal API data
  7. Task: Routing. The user landed at a URL because they followed a link in the menu, display that page for them.
  8. (phase 2?) Allow a user to register
  9. (phase 2?) Make authenticated requests to Drupal’s API
  10. Allow a user to create a comment form that submits to Drupal
  11. Task: Deploy your application

Help improve this page

Page status: Needs work

You can: