> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://contentful.com/developers/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://contentful.com/developers/docs/_mcp/server.

# Libraries

> Speed up the development of apps using our libraries | Node.js apps toolkit | DAM app base | E-commerce app base

Our helper libraries support you to quickly build apps by solving common use cases.

## Node.js Apps Toolkit

The `node-apps-toolkit` is a growing collection of helpers and utilities for building apps for Contentful with Node.js. It helps you reduce friction when building more complex apps with the app framework. The [code](https://github.com/contentful/node-apps-toolkit) is open source and hosted on Github.
If you want to see the `node-apps-toolkit` in action, please check out our guide on [using app identities and events](/extensibility/app-framework/app-identities-and-events) and [verifying requests](/extensibility/app-framework/request-verification).

You can find the full API documentation for the `node-apps-toolkit` [here](https://contentful.github.io/node-apps-toolkit/).

## DAM app base

`@contentful/dam-app-base` is a library that helps you to quickly build an app to integrate your DAM (Digital Asset Management) system of choice with Contentful. This library provides the core functionality required for a DAM integration which means you only need to implement functionality for your specific service.

This library creates an app that can be used in the [entry field location](/extensibility/app-framework/locations#entry-field) to select assets from your DAM service. The library also provides a [configuration screen](/extensibility/app-framework/locations#app-configuration) for easy customization.

### Installation

To install, run

```
npm install @contentful/dam-app-base
```

### Usage

```javascript
import { setup } from '@contentful/dam-app-base';

setup({
  cta: 'Select assets',
  name: 'My DAM App',
  logo: 'https://example.com/logo.svg',
  color: '#d7f0fa',
  description: 'My example DAM App',
  parameterDefinitions: [
    {
      id: 'folder',
      type: 'Symbol',
      name: 'Folder',
      description: 'Preselected folder when selecting assets.',
      required: true,
    },
  ],
  validateParameters: () => null,
  makeThumbnail: (asset) => asset.thumbnailUrl,
  renderDialog: async (sdk) => {
    const config = sdk.parameters.invocation;

    const container = document.createElement('div');
    container.innerHTML = `<iframe src="https://example.com/dam?folder=${config.folder}" />`;
    document.body.appendChild(container);
  },
  openDialog: async (sdk, currentValue, config) => {
    return await sdk.dialogs.openCurrentApp({
      parameters: { config, currentValue },
    });
  },
  isDisabled: () => false,
});
```

### Apps

These open-source apps use `@contentful/dam-app-base`. Look at their source code to learn how they utilize this library:

* [Brandfolder](https://github.com/contentful/apps/tree/master/apps/brandfolder)
* [Bynder](https://github.com/contentful/apps/tree/master/apps/brandfolder)
* [Cloudinary](https://github.com/contentful/apps/tree/master/apps/cloudinary)
* [Dropbox](https://github.com/contentful/apps/tree/master/apps/dropbox)
* [Frontify](https://github.com/contentful/apps/tree/master/apps/frontify)
* [Mux](https://github.com/contentful/apps/tree/master/apps/mux)

### Resources

* [Package on npm](https://www.npmjs.com/package/@contentful/dam-app-base)
* [Source code](https://github.com/contentful/apps/tree/master/packages/dam-app-base)
* [Type Documentation](https://github.com/contentful/apps/tree/master/packages/dam-app-base/docs/README.md)

## E-commerce app base

`@contentful/ecommerce-app-base` is a library that helps you to quickly build an app to integrate your e-commerce system of choice with Contentful. This library provides the core functionality required for an e-commerce integration which means you only need to implement functionality for your specific service.

This library creates an app which can be used in the [entry field location](/extensibility/app-framework/locations#entry-field) to select stock keeping units (sku) from your e-commerce service. The library also provides a [configuration screen](/extensibility/app-framework/locations#app-configuration) for an easy customization.

### Installation

To install, run

```
npm install @contentful/ecommerce-app-base
```

### Usage

```javascript
import { setup } from '@contentful/ecommerce-app-base';

setup({
  makeCTA: () => 'Select products',
  name: 'My SKU App',
  logo: 'https://example.com/logo.svg',
  color: '#d7f0fa',
  description: 'My example SKU App',
  parameterDefinitions: [
    {
      id: 'category',
      type: 'Symbol',
      name: 'Catehory',
      description: 'Product category of our shop',
      required: true,
    },
  ],
  validateParameters: () => null,
  fetchProductPreviews: async (skus) => {
    const responess = await Promise.all(
      skus.map((sku) => fetch(`https://example.com/products/${sku}`))
    );
    return responses.map((response) => response.json());
  },
  renderDialog: (sdk) => {
    const config = sdk.parameters.invocation;

    const container = document.createElement('div');
    container.innerHTML = `<iframe src="https://example.com/products-search?category=${config.category}" />`;
    document.body.appendChild(container);
  },
  openDialog: async (sdk, currentValue, config) => {
    return await sdk.dialogs.openCurrentApp({
      parameters: { config, currentValue },
    });
  },
  isDisabled: () => false,
});
```

### Apps

These open-source apps use `@contentful/ecommerce-app-base`. Look at their source code to learn how they utilize this library:

* [Commerce Layer](https://github.com/contentful/apps/tree/master/apps/commercelayer)
* [Saleor](https://github.com/contentful/apps/tree/master/apps/saleor)
* [Shopify](https://github.com/contentful/apps/tree/master/apps/shopify)

### Resources

* [Package on npm](https://www.npmjs.com/package/@contentful/ecommerce-app-base)
* [Source code](https://github.com/contentful/apps/tree/master/packages/ecommerce-app-base)
* [Type Documentation](https://github.com/contentful/apps/tree/master/packages/ecommerce-app-base/docs/README.md)