Using Sanity and Gatsby or Next.js in the Learning Management System Space

2 replies
Last updated: Apr 29, 2021
Has anyone built out anything for Sanity in the Learning Management System or Customer/Partner Education space? My org has a Sanity/Gatsby site which is working well for us. We’re now looking at providing professional development content (rich content, though mainly video) with progress tracking via login and some email interaction to help engagement. Something like the experience Google offer with their Intellum-based Skillshop: https://skillshop.exceedlms.com/student/path/61209-fundamentals-training
We could build it out with Sanity (and having the content in Sanity would be a big plus for us) but we’re interested in something more off the shelf for capacity/cost reasons. We’re a non-profit and want broad and free access to our content so we struggle a bit with commercial LMS per-user pricing.

Any suggestions appreciated.
AI Update

I haven't seen extensive community discussion about off-the-shelf LMS integrations with Sanity, but your use case is definitely achievable! Since you're already happy with your Sanity/Gatsby setup and want to keep content in Sanity, here's what I'd consider:

Hybrid Approach: Sanity + Open Source LMS

Given your nonprofit status and need for free/broad access, you might want a headless LMS approach where Sanity manages the content (videos, rich text, course materials) while an open source LMS handles the learning-specific features (progress tracking, authentication, completion certificates).

Open source options worth exploring:

  • Open edX - Powers edX.org, robust video support, good nonprofit community. Can be self-hosted or use their hosted options (some have nonprofit pricing)
  • Moodle - Very mature, MoodleCloud has free tiers for small deployments
  • Canvas LMS - Open source core, excellent UX, self-hostable
  • CourseLit - Newer, headless-friendly, might be easier to integrate with your existing stack

These could consume content from Sanity via API while handling the LMS-specific features you need.

Building with Sanity

If you do build it out in Sanity (which gives you full control and keeps everything unified), you'd need to add:

  1. Authentication - Auth0 has a nonprofit program that might help with costs. Or consider Clerk, Supabase Auth, or NextAuth.js
  2. Progress Tracking - Store user progress in a separate database (Supabase, Firebase, or even Sanity documents with user-specific data)
  3. Email Engagement - Use Sanity Functions to trigger emails via SendGrid/Mailgun when content is published or users hit milestones
  4. Video Delivery - Mux (which has great Sanity integration) or YouTube/Vimeo embeds

Sanity handles the content modeling beautifully - you'd create schemas for courses, lessons, modules, etc. The Sanity LMS use case page shows they understand this space well, with examples like Self-Evident Education delivering interactive video curriculum.

Standards & Interoperability

If you need compatibility with existing learning standards:

  • xAPI (Experience API) - Modern standard for tracking learning experiences. Learning Locker is an open source LRS (Learning Record Store) that can work with this
  • SCORM - Older but still common for course packages. There's community discussion about SCORM with Sanity

My Recommendation

For a nonprofit with capacity constraints, I'd start with Sanity for content + Open edX or Moodle for the LMS features. This gives you:

  • Content authoring in Sanity (which your team already knows)
  • Battle-tested progress tracking, certificates, and learner management
  • Nonprofit-friendly pricing/free options
  • You can embed or link to Sanity-hosted rich content from the LMS

The integration would be relatively straightforward - use Sanity's APIs to pull course content into the LMS, or even just deep-link from the LMS to Gatsby pages for the actual content consumption while the LMS tracks completion.

This avoids reinventing the wheel on the LMS-specific features while keeping your content advantage in Sanity. The Intellum-style experience you linked is definitely achievable this way!

Hey Matt! I’ve seen a few similar projects come through here. I think
user M
shared one a while back, but I could be wrong. Unfortunately, I can’t link to that post since the slack archives only have a month or so of posts.
When considering costs though, it’s important to keep in mind that you would have to use an external service for your authentication (and you would need an Enterprise if you want to implement SSO).
Thanks
user M
, I really appreciate the pointer. egghead seem to be using Next/Sanity which might be a logical step for us if we build it ourselves. We’re OK with some degree of slow-scaling cost (e.g. user auth), it’s the kind of pricing models that some products have that are more focussed on employee training or paid courses that don’t translate so well to free to access content :simple_smile: Thanks again.

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?