Create a Content SDK app locally

When you want to create a Content SDK app locally before connecting it to your SitecoreAI instance, the recommended approach is to use the official XM Cloud starter repository. The repository contains a starter application and multiple examples following the SitecoreAI project structure.

XM Cloud is now SitecoreAI

Some code examples, images, and UI labels may still use XM Cloud while engineering assets are being updated.

Use the new starter repository

Content SDK uses a new starter repository containing 2 starter applications and multiple examples.

To create a Content SDK app from the xmcloud-starter-js repository:

  1. Clone the starter repository using the following command:

    RequestResponse
    git clone https://github.com/Sitecore/xmcloud-starter-js.git
  2. Navigate to the project directory (for example, kit-nextjs-skate-park):

    RequestResponse
    cd xmcloud-starter-js/examples/kit-nextjs-skate-park
    Note

    We're using the Skate Park example in the starter repository as it contains a few components out-of-the-box. For a real project, you'll most likely start from an empty project like examples/basic-nextjs (for Next.js projects) or examples/basic-spa (for Angular projects).

  3. Run the following command to install the dependencies:

    RequestResponse
    npm install

Your app is ready to be connected to a SitecoreAI instance. See Connect your Content SDK app to SitecoreAI for more information.

Note

To use an app with the Deploy app as an editing host, you must update the renderingHosts section of the xmcloud.build.json file.

The starter repository is already configured for use with the Deploy app. The xmcloud.build.json file defines the rendering hosts configuration. If you modify app locations or names, ensure you update the corresponding entries in this configuration file.

XM Cloud is now SitecoreAI

Some code examples, images, and UI labels may still use XM Cloud while engineering assets are being updated.

Use the Content SDK CLI

If you prefer to create an empty Content SDK app with minimal Sitecore footprint, you can use the Content SDK CLI:

RequestResponse
npx create-content-sdk-app@latest nextjs

Using the CLI, you can create a head application that builds on the starter template allowing you to tailor the app to your own needs while still benefiting from the starter’s structure. You must then add this app to an existing repository.

The CLI can also be used to create a fully decoupled head that lives in a dedicated repository, separate from the CM (Content Management) authoring and Docker setup. This is currently a beta feature in the Deploy app.

Do you have some feedback for us?

If you have suggestions for improving this article,