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:
- Clone the repository:
git clone [repository_url]
- Install the dependencies:
cd [repository_directory]
npm install
- Set up environment variables:
Copy the .env.local.sample file and rename it to .env.local. Fill in the required environment variables.
- 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]
- Import seed Sanity Studio content:
Copy the exported data from the /data folder and import it into your Sanity Studio.
- Add custom Commerce and Content data:
Customize the storefront by adding your own Commerce Layer and Sanity Studio data.
- 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.