The open-source Sitecore Marketplace SDK lets JavaScript/TypeScript developers build apps that extend and customize Sitecore products.
This mono-repository manages the following Marketplace SDK packages:
core
– an internal package that sets up secure communication between a Marketplace application (the client) and Sitecore (the host), using the web browser's PostMessage API. For more information, refer to the package README.client
– required for all Marketplace applications. This package provides secure, bidirectional communication between the Marketplace app and Sitecore. It lets you make queries and perform mutations. Queries support one-off data requests and subscriptions for live updates. Mutations trigger state changes or HTTP requests in Sitecore. For more information, refer to the package README.xmc
– extends the Client SDK and provides type-safe interfaces for interacting with Sitecore XM Cloud APIs. For more information, refer to the package README.
The packages expose uniform, type-safe, and developer-friendly APIs to speed up your Marketplace app development work.
To use the Marketplace SDK in your app, start by installing the client
package, which is required for all Marketplace apps:
npm install @sitecore-marketplace-sdk/client
If your app needs to interact with XM Cloud APIs, you also need to install the xmc
package:
npm install @sitecore-marketplace-sdk/xmc
Note
For Intellisense to work correctly with the SDK packages, make sure all peer dependencies are installed and their versions are compatible. Issues with peer dependencies are logged in your terminal.
Then, refer to the READMEs of the installed packages and the reference documentation in the /docs
folder.
This section describes how to work with the monorepo so you can contribute to the SDK development.
The repository is structured as follows:
/root
├── package.json // Root configuration, workspaces, and monorepo scripts
├── lerna.json // Lerna configuration for multi-package management
├── packages
│ ├── core // Core SDK (communication layer)
│ ├── client // Client SDK (client application integration)
│ └── xmc // XMC module (integration with Sitecore XM Cloud APIs)
└── docs // Reference documentation and project guides
- Node.js 16 or later. Check your installed version by using the
node --version
command. - pnpm 10 or later. Check your installed version by using the
pnpm --version
command.
Install dependencies from the root:
pnpm install
This installs all dependencies across the packages and sets up the workspaces.
Here are the main monorepo commands defined in the root package.json
:
-
Build all packages
Build every package (for example, transpiling TypeScript):pnpm build
-
Clean all packages
Remove build artifacts (such as thedist
directories):pnpm clean
-
Lint all packages
Run ESLint checks across all packages:pnpm lint
-
Run all tests
Execute test suites for each package:pnpm test:all
-
Generate Client SDK types - Under development
Automatically generate static TypeScript types for the Client SDK based on the defined schema:pnpm generate:client
Each package is inside the packages/
directory. For example, to work with the Core SDK:
- Navigate into the package folder:
cd packages/core
- Use package-specific scripts (e.g.,
build
,lint
,test
) as defined in its ownpackage.json
.
The Sitecore Marketplace SDK is licensed under the Apache 2.0 License. Refer to the LICENSE file in the repository root.
The Sitecore Marketplace SDK is actively maintained.