Strapi CMS
this package provides a full integration with Strapi CMS, enabling comprehensive content management capabilities for your application. The integration supports content management, page management, and content localization, allowing you to create and manage multilingual content with ease.
In this section
- How to set up - Step-by-step guide for setting up the Strapi CMS integration
- Features - Overview of features supported by the Strapi CMS integration
- Supported blocks - Implementation status of all blocks available in the O2S framework
- Content model - Structure and organization of the Strapi content model
- GraphQL integration - Detailed information about GraphQL integration, code generation, and query structure
Installation
First, install the Strapi integration package:
npm install @o2s/integrations.strapi-cms --workspace=@o2s/configs.integrations
Environment variables
Configure the following environment variables in your API Harmonization server:
| name | type | description |
|---|---|---|
| CMS_STRAPI_BASE_URL | string | the base URL pointing to the domain hosting Strapi CMS |
You can obtain this value from your Strapi instance settings - it should be the URL where your Strapi server is running (e.g., http://localhost:1337 for local development).
Content model import
For Strapi we ship a predefined content model and sample data that matches how O2S expects pages, templates and blocks to be structured.
These resources live in a separate companion repository:
The openselfservice-resources repo is intentionally separate from the main openselfservice codebase – it only contains exports and example data for external tools (like Strapi), so that your application repository stays focused on framework code and integrations.
To import the content model into your own Strapi instance:
- Choose the folder that matches your starter (
o2sordxp) in the resources repo. - Follow the README in that folder to import the Strapi export (content types and optional data).
- Start your Strapi instance with the imported model.
For a detailed, step‑by‑step guide (including rationale, repository layout and troubleshooting), see How to set up.
Code generation
After setting up your Strapi instance and configuring the environment variables, you need to generate TypeScript types from your GraphQL schema. Run:
npm run generate
For more details about code generation and GraphQL integration, see the GraphQL integration documentation.