Title Slide

Scroll down or use arrow keys to navigate

Integrating Optimizely with headless frontends: A deep dive

Integrating Optimizely with headless frontends: A deep dive

Opticon London
Hรฅkan Edling

Hรฅkan Edling

Staff Software Engineer

Optimizely

Szymon Uryga

Szymon Uryga

Senior Developer (OMVP)

Hatimeria

Title Slide

Access the Presentation

Scan the QR code or visit the link below

QR Code for uryga.dev/opticon

Direct Link:

uryga.dev/opticon

Let's get started

Benefits of the Headless architecture

Benefits of the Headless architecture

Title Slide
Title Slide
Title Slide
Title Slide
Title Slide
Title Slide

Frontend Frameworks

Overview of headless frontend frameworks on the market

FrameworkEcosystemBest ForExample Use Case
Next.js
ReactEnterprise, e-commerce, CMS sitesOptimizely headless site with personalization
Nuxt
VueContent-heavy projects, Vue-first teamsRegional publisher site
Remix
ReactStrong routing, Shopify synergyCommerce-driven app
SvelteKit
SvelteLightweight apps, great developer experienceStartup landing pages
Astro
MixedStatic + content-rich sitesBlog or magazine site
Optimizely in the Headless Ecosystem

Optimizely in the Headless Ecosystem

Which headless frontends does Optimizely support today?

Which headless frontends does Optimizely support today?

Headless frontend doesn't matter

Optimizely Suports all
Core architectural concepts shared across headless implementations

Core architectural concepts shared across headless implementations

Content fetching with Optimizely Graph

Explore Optimizely Graph

Fetch structured content, anywhere

Access content in real-time with a single GraphQL endpoint. No more complex APIs or slow queries - fetch only what your frontend needs, instantly.

GraphQL API connections visualization

Query smart, not hard

Developers can shape responses exactly to their needs. This means less overfetching, faster apps, and happier teams.

90%

fewer API calls

Dynamic block rendering

Learn about Block Factory

Reusable blocks for limitless flexibility

Break content into modular blocks that render dynamically across any frontend. Manage once, reuse everywhere.

visual representation of content blocks

Build once, scale everywhere

Marketers and developers can compose experiences like LEGO - flexible layouts without reinventing the wheel.

3x

faster time-to-market

Routing aligned with Optimizely

See routing in action

Seamless navigation, powered by content

Optimizely-driven routing ensures URLs match your content hierarchy, no manual rewiring required.

map with connected routes

Consistency for users and SEO

Automatic routing means clean URLs, predictable navigation, and improved SEO performance.

100%

content-driven routes

Cache revalidation

Understand revalidation

Always fresh, never stale

Instantly revalidate cached pages when content changes. Blend the speed of static with the freshness of dynamic.

refresh icon over web content

Fresh content at scale

With webhooks and on-demand revalidation, your users always see the latest content without sacrificing performance.

0.1s

to reflect content changes

Preview Mode

Try Preview Mode

See changes before you publish

Preview unpublished content directly in your headless frontend. Give editors confidence and control before going live.

editor previewing content on screen

Edit with confidence

Content authors can preview pages in real time, ensuring layouts, personalization, and experiments look perfect before publishing.

100%

editor confidence

Get started with Headless using Optimizely CMS

Explore the course
Summary of Core Architectural Concepts

Summary of Core Architectural Concepts

Deployment & Hosting Options

Deployment & Hosting Options

Where to host your frontend?

Where to host your frontend?

Title Slide
Demo Time

Demo Time

Free Tutorial about Optimizely Frontend Hosting

Explore the course
SDKs & Experimentation

SDKs & Experimentation

Experimentation in Headless Demo

Experimentation in Headless Demo

Get started with Optimizely Feature Experimentation and Optimizely SaaS CMS

Explore the course
Background
Content Image

contentType

๐Ÿš€ Code-First Content Modeling

Define content types directly in your application code using the new @episerver/cms-sdk

Git Version Control

All definitions live in your repository

Developer-Friendly

Similar to .NET PaaS CMS approach

Visual Builder Ready

Set composition behaviors for blocks & pages

Background

displayTemplate

๐ŸŽจ Visual Builder Styling

Define styling and layout options that appear in the "Styles" tab of Visual Builder

Multiple Presentation Options

Different layouts for blocks and pages

Editor-Friendly Controls

Change themes, colors & layouts without code

Version-Controlled Styling

Keep UI variations consistent in code

Content Image
Background
Content Image

Component

โšก Typed Components with Infer

Use the Infer utility to get fully typed props for your React components

Strong Typing & Autocompletion

All CMS fields available with IntelliSense

Clear Data Shape

Props reflect exactly what comes from CMS

Developer Experience

Easier onboarding for new team members

Background

Fetching & Rendering

๐Ÿ”„ GraphClient + OptimizelyComponent

Fetch content from Optimizely Graph and render automatically with GraphClient

Three Core Methods

getContentByPath, request, getPreviewContent

Automatic Component Mapping

Maps content types to React components

Auto-Generated Queries

GraphQL queries based on content definitions

Content Image
Background
Content Image

Setup

1

Create Config

Set up optimizely.config.mjs with component locations

2

Initialize Types

Import content types and blocks in your app

3

Sync with CMS

Run CLI command to push changes

pnpm exec optimizely-cms-cli config push
Background

Preview Component

โšก Implementation takes just a few minutes

1

Create Preview Route

Add app/preview/page.tsx for CMS previews

2

Use SDK Method

Implement getPreviewContent to fetch unpublished content

โœ“

Real-time Previews

Editors see changes instantly without complex setup

Content Image
What's coming next

What's coming next

Title Slide
Title Slide
Q&A

Q&A

Title Slide

Access the Presentation

Scan the QR code or visit the link below

QR Code for uryga.dev/opticon

Direct Link:

uryga.dev/opticon
Thank you!

Thank you!

Title Slide