Commercelayer Sanity Template screenshot

Commercelayer Sanity Template

Author Avatar Theme by Commercelayer
Updated: 26 Mar 2025
182 Stars

A multi-country ecommerce template built with Commerce Layer, Next.js, Sanity studio, and deployed to Netlify.

Categories

Overview:

The Commerce Layer Sanity Template is a multi-country ecommerce template built with Commerce Layer, Nextjs, Sanity studio, and deployed to Netlify. It provides a user-friendly and performant ecommerce storefront with features such as products, categories, international transactional functionalities, cart, and checkout. It also includes a customizable Sanity authoring environment for structured content management. The template is PSD2-compliant and has production-ready checkout functionality. It supports React18 and Next13, offers type-checking and code linting, and has localization support for multiple languages. The template comes with comprehensive installation and usage documentation and can be easily deployed using Netlify.

Features:

  • User-friendly and performant ecommerce storefront built with TypeScript, Nextjs, Commerce Layer React Components library, and Tailwind CSS
  • International transactional functionalities powered by Commerce Layer API
  • Structured content and customizable Sanity authoring environment
  • PSD2-compliant and production-ready checkout functionality powered by Commerce Layer React Checkout application
  • Localization support for multiple languages
  • One-click deployment configuration to Netlify

Installation:

To install the Commerce Layer Sanity Template, follow these steps:

  1. Clone the repository:
git clone [repository_url]
  1. Install the dependencies:
cd [repository_directory]
npm install
  1. Set up environment variables:

Copy the .env.local.sample file and rename it to .env.local. Fill in the required environment variables.

  1. Import seed Commerce Layer data:

Run the following command to import seed Commerce Layer data:

npx commerce-layer-cli seeder --file=[path_to_seed_file]
  1. Import seed Sanity Studio content:

Copy the exported data from the /data folder and import it into your Sanity Studio.

  1. Add custom Commerce and Content data:

Customize the storefront by adding your own Commerce Layer and Sanity Studio data.

  1. Start the application:
npm run dev

Summary:

The Commerce Layer Sanity Template is a powerful ecommerce solution that combines the features of Commerce Layer, Nextjs, and Sanity studio. It provides a user-friendly storefront with international transactional functionalities and a customizable content management system. The template is easy to install and customize, and it comes with comprehensive documentation. With its PSD2-compliant and production-ready checkout functionality, the template is suitable for building robust and scalable ecommerce websites.