👀 See Sanity in action: Watch product demo now →

OCEG Web Site

By Stephane Legay

Membership site with gated content

Search through over 1,500 resources, leveraging Algolia integration
Landing page built using custom blocks defined in Sanity schema
Resource page. Related items recommendations provided by Algolia
12 content types, 1,500 resources
Custom form builder
Landing page builder with 15 custom block types
Gated content properties

About the project

OCEG was running a custom CMS for its membership platform, with SalesForce, Chargify, Learnworlds integrations to provide its members with resources, courses and certifications.

We used Sanity with great success to migrate all of our 1,500 resources. Some interesting features:

- A landing page builder with 15 block types, 100% defined in schema with zero custom code.
- A form builder with a variety of field types specified in Sanity schema.
- Gated content taxonomy with Roles mapped to Products in our CRM.

The site is rendered in 11ty and deployed to Netlify, extremely good performance, Lighthouse score = 90.

For security / gated content access, we added a bit of Netlify magic. Authentication through a Netlify function generates a signed JWT cookie (using SalesForce as user store) containing some user attributes (name, email, ID, roles). Each resource page contains its required roles in HTML comments. A Netlify edge function validates the cookie, looks for the required roles in the page contents using Regex, and validates the user's roles against the required ones. Exceptions get router to the proper flow (log in, sign up, purchase membership etc..).

This allows to have a fast, authenticated & secure site with 0 network access at the edge.

Forms generated with our custom form builder leverage Netlify Forms to store submissions.

Sanity data is kept in sync with Algolia using GROQ webhooks. Algolia provides search and content recommendation capabilities.

All mux videos are signed in Netlify Edge Functions using regex and JWT cookie validation.

Contributor