M6.4 - Templating 3: Headless and SPA Development

”In this course, you will learn how to build headless solutions with Magnolia and integrate them with Single Page Applications. The focus is on delivering structured content through REST endpoints and consuming it in external frontends.

You will explore headless architecture concepts, content modeling for APIs, delivery endpoint configuration, and typical SPA integration patterns. By the end, you will understand how Magnolia fits into a headless and SPA-based architecture and how to use it as a flexible content backend.” 

Total time: ~1 day

Prerequisites

”A Magnolia project created using the Magnolia CLI jumpstart is required, as introduced in M6.4 – Content Types and Content Apps. Familiarity with content types, content apps, and Delivery REST endpoints is strongly recommended, as headless and SPA scenarios typically consume content exposed through these mechanisms.

Additionally, it is strongly recommended to have completed M6.4 – Templating 1: FreeMarker and Templating Fundamentals. While this course does not focus on templating, understanding Magnolia’s page, area, and component concepts provides an important foundation for working effectively with headless delivery and SPA integration.”

Chapters

No need to watch in order — jump straight to what aligns with your goals.

01
Getting Started with The Headless Development
Start
02
Setting up the Environment
Watch
03
Magnolia Headless SPA Overview
Watch
04
Magnolia Content Type
Watch
05
Exercise: Define an 'event' content type
Watch
06
Magnolia Content App
Watch
07
Exercise: Create an Events Content App and Create Event Items
Watch
08
Delivery Endpoint API
Watch
09
Delivery Endpoint Configuration
Watch
10
Exercise: Walkthrough the Delivery Endpoint for Pages
Watch
11
Exercise: Create a New Delivery Endpoint for Events
Watch
12
Delivery: Resolving the References
Watch
13
Exercise: Extends Events Endpoint with Images Resolver
Watch
14
Delivery: Localized Content
Watch
15
Exercise: Fetch Localized Content
Watch
16
Delivery: Methods
Watch
17
Exercise: Extends the Events Endpoint and Practice using Different Methods
Watch
18
Headless: GraphQL API
Watch
19
Headless: Security Configuration
Watch
20
Exercise: Allow Anonymous Access to Events Endpoint
Watch
21
Headless: CORS
Watch
22
Exercise: Check CORS on Your Magnolia Instance
Watch
23
SPA in Light Development
Watch
24
Page Definition
Watch
25
LD: Component Definition
Watch
26
LD: Dialog
Watch
27
Magnolia Front-end Helpers for SPA
Watch
28
SPA Magnolia Template
Watch
29
Exercise: Initial Setup & Start the SPA App
Watch
30
The Overall Architecture of Magnolia Headless
Watch
31
SPA Page
Watch
32
Exercise: Create a new Listing Page Template
Watch
33
SPA Component
Watch
34
Exercise: Add a Component into the Existing Page
Watch
35
Exercise: Create a new 'eventsListing' Component
Watch
36
SPA Multiple Languages
Watch
37
Exercise: Make the 'eventsList' Internalizable
Watch
38
SPA Magnolia Templates Extra
Watch
39
Exercise: Alter the Editable Area Behaviour
Watch
40
Extra: Webhooks
Watch
41
Extra: Debugging No-Green-Bars Issues
Watch
42
Congratulations!
Watch

About the teacher

Tu Bo Xuan
Senior Solution Architect