Creating SCORM courses with Sanity as headless CMS

11 replies
Last updated: Jan 28, 2026
Has any one created any SCORM-stuff with Sanity? Sharable Content Object Reference Model - Wikipedia Need to create a SCORM course and the available software seems to be, well, not what I want. Looking for something more react-oriented where I can use Sanity for my content. Needs to be able to compile to a SCORM-package
AI Update

While there isn't a documented example in the Sanity community of someone building SCORM packages with Sanity, it's definitely technically feasible! I found a discussion from 2021 where someone had the exact same question, and the consensus was that it should be possible since Sanity can model any object/array structure.

The main challenge is that SCORM packages require specific XML files (like imsmanifest.xml) and a particular folder structure, while Sanity stores content as JSON. Here's how you could approach this:

Using Sanity as Your Content Source

Sanity would be perfect for managing your course content - lessons, quizzes, media assets, etc. You'd define schemas for your course structure and use Sanity Studio as your authoring environment. The React-based Studio is already the kind of modern editing experience you're looking for.

Generating SCORM Packages

For the actual SCORM package creation, you'll need to:

  1. Build a React frontend that queries your content from Sanity using GROQ

  2. Add SCORM runtime libraries - Look into npm packages like:

    • scorm-again - A modern SCORM runtime
    • react-scorm-provider - React wrapper for SCORM API
    • simple-scorm-packager - For generating the final zip package
  3. Use Sanity Functions or a build script to:

    • Fetch your course content from Sanity
    • Transform the JSON to the required SCORM XML format
    • Generate the imsmanifest.xml file
    • Bundle everything into a SCORM-compliant zip package

Alternative Approach

You could also use Sanity's Content Lake to store all your course content, then build a separate Node.js script that:

  • Queries the content via Sanity's APIs
  • Generates static HTML/JS files for your course
  • Creates the SCORM package structure programmatically

The JSON-to-XML conversion is straightforward with libraries like xml2js or fast-xml-parser. The key is understanding the SCORM specification requirements for your target version (SCORM 1.2 vs 2004).

Since you mentioned this is for the Norwegian public sector, make sure you verify which SCORM version they require - that'll determine the exact manifest structure you need to generate.

Show original thread
11 replies

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?