Skip to main content
The Layers developer hub contains everything you need to integrate Layers into your commerce applications, from SDKs to AI-powered features.

Developer resources

SDK Reference

ES module SDK for Shopify storefronts with reactive state management and built-in caching.

AI Enablement

Use AI assistants to build your Layers integration with our MCP server and AI-friendly documentation.

Getting started

Whether you’re building a custom storefront or enhancing an existing one, Layers provides the tools you need:

SDK integration

The Layers SDK provides full access to the APIs with reactive state management and optional Shopify Storefront API enrichment. Perfect for building rich, interactive commerce experiences.
import { createSdk } from '@commerce-blocks/sdk'

const result = createSdk({
  layersPublicToken: 'your-layers-token',
  sorts: [
    { label: 'Featured', code: 'featured' },
    { label: 'Price: Low to High', code: 'price_asc' },
  ],
  facets: ['options.color', 'options.size', 'vendor'],
})

if (result.error) {
  console.error('SDK init failed:', result.error.message)
} else {
  const sdk = result.data
  // Ready to use
}

AI-assisted development

Layers AI enablement provides tools to help you build integrations faster using AI assistants. Access the documentation through an MCP server, llms.txt, and markdown/text formats optimized for AI tools.

Core capabilities

  • SDK Integration - ES module SDK with reactive state management and Shopify enrichment
  • AI-Assisted Development - MCP server and AI-friendly documentation formats for faster integration
  • Search & Discovery - Full-text search with autocomplete and predictive suggestions
  • Collection Merchandising - Browse and filter products within merchandised collections
  • Product Recommendations - Blocks API for personalized recommendations based on behavioral data and similarity
  • Reactive State - Built-in Preact Signals integration for automatic UI updates

Next steps

Install the SDK

Get started with the Layers SDK in your project.

SDK API Reference

Explore the complete SDK API documentation.

API Reference

Retrieve personalized product recommendations using the Blocks REST API.

AI Enablement

Learn how to enable AI-powered features.

Error Handling

Handle errors gracefully with the Result pattern.