Skip to main content

What is the Server Side SDK?

The Reelevant Server Side SDK (@rlvt/web-sdk) lets you fetch personalised content on the server — during page render — so it arrives in the initial HTML payload. Visitors see the right content immediately, search engines index it, and there is no visible layout shift.

Zero CLS

Content is embedded in the first HTML response. No client-side fetch, no flash of generic content.

SEO-Visible

Personalised HTML is in the page source. Search engines and social previews see the real content.

Framework-Native

First-class adapters for Next.js, Nuxt, Remix, and SvelteKit — or use the core SDK with any Node.js server.

Edge-Ready

Built on the Web Fetch API. Works in Node.js 18+, Cloudflare Workers, Vercel Edge Functions, and Deno.

How it works

1

Install the SDK

Add the @rlvt/web-sdk package to your project.
2

Create a client

Initialise a ReelevantClient — no configuration is required (the SDK uses the production runner by default).
3

Call the runner

In your server route or component, call client.run() with the workflow ID and entrypoint. The SDK calls the Reelevant runner and returns typed content (HTML, JSON, or image).
4

Render the content

Inject the returned content into your page template. The SDK marks output with data-rlvt-ssr so the existing client-side tracker knows to skip those zones.
5

Track clicks

After displaying content, always set up click tracking — either use redirectionUrl as an <a href> or call result.trackClick() server-side. This ensures attribution data is captured for every interaction.

Choose your integration

Next.js

React Server Components, App Router middleware, and the ReelevantZone component.

Nuxt

H3 event helpers, server middleware, and the useReelevant composable.

Remix

Loader helpers, cookie management, and request context extraction.

SvelteKit

Server load functions, hooks, and event context helpers.

Core SDK (any Node.js server)

Use the core SDK directly with Express, Fastify, Hono, or any server runtime.