From 104792e5b9be8057b990862305c920cceb194abe Mon Sep 17 00:00:00 2001 From: Pier Francesco Ferrari Date: Wed, 30 Sep 2026 10:16:36 +0200 Subject: [PATCH 1/2] feat: update README.md of all projects --- README.md | 16 ++++----- authentication/nextjs-auth0-sso/README.md | 28 +++++++-------- cms/nextjs-contentful-store/README.md | 22 ++++++------ solutions/README.md | 5 ++- solutions/commercelayer-slackbot/README.md | 34 +++++++++---------- solutions/external-payment-gateway/README.md | 2 +- .../metrics-api-retool-dashboard/README.md | 2 +- .../README.md | 2 +- .../nextjs-signature-verification/README.md | 2 +- webhooks/sendgrid-templated-emails/README.md | 2 +- 10 files changed, 57 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index 4b4b637..0c264e9 100644 --- a/README.md +++ b/README.md @@ -25,17 +25,17 @@ Here are the parent categories of the examples in this repository for easy navig ## Get Started with Commerce Layer -- [All Developer Resources](https://commercelayer.io/developers) +- [All Developer Resources](https://commercelayer.io/resources) - [Commerce Layer Documentation](https://docs.commercelayer.io) -- [Commerce Layer API Reference](https://docs.commercelayer.io/core/v/api-reference/) -- [Commerce Layer Core Concepts](https://commercelayer.io/docs/core-concepts) -- [Commerce Layer Data Model](https://commercelayer.io/docs/data-model) +- [Commerce Layer API Reference](https://docs.commercelayer.io/core-api-reference) +- [Commerce Layer Core Concepts](https://docs.commercelayer.io/core) +- [Commerce Layer Data Model](https://docs.commercelayer.io/data-model) - [Commerce Layer Blog](https://commercelayer.io/blog) - [Commerce Layer Case Studies](https://commercelayer.io/customers) ## Contributors Guide -1. Fork [this repository](https://github.com/commercelayer/examples) (learn how to do this [here](https://help.github.com/articles/fork-a-repo)). +1. Fork [this repository](https://github.com/commercelayer/examples) (learn how to do this [here](https://docs.github.com/en/pull-requests/how-tos/work-with-forks/fork-a-repo)). 2. Clone the forked repository like so: @@ -51,13 +51,13 @@ git clone https://github.com//examples.git && cd examples 6. Add the new example to the list in the category's `README.md` file following the same format as the other examples (follow the sequential alphabetical order by name as seen in your local computer). -7. Make your changes and create a pull request ([learn how to do this](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request)). +7. Make your changes and create a pull request ([learn how to do this](https://docs.github.com/en/pull-requests/how-tos/create-pull-requests/creating-a-pull-request)). 8. Someone will attend to your pull request, provide some feedback, and eventually merge the PR! > **Note** > -> This repository will include examples that follow all the best practices we are following in all our [other public OSS projects](https://commercelayer.io/developers). If you decide to contribute, someone will review and provide some feedback. Thank you! +> This repository will include examples that follow all the best practices we are following in all our [other public OSS projects](https://github.com/commercelayer). If you decide to contribute, someone will review and provide some feedback. Thank you! ## Need Help? @@ -76,6 +76,6 @@ This repository is published under the [MIT](LICENSE) license. ![Commerce Layer Logo](/.assets/cl-light.svg#gh-dark-mode-only) ![Commerce Layer Logo](/.assets/cl-dark.svg#gh-light-mode-only) -

Commerce Layer is a multi-market commerce API and order management system that lets you add global shopping capabilities to any website, mobile app, chatbot, wearable, voice, or IoT device, with ease. Compose your stack with the best-of-breed tools you already mastered and love. Make any experience shoppable, anywhere, through a blazing-fast, enterprise-grade, and secure API.

+

Commerce Layer is a multi-market commerce API and order management system that lets you add global shopping capabilities to any website, mobile app, chatbot, wearable, voice, or IoT device, with ease. Compose your stack with the best-of-breed tools you already mastered and love. Make any experience shoppable, anywhere, through a blazing-fast, enterprise-grade, and secure API.

diff --git a/authentication/nextjs-auth0-sso/README.md b/authentication/nextjs-auth0-sso/README.md index daf600c..14c49a6 100644 --- a/authentication/nextjs-auth0-sso/README.md +++ b/authentication/nextjs-auth0-sso/README.md @@ -1,6 +1,6 @@ # SSO with Nextjs, Auth0, and Commerce Layer -This example shows you how to integrate [Auth0 Nextjs SDK](https://github.com/auth0/nextjs-auth0) into a Nextjs application created using [create-next-app](https://nextjs.org/docs/api-reference/create-next-app). You can use it as a reference to build an SSO flow with Commerce Layer. The sample is a companion to the [Auth0 Nextjs SDK Quickstart](https://auth0.com/docs/quickstart/webapp/nextjs). To get started, kindly read [this comprehensive tutorial](https://commercelayer.io/blog/single-sign-on-with-commerce-layer-using-next-js-and-auth0) on our blog. +This example shows you how to integrate [Auth0 Nextjs SDK](https://github.com/auth0/nextjs-auth0) into a Nextjs application created using [create-next-app](https://nextjs.org/docs/app/api-reference/cli/create-next-app). You can use it as a reference to build an SSO flow with Commerce Layer. The sample is a companion to the [Auth0 Nextjs SDK Quickstart](https://auth0.com/docs/quickstart/webapp/nextjs). To get started, kindly read [this comprehensive tutorial](https://commercelayer.io/blog/single-sign-on-with-commerce-layer-using-next-js-and-auth0) on our blog. --- @@ -8,12 +8,12 @@ This example shows you how to integrate [Auth0 Nextjs SDK](https://github.com/au This sample covers the following use cases: -- [Login](https://github.com/commercelayer/sample-nextjs-auth0-sso/blob/main/components/NavBar.jsx#L61-L67) -- [Logout](https://github.com/commercelayer/sample-nextjs-auth0-sso/blob/main/components/NavBar.jsx#L93-L95) -- [Showing the user profile](https://github.com/commercelayer/sample-nextjs-auth0-sso/blob/main/pages/profile.jsx) -- [Protecting client-side rendered pages](https://github.com/commercelayer/sample-nextjs-auth0-sso/blob/main/pages/profile.jsx#L43-L46) -- [Showing Commerce Layer product and price on the homepage](https://github.com/commercelayer/sample-nextjs-auth0-sso/blob/main/components/Content.jsx) -- [Showing Commerce Layer user's order history](https://github.com/commercelayer/sample-nextjs-auth0-sso/blob/main/pages/orders.jsx) +- [Login](./components/NavBar.jsx) +- [Logout](./components/NavBar.jsx) +- [Showing the user profile](./app/profile/page.jsx) +- [Protecting client-side rendered pages](./app/csr/page.jsx) +- [Showing Commerce Layer product and price on the homepage](./components/Content.jsx) +- [Showing Commerce Layer user's order history](./app/orders/page.jsx) ```mermaid sequenceDiagram @@ -60,12 +60,12 @@ pnpm install This example uses Auth0, an easy-to-implement, adaptable authentication and authorization platform. Auth0 helps you to: -- Add authentication with [multiple sources](https://auth0.com/docs/identityproviders), either social identity providers such as Google, Facebook, Microsoft Account, LinkedIn, GitHub, Twitter, Box, Salesforce (amongst others), or enterprise identity systems like Windows Azure AD, Google Apps, Active Directory, ADFS, or any SAML Identity Provider. -- Add authentication through more traditional [username/password databases](https://auth0.com/docs/connections/database/custom-db). -- Add support for [linking different user accounts](https://auth0.com/docs/users/user-account-linking) with the same user. -- Support for generating signed [JSON Web Tokens](https://auth0.com/docs/tokens/json-web-tokens) to call your APIs and flow the user identity securely. +- Add authentication with [multiple sources](https://auth0.com/docs/authenticate/identity-providers), either social identity providers such as Google, Facebook, Microsoft Account, LinkedIn, GitHub, Twitter, Box, Salesforce (amongst others), or enterprise identity systems like Windows Azure AD, Google Apps, Active Directory, ADFS, or any SAML Identity Provider. +- Add authentication through more traditional [username/password databases](https://auth0.com/docs/authenticate/database-connections/custom-db). +- Add support for [linking different user accounts](https://auth0.com/docs/manage-users/user-accounts/user-account-linking) with the same user. +- Support for generating signed [JSON Web Tokens](https://auth0.com/docs/secure/tokens/json-web-tokens) to call your APIs and flow the user identity securely. - Analytics of how, when, and where users are logging in. -- Pull data from other sources and add it to the user profile through [JavaScript rules](https://auth0.com/docs/rules). +- Pull data from other sources and add it to the user profile through [JavaScript rules](https://auth0.com/docs/customize/rules). To get started, create a free Commerce Layer account like so: @@ -83,7 +83,7 @@ Also, create a free Auth0 account like so: The project needs to be configured with your Auth0 domain, client ID, and client secret for the authentication flow to work. -To do that, first copy `.env.local.example` into a new file in the same folder called `.env.local`, and replace the values with your own Auth0 application credentials (more info about loading environmental variables in Nextjs [here](https://nextjs.org/docs/basic-features/environment-variables)): +To do that, first copy `.env.local.example` into a new file in the same folder called `.env.local`, and replace the values with your own Auth0 application credentials (more info about loading environmental variables in Nextjs [here](https://nextjs.org/docs/pages/guides/environment-variables)): ```sh # A long secret value used to encrypt the session cookie @@ -114,7 +114,7 @@ AUTH0_M2M_CLIENT_SECRET='YOUR_AUTH0_M2M_CLIENT_SECRET' #### Commerce Layer -You also need to use a [sales channel](https://docs.commercelayer.io/core/applications#sales-channel) and an [integration](https://docs.commercelayer.io/core/applications#integration) application on Commerce Layer. Add to `.env.local` the following variables setting your applications' credentials and market information. Note that the organization slug and endpoint are automatically inferred from the access token: +You also need to use a [sales channel](https://docs.commercelayer.io/core/api-credentials#sales-channel) and an [integration](https://docs.commercelayer.io/core/api-credentials#integration) application on Commerce Layer. Add to `.env.local` the following variables setting your applications' credentials and market information. Note that the organization slug and endpoint are automatically inferred from the access token: ```sh CL_INTEGRATION_CLIENT_ID='YOU INTEGRATION CLIENT ID' diff --git a/cms/nextjs-contentful-store/README.md b/cms/nextjs-contentful-store/README.md index 7b8dc9d..fb8cbb2 100644 --- a/cms/nextjs-contentful-store/README.md +++ b/cms/nextjs-contentful-store/README.md @@ -19,7 +19,7 @@ A multi-country ecommerce store built with Commerce Layer, Next.js, and Contentf - Comprehensive installation and usage documentation. - One-click deployment configuration to your favorite hosting providers. -| [Storefront UI](https://cl-nextjs-contentful-store.netlify.app) | [Contentful Editor](https://app.contenful.com) | +| [Storefront UI](https://cl-nextjs-contentful-store.netlify.app) | [Contentful Editor](https://app.contentful.com) | | ------------------------------------------------------------------- | -------------------------------------------------------------------------- | | ![A preview image showing the storefront.](./public/ui-preview.png) | ![A preview image showing the contentful studio.](./public/ct-preview.png) | @@ -41,11 +41,11 @@ A multi-country ecommerce store built with Commerce Layer, Next.js, and Contentf The quickest way to get up and running is to use any of the deploy buttons below to set up and deploy automatically to your favorite hosting provider. Afterward, you will add some seed data to Commerce Layer and Contentful. The deploy button will clone this repository and ask you to enter all the required environment variables. Alternatively, you can clone this repository, configure the template, import the dataset into your Contentful space, import some seed commerce data into your Commerce Layer organization, and deploy your application. The installation guide below will show you how to achieve this. -[Deploy to Netlify](https://app.netlify.com/start/deploy?repository=https://github.com/commercelayer/examples&base=cms/nextjs-contentful-store#BUILD_LANGUAGES=en-US,it-IT&NEXT_PUBLIC_SITE_NAME&NEXT_PUBLIC_SITE_URL&NEXT_PUBLIC_CL_CLIENT_ID&NEXT_PUBLIC_CONTENTFUL_SPACE_ID&NEXT_PUBLIC_CONTENTFUL_DELIVERY_ACCESS_TOKEN) [Deploy to Vercel](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fcommercelayer%2Fexamples%2Fblob%2Fmain%2Fcms%2Fnextjs-contentful-store&env=BUILD_LANGUAGES=en-US,it-IT,NEXT_PUBLIC_SITE_NAME,NEXT_PUBLIC_SITE_URL,NEXT_PUBLIC_CL_CLIENT_ID,NEXT_PUBLIC_CONTENTFUL_SPACE_ID,NEXT_PUBLIC_CONTENTFUL_DELIVERY_ACCESS_TOKEN&envDescription=API%20credentials%20and%20configuration%20variables%20needed%20for%20the%20store.&envLink=https%3A%2F%2Fgithub.com%2Fcommercelayer%2Fexamples%2Fblob%2Fmain%2Fcms%2Fnextjs-contentful-store%23installation-guide) +[Deploy to Netlify](https://app.netlify.com/start/deploy?repository=https://github.com/commercelayer/examples&base=cms/nextjs-contentful-store#BUILD_LANGUAGES=en-US,it-IT&NEXT_PUBLIC_SITE_NAME&NEXT_PUBLIC_SITE_URL&NEXT_PUBLIC_CL_CLIENT_ID&NEXT_PUBLIC_CONTENTFUL_SPACE_ID&NEXT_PUBLIC_CONTENTFUL_DELIVERY_ACCESS_TOKEN) [Deploy to Vercel](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fcommercelayer%2Fexamples%2Ftree%2Fmain%2Fcms%2Fnextjs-contentful-store&env=BUILD_LANGUAGES=en-US,it-IT,NEXT_PUBLIC_SITE_NAME,NEXT_PUBLIC_SITE_URL,NEXT_PUBLIC_CL_CLIENT_ID,NEXT_PUBLIC_CONTENTFUL_SPACE_ID,NEXT_PUBLIC_CONTENTFUL_DELIVERY_ACCESS_TOKEN&envDescription=API%20credentials%20and%20configuration%20variables%20needed%20for%20the%20store.&envLink=https%3A%2F%2Fgithub.com%2Fcommercelayer%2Fexamples%2Ftree%2Fmain%2Fcms%2Fnextjs-contentful-store%23installation-guide) ### Installation Guide -1. Clone this repository ([learn how to do this](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository)). +1. Clone this repository ([learn how to do this](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)). 2. Rename the `/env.local.example` file to `.env.local` and add the following credentials: @@ -54,7 +54,7 @@ The quickest way to get up and running is to use any of the deploy buttons below | `BUILD_LANGUAGES` | The supported locales (the default is `en-US, it-IT, fr-FR`). | | `NEXT_PUBLIC_SITE_NAME` | Optional name for the `` head tag (you can also edit this directly in the code). | | `NEXT_PUBLIC_SITE_URL` | Optional URL of your deployed project for the `og:url` meta property and cart `return_url` (you can also edit this directly in the code). | -| `NEXT_PUBLIC_CL_CLIENT_ID` | Your Commerce Layer sales channels application client ID (you can create this automatically by following this [onboarding guide](https://docs.commercelayer.io/developers) or manually on the [Commerce Layer dashboard](https://dashboard.commercelayer.io)). | +| `NEXT_PUBLIC_CL_CLIENT_ID` | Your Commerce Layer sales channels application client ID (you can create this automatically by following this [onboarding guide](https://docs.commercelayer.io) or manually on the [Commerce Layer dashboard](https://dashboard.commercelayer.io)). | | `NEXT_PUBLIC_CONTENTFUL_SPACE_ID` | Your Contentful space ID (you can get this from [app.contentful.com](https://app.contentful.com) > Settings > API keys). | | `NEXT_PUBLIC_CONTENTFUL_DELIVERY_ACCESS_TOKEN` | Your Contentful delivery access token that allows you to fetch published content (you can get this from [app.contentful.com](https://app.contentful.com) > Settings > API keys). | | `CONTENTFUL_IMPORT_MANAGEMENT_TOKEN` | Your Contentful import management token that allows you to import data into your space (you can get this from [app.contentful.com](https://app.contentful.com) > Settings > API keys). | @@ -77,13 +77,13 @@ This will run the storefront at `localhost:3000`. 1. Create a free [Commerce Layer account](https://dashboard.commercelayer.io/sign_up). If you already have an active account, kindly skip to Step 3. -2. Create a new [organization](https://commercelayer.io/docs/data-model/users-and-organizations) or follow the [onboarding tutorial guide](https://docs.commercelayer.io/developers). +2. Create a new [organization](https://docs.commercelayer.io/data-model/foundation-and-setup/users-and-organizations) or follow the [onboarding tutorial guide](https://docs.commercelayer.io). 3. Create a new **Integrations** application with **Name** set to `CLI` and **Role** set to `admin`. 4. In your newly created application, copy the `Client ID`, `Client Secret`, and `Base Endpoint` credentials. -5. Install the [Commerce Layer CLI](https://github.com/commercelayer/commercelayer-cli) which is available as an [npm package](https://www.npmjs.com/package/@commercelayer/commercelayer-cli) or [yarn package](https://yarnpkg.com/package/@commercelayer/cli) using the command below: +5. Install the [Commerce Layer CLI](https://github.com/commercelayer/commercelayer-cli) which is available as an [npm package](https://www.npmjs.com/package/@commercelayer/cli) or [yarn package](https://yarnpkg.com/package?name=@commercelayer/cli) using the command below: ```bash npm install -g @commercelayer/cli @@ -107,7 +107,7 @@ cl applications:login -o <organizationSlug> -i <clientId> -s <clientSecret> -a < cl plugins:install seeder ``` -8. Run the command below to import three demo [markets](https://data.commercelayer.app/seed/markets.json) (UK, USA, and Europe), a set of [SKUs](https://data.commercelayer.app/seed/skus.json), related [price lists](https://data.commercelayer.app/seed/price_lists.json), related [prices](https://data.commercelayer.app/seed/prices.json), [stock locations](https://data.commercelayer.app/seed/stock_locations.json), and [inventory](https://data.commercelayer.app/seed/stock_items.json) into your organization using the `multi_market` [business model](https://commercelayer.io/docs/data-model/markets-and-business-models). +8. Run the command below to import three demo [markets](https://data.commercelayer.app/seed/markets.json) (UK, USA, and Europe), a set of [SKUs](https://data.commercelayer.app/seed/skus.json), related [price lists](https://data.commercelayer.app/seed/price_lists.json), related [prices](https://data.commercelayer.app/seed/prices.json), [stock locations](https://data.commercelayer.app/seed/stock_locations.json), and [inventory](https://data.commercelayer.app/seed/stock_items.json) into your organization using the `multi_market` [business model](https://docs.commercelayer.io/data-model/pricing-and-markets/markets-and-business-models). ```bash cl seed -b multi_market @@ -179,7 +179,7 @@ pnpm run import-seed ![Select multiple entries in Contentful](./public/ct-select-publish.png) -2. The Contentful content data includes a collection of sample countries, products, variants, sizes, taxons, taxonomies, catalogs, and product images created during development. To get an [access token](https://docs.commercelayer.io/developers/authentication) for the Nextjs storefront, we fetch the scope (market ID) from the `Market Id` attribute set in the Contentful `Country` content model. So, when you seed your Commerce Layer organization, some markets will be created with a different market ID from the one imported into Contentful. Hence, you will need to fetch the valid market scope's number (4 digits) from the sales channel tab of your organization in the [Commerce Layer dashboard](https://dashboard.commercelayer.io) and update in Contentful. For example, the Europe Market on Commerce Layer to match the Italy country model content type on Contentful. Failure to do this will result in an invalid scope authentication error when you try to access the storefront. +2. The Contentful content data includes a collection of sample countries, products, variants, sizes, taxons, taxonomies, catalogs, and product images created during development. To get an [access token](https://docs.commercelayer.io/core/authentication) for the Nextjs storefront, we fetch the scope (market ID) from the `Market Id` attribute set in the Contentful `Country` content model. So, when you seed your Commerce Layer organization, some markets will be created with a different market ID from the one imported into Contentful. Hence, you will need to fetch the valid market scope's number (4 digits) from the sales channel tab of your organization in the [Commerce Layer dashboard](https://dashboard.commercelayer.io) and update in Contentful. For example, the Europe Market on Commerce Layer to match the Italy country model content type on Contentful. Failure to do this will result in an invalid scope authentication error when you try to access the storefront. | Commerce Layer dashboard (sales channel tab) | Contentful dashboard (country model) | | -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | @@ -195,11 +195,11 @@ pnpm run import-seed Eventually, you would want to set up commerce data in Commerce Layer manually and add your content data in Contentful based on your use case. To ensure the template runs smoothly, kindly do the following: -1. In the [Commerce Layer dashboard](https://dashboard.commercelayer.io), create a [market](https://docs.commercelayer.io/core/v/api-reference/markets) (if you need a new one) associated with a [stock location](https://docs.commercelayer.io/core/v/api-reference/stock_locations), [stock item](https://docs.commercelayer.io/core/v/api-reference/stock_items), [price list](https://docs.commercelayer.io/core/v/api-reference/price_lists), [price](https://docs.commercelayer.io/core/v/api-reference/prices), and [SKU](https://docs.commercelayer.io/core/v/api-reference/skus)(s) and add a new `Country` content in Contentful with a valid `market ID` attribute. +1. In the [Commerce Layer dashboard](https://dashboard.commercelayer.io), create a [market](https://docs.commercelayer.io/core-api-reference/markets) (if you need a new one) associated with a [stock location](https://docs.commercelayer.io/core-api-reference/stock_locations), [stock item](https://docs.commercelayer.io/core-api-reference/stock_items), [price list](https://docs.commercelayer.io/core-api-reference/price_lists), [price](https://docs.commercelayer.io/core-api-reference/prices), and [SKU](https://docs.commercelayer.io/core-api-reference/skus)(s) and add a new `Country` content in Contentful with a valid `market ID` attribute. -2. In the [Contentful dashboard](https://app.contenful.com), add the content for the new SKUs as a `Variant` and associate them with a `Product` content model. You can then go ahead to update other content models like `Taxon`, `Taxonomy`, and `Catalog` as you deem fit. +2. In the [Contentful dashboard](https://app.contentful.com), add the content for the new SKUs as a `Variant` and associate them with a `Product` content model. You can then go ahead to update other content models like `Taxon`, `Taxonomy`, and `Catalog` as you deem fit. -3. Ensure to read our [onboarding guide](https://docs.commercelayer.io/core/welcome/onboarding-tutorial), [manual configuration guide](https://docs.commercelayer.io/core/welcome/manual-configuration), or [data models documentation](https://commercelayer.io/docs/data-model) to learn more about how Commerce Layer works and the relationships between each API resource. +3. Ensure to read our [onboarding guide](https://docs.commercelayer.io/core/onboarding/guided-setup), [manual configuration guide](https://docs.commercelayer.io/core/onboarding/manual-configuration), or [data models documentation](https://docs.commercelayer.io/data-model) to learn more about how Commerce Layer works and the relationships between each API resource. > **Note** > diff --git a/solutions/README.md b/solutions/README.md index 8f013ad..c29d8c2 100644 --- a/solutions/README.md +++ b/solutions/README.md @@ -14,10 +14,9 @@ This category includes the following project(s): - [commercelayer-shopify-demo](./commercelayer-shopify-demo) — A demo Shopify theme for building a multi-language, multi-country website on a single Shopify store and integrating Commerce Layer to localize prices, inventory, shopping cart, and checkout for each country. - [commercelayer-slackbot](./commercelayer-slackbot) — A Slackbot that responds with orders/returns summaries upon request and allows users to checkout pending orders directly from a Slack channel. - [conf-swag-demo-store](./conf-swag-demo-store) — A swag ecommerce store built using the Commerce Layer Nextjs demo-store project. -- [dropin-basic-store-demo](./dropin-basic-store-demo) — A minimal demo that shows how to transform a plain HTML page into an enterprise-grade static commerce website, with product listing, prices, cart. +- [dropin-basic-store-demo](./dropin-basic-store-demo) — A minimal demo that shows how to transform a plain HTML page into an enterprise-grade static commerce website, with product listing, prices, cart, checkout, customer identity, and customer portal. - [external-payment-gateway](./external-payment-gateway/) - A minimal TypeScript monorepo that demonstrates Commerce Layer's **asynchronous external payment gateway** flow using [Mollie](https://mollie.com). - [giftcard-tutorial](./giftcard-tutorial) - A step by step tutorial to implement a simple page to sell digital giftcards. -checkout, customer identity, and customer portal. - [js-sdk-sandbox](./js-sdk-sandbox) — A code sandbox with examples of how to make some fundamental API requests using Commerce Layer JavaScript SDK. -- [pay-with-tweet](./pay-with-tweet) — A demo pay-with-tweet external payment gateway for order purchases paid with just a tweet. - [metrics-api-retool-dashboard](./metrics-api-retool-dashboard/) - a sample Retool dashboard connected to Commerce Layer Metrics API +- [pay-with-tweet](./pay-with-tweet) — A demo pay-with-tweet external payment gateway for order purchases paid with just a tweet. diff --git a/solutions/commercelayer-slackbot/README.md b/solutions/commercelayer-slackbot/README.md index dfa8f21..d153138 100644 --- a/solutions/commercelayer-slackbot/README.md +++ b/solutions/commercelayer-slackbot/README.md @@ -1,6 +1,6 @@ # Commerce Layer Slackbot -This example shows a code implementation of a Slackbot that responds with orders/returns summaries upon request and allows users to checkout pending orders directly from a Slack channel. This application was built with Commerce Layer, Slack Boltjs library, and Supabase. To get started, kindly read [this comprehensive tutorial](https://commercelayer.io/blog/how-we-built-the-commerce-layer-slackbot-with-node-js-and-slack-api), followed by [this one](https://commercelayer.io/blog/handling-slack-apps-distribution-using-supabase-and-fly-io) on our blog. +This example shows a code implementation of a Slackbot that responds with orders/returns summaries upon request and allows users to checkout pending orders directly from a Slack channel. This application was built with Commerce Layer, Slack Boltjs library, and Supabase. To get started, kindly read [this comprehensive tutorial](https://commercelayer.io/blog/how-we-built-the-commerce-layer-slackbot-with-node-js-and-slack-api) on our blog. ![A preview of the Commerce Layer Slackbot about page.](./static/app-details.png) @@ -21,7 +21,7 @@ This example shows a code implementation of a Slackbot that responds with orders ## Getting Started -The quickest way to get up and running is to use the "Add to Slack" button below to install the demo Slack bot into your Slack workspace (for demo testing). Alternatively, you can [install from Slack](https://slack.com/apps/A04NTNAPX2B-commerce-layer-demo-bot). After a successful installation, you will configure the bot by providing some required Commerce Layer application credentials. +The quickest way to get up and running is to use the "Add to Slack" button below to install the demo Slack bot into your Slack workspace (for demo testing). After a successful installation, you will configure the bot by providing some required Commerce Layer application credentials. <div align="center"> <a href="https://commercelayer-slackbot.fly.dev/slack/install" target="_blank" rel="noopener noreferrer"> @@ -31,7 +31,7 @@ The quickest way to get up and running is to use the "Add to Slack" button below ## Configuration Guide -Before you start using the Slackbot, you need to provide some Commerce Layer [application credentials](https://docs.commercelayer.io/core/applications). Kindly follow the steps below to configure the app: +Before you start using the Slackbot, you need to provide some Commerce Layer [application credentials](https://docs.commercelayer.io/core/api-credentials). Kindly follow the steps below to configure the app: 1. Find the app (Commerce Layer Demo Bot) in the "Apps" section of your Slack workspace (most often at the bottom section). @@ -56,7 +56,7 @@ Here are the available commands: - `/cl orders:last` and `/cl orders:p last` (fetch the last `placed` order) - `/cl orders:a last` (fetch the last `approved` order) -These commands will return the following [Order](https://docs.commercelayer.io/core/v/api-reference/orders) and [Customer](https://docs.commercelayer.io/core/v/api-reference/customers) attributes: `id`, `placed_at`, `formatted_subtotal_amount`, `number`, `status`, `payment_status`, `fulfillment_status`, `shipping_address`, `billing_address`, `payment_method`, `shipment_number`, and `customer_email`. +These commands will return the following [Order](https://docs.commercelayer.io/core-api-reference/orders) and [Customer](https://docs.commercelayer.io/core-api-reference/customers) attributes: `id`, `placed_at`, `formatted_subtotal_amount`, `number`, `status`, `payment_status`, `fulfillment_status`, `shipping_address`, `billing_address`, `payment_method`, `shipment_number`, and `customer_email`. ### Fetch a return resource @@ -66,7 +66,7 @@ Here are the available commands: - `/cl returns:last` and `/cl returns:r last` (fetch the last `requested` return) - `/cl returns:a last` (fetch the last `approved` return) -These commands will return the following [Return](https://docs.commercelayer.io/core/v/api-reference/returns) and [Customer](https://docs.commercelayer.io/core/v/api-reference/customers) attributes: `id`, `created_at`, `number`, `status`, `origin_address`, `destination_address`, `stock_location`, and `skus_count`. +These commands will return the following [Return](https://docs.commercelayer.io/core-api-reference/returns) and [Customer](https://docs.commercelayer.io/core-api-reference/customers) attributes: `id`, `created_at`, `number`, `status`, `origin_address`, `destination_address`, `stock_location`, and `skus_count`. ### Fetch the current total orders per day @@ -90,25 +90,25 @@ The `/cl returns:today` command will return the total number of `requested` retu If for any reason you want to set up your own server (most likely because you want to contribute to this project), kindly follow the steps below. -1. Create a [Commerce Layer account](https://dashboard.commercelayer.io/sign_up), set up your organization, and create the required commerce data resources for your market. You can follow the [onboarding tutorial](https://docs.commercelayer.io/developers/welcome/onboarding-tutorial) or [manual configuration guide](https://docs.commercelayer.io/developers/welcome/manual-configuration) to achieve this. +1. Create a [Commerce Layer account](https://dashboard.commercelayer.io/sign_up), set up your organization, and create the required commerce data resources for your market. You can follow the [onboarding tutorial](https://docs.commercelayer.io/core/onboarding/guided-setup) or [manual configuration guide](https://docs.commercelayer.io/core/onboarding/manual-configuration) to achieve this. -2. Create a demo Slack workspace and create a [new Slack app](https://api.slack.com/apps/new) (you can [read this Slack guide](https://slack.dev/bolt-js/tutorial/getting-started) to learn the basics of Slack applications). +2. Create a demo Slack workspace and create a [new Slack app](https://api.slack.com/apps?new_app=1) (you can [read this Slack guide](https://docs.slack.dev/tools/bolt-js/tutorial/getting-started) to learn the basics of Slack applications). -3. Create a [Supabase account](https://app.supabase.com) and setup a new database project. +3. Create a [Supabase account](https://supabase.com/dashboard) and setup a new database project. -4. Clone this repository ([learn how to do this](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository)). +4. Clone this repository ([learn how to do this](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)). 5. Rename the `/.env.example` file to `.env` and add the following credentials: | **Variable** | **Description** | | ------------------------- | ------------------------------------- | | `APP_MODE` | This indicates if the instance of the project is in `development` or `production`. In production the credentials used are unique for all users sourced from a database while development using the local `.env` file. | -| `SLACK_BOT_TOKEN` | This is a [Slack bot token](https://api.slack.com/authentication/token-types#bot) that represents a bot associated with the app installed in a workspace. | -| `SLACK_SIGNING_SECRET` | This is the unique string key Slack generates for an app and is used to [verify requests](https://api.slack.com/authentication/verifying-requests-from-slack#about) from Slack with confidence by verifying signatures using the signing secret. | +| `SLACK_BOT_TOKEN` | This is a [Slack bot token](https://docs.slack.dev/authentication/tokens/) that represents a bot associated with the app installed in a workspace. | +| `SLACK_SIGNING_SECRET` | This is the unique string key Slack generates for an app and is used to [verify requests](https://docs.slack.dev/authentication/verifying-requests-from-slack/) from Slack with confidence by verifying signatures using the signing secret. | | `SLACK_CLIENT_ID` | This is required along with the client secret to make Slack `oauth.v2.access` requests. | | `SLACK_CLIENT_SECRET` | This is required along with the client ID to make Slack `oauth.v2.access` requests. | | `SLACK_STATE_SECRET` | This is used to avoid forgery attacks by passing in a unique value to encode and decode the state when a Slack `oauth.v2.access` request is made. You should enter a random pre-defined string here. | -| `SLACK_APP_TOKEN` | This is a [Slack app-level token](https://api.slack.com/authentication/token-types#app) that represents an app across organizations, including installations by all individual users on all workspaces in a given organization. | +| `SLACK_APP_TOKEN` | This is a [Slack app-level token](https://docs.slack.dev/authentication/tokens/) that represents an app across organizations, including installations by all individual users on all workspaces in a given organization. | | `CL_CLIENT_ID` | Your Commerce Layer integration application client ID. | | `CL_CLIENT_SECRET` | Your Commerce Layer integration application client secret. | | `CL_CLIENT_ID_CHECKOUT` | Your Commerce Layer sales channel application client ID. | @@ -117,11 +117,11 @@ If for any reason you want to set up your own server (most likely because you wa > **Note** > -> For all Commerce Layer credentials, see: <https://docs.commercelayer.io/core/applications>. +> For all Commerce Layer credentials, see: <https://docs.commercelayer.io/core/api-credentials>. > -> For all Slack credentials, see: <https://api.slack.com/authentication>. +> For all Slack credentials, see: <https://docs.slack.dev/authentication/>. > -> For all Supabase credentials, see: <https://supabase.com/docs/guides/database>. +> For all Supabase credentials, see: <https://supabase.com/docs/guides/database/overview>. 6. This project uses `pnpm`; [install pnpm](https://pnpm.io/installation) first, and run the command below to install the required dependencies: @@ -147,7 +147,7 @@ pnpm run dev-start pnpm run dev ``` -10. Update your Slack app accordingly with the generated URL above or use these [manifest (JSON or YAML)](./manifests/) files as a template to easily [configure your Slack app](https://api.slack.com/reference/manifests). +10. Update your Slack app accordingly with the generated URL above or use these [manifest (JSON or YAML)](./manifests/) files as a template to easily [configure your Slack app](https://docs.slack.dev/app-manifests/configuring-apps-with-app-manifests/). <br /> @@ -157,4 +157,4 @@ Now you can proceed to do your thing! > **Note** > -> If you want to deploy this application to fly.io, kindly refer to the deployment section of [this tutorial](https://commercelayer.io/blog/handling-slack-apps-distribution-using-supabase-and-fly-io). For other deployment providers, you can deploy this like any other Nodejs app. +> If you want to deploy this application to fly.io, kindly refer to the [fly.io docs for Node.js apps](https://docs.fly.io/js) and use the `fly-sample.toml` file in this folder as a starting point. For other deployment providers, you can deploy this like any other Nodejs app. diff --git a/solutions/external-payment-gateway/README.md b/solutions/external-payment-gateway/README.md index efa8874..4b3ef9a 100644 --- a/solutions/external-payment-gateway/README.md +++ b/solutions/external-payment-gateway/README.md @@ -47,7 +47,7 @@ User fills checkout → SPA creates Mollie payment → _place order - A **Shared secret** — copy it for `CL_GATEWAY_SHARED_SECRET` - A **Webhook endpoint URL** — copy it for `CL_WEBHOOK_ENDPOINT_URL` -> ⚠️ The `authorize_url` must be reachable by Commerce Layer's servers. For local development, use a tunnel like [ngrok](https://ngrok.com) or [cloudflared](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/): +> ⚠️ The `authorize_url` must be reachable by Commerce Layer's servers. For local development, use a tunnel like [ngrok](https://ngrok.com) or [cloudflared](https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/): > ```bash > ngrok http 3001 > # or diff --git a/solutions/metrics-api-retool-dashboard/README.md b/solutions/metrics-api-retool-dashboard/README.md index 64810dd..935c2ee 100644 --- a/solutions/metrics-api-retool-dashboard/README.md +++ b/solutions/metrics-api-retool-dashboard/README.md @@ -3,6 +3,6 @@ This example contains a [sample Retool Dashboard](./Metrics-API-dashboard.zip) that can be used to display Commerce Layer Metrics API data. To import it just open the retool dashboard and on the **create** button select *from JSON*. -You will probably need to **rewrite the code elements** containing the queries as the ones imported won't work (they refer to the orginal resources). The blog article contains detailed instructions on how to do that! +You will probably need to **rewrite the code elements** containing the queries as the ones imported won't work (they refer to the orginal resources). [This blog article](https://commercelayer.io/blog/build-a-business-dashboard-with-retool-and-the-commerce-layer-metrics-api) contains detailed instructions on how to do that! ![Screenshot showing how to import an app in retool.](retool_import_app.png "Importing an app in retool") \ No newline at end of file diff --git a/webhooks/expressjs-signature-verification/README.md b/webhooks/expressjs-signature-verification/README.md index 587c9f7..3e3b5c4 100644 --- a/webhooks/expressjs-signature-verification/README.md +++ b/webhooks/expressjs-signature-verification/README.md @@ -40,7 +40,7 @@ cl webhooks:create \ const CL_SHARED_SECRET="your-webhook-secret" ``` -6. Place a new order using Commerce Layer [Demo Stores](https://github.com/commercelayer/demo-store), [Hosted Microstore](https://github.com/commercelayer/commercelayer-microstore), or the [CLI Checkout Plugin](https://github.com/commercelayer/commercelayer-cli-plugin-checkout). +6. Place a new order using Commerce Layer [Demo Stores](https://github.com/commercelayer/demo-store), [Hosted Microstore](https://github.com/commercelayer/mfe-microstore), or the [CLI Checkout Plugin](https://github.com/commercelayer/commercelayer-cli-plugin-checkout). ```bash cl plugins:install checkout diff --git a/webhooks/nextjs-signature-verification/README.md b/webhooks/nextjs-signature-verification/README.md index fa261bb..9be2fca 100644 --- a/webhooks/nextjs-signature-verification/README.md +++ b/webhooks/nextjs-signature-verification/README.md @@ -48,7 +48,7 @@ cl webhooks:create \ -i "customer,line_items,shipping_address,billing_address,shipments.shipping_method,payment_method,payment_source,market" ``` -6. Place a new order using Commerce Layer [Demo Stores](https://github.com/commercelayer/demo-store), [Hosted Microstore](https://github.com/commercelayer/commercelayer-microstore), or the [CLI Checkout Plugin](https://github.com/commercelayer/commercelayer-cli-plugin-checkout). +6. Place a new order using Commerce Layer [Demo Stores](https://github.com/commercelayer/demo-store), [Hosted Microstore](https://github.com/commercelayer/mfe-microstore), or the [CLI Checkout Plugin](https://github.com/commercelayer/commercelayer-cli-plugin-checkout). ```bash cl plugins:install checkout diff --git a/webhooks/sendgrid-templated-emails/README.md b/webhooks/sendgrid-templated-emails/README.md index dc9d05c..bf2131f 100644 --- a/webhooks/sendgrid-templated-emails/README.md +++ b/webhooks/sendgrid-templated-emails/README.md @@ -38,7 +38,7 @@ cl webhooks:create \ -i "customer,line_items,shipping_address,billing_address,shipments.shipping_method,payment_method,payment_source,market" ``` -5. Place a new order using Commerce Layer [Demo Stores](https://github.com/commercelayer/demo-store), [Hosted Microstore](https://github.com/commercelayer/commercelayer-microstore), or the [CLI Checkout Plugin](https://github.com/commercelayer/commercelayer-cli-plugin-checkout). +5. Place a new order using Commerce Layer [Demo Stores](https://github.com/commercelayer/demo-store), [Hosted Microstore](https://github.com/commercelayer/mfe-microstore), or the [CLI Checkout Plugin](https://github.com/commercelayer/commercelayer-cli-plugin-checkout). ```bash cl plugins:install checkout From 4cf500826d970fb57563582f4dbcfebe48edfa93 Mon Sep 17 00:00:00 2001 From: Pier Francesco Ferrari <pierfrancesco@commercelayer.io> Date: Fri, 2 Oct 2026 17:43:38 +0200 Subject: [PATCH 2/2] chore: remove old/unwanted docs links --- README.md | 1 - cms/nextjs-contentful-store/README.md | 8 ++++---- solutions/commercelayer-slackbot/README.md | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0c264e9..4da336a 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,6 @@ Here are the parent categories of the examples in this repository for easy navig - [Commerce Layer Documentation](https://docs.commercelayer.io) - [Commerce Layer API Reference](https://docs.commercelayer.io/core-api-reference) - [Commerce Layer Core Concepts](https://docs.commercelayer.io/core) -- [Commerce Layer Data Model](https://docs.commercelayer.io/data-model) - [Commerce Layer Blog](https://commercelayer.io/blog) - [Commerce Layer Case Studies](https://commercelayer.io/customers) diff --git a/cms/nextjs-contentful-store/README.md b/cms/nextjs-contentful-store/README.md index fb8cbb2..71b5421 100644 --- a/cms/nextjs-contentful-store/README.md +++ b/cms/nextjs-contentful-store/README.md @@ -54,7 +54,7 @@ The quickest way to get up and running is to use any of the deploy buttons below | `BUILD_LANGUAGES` | The supported locales (the default is `en-US, it-IT, fr-FR`). | | `NEXT_PUBLIC_SITE_NAME` | Optional name for the `<title>` head tag (you can also edit this directly in the code). | | `NEXT_PUBLIC_SITE_URL` | Optional URL of your deployed project for the `og:url` meta property and cart `return_url` (you can also edit this directly in the code). | -| `NEXT_PUBLIC_CL_CLIENT_ID` | Your Commerce Layer sales channels application client ID (you can create this automatically by following this [onboarding guide](https://docs.commercelayer.io) or manually on the [Commerce Layer dashboard](https://dashboard.commercelayer.io)). | +| `NEXT_PUBLIC_CL_CLIENT_ID` | Your Commerce Layer sales channels application client ID (you can create this automatically by following our [documentation](https://docs.commercelayer.io) or manually on the [Commerce Layer dashboard](https://dashboard.commercelayer.io)). | | `NEXT_PUBLIC_CONTENTFUL_SPACE_ID` | Your Contentful space ID (you can get this from [app.contentful.com](https://app.contentful.com) > Settings > API keys). | | `NEXT_PUBLIC_CONTENTFUL_DELIVERY_ACCESS_TOKEN` | Your Contentful delivery access token that allows you to fetch published content (you can get this from [app.contentful.com](https://app.contentful.com) > Settings > API keys). | | `CONTENTFUL_IMPORT_MANAGEMENT_TOKEN` | Your Contentful import management token that allows you to import data into your space (you can get this from [app.contentful.com](https://app.contentful.com) > Settings > API keys). | @@ -77,7 +77,7 @@ This will run the storefront at `localhost:3000`. 1. Create a free [Commerce Layer account](https://dashboard.commercelayer.io/sign_up). If you already have an active account, kindly skip to Step 3. -2. Create a new [organization](https://docs.commercelayer.io/data-model/foundation-and-setup/users-and-organizations) or follow the [onboarding tutorial guide](https://docs.commercelayer.io). +2. Create a new organization or follow the [documentation](https://docs.commercelayer.io). 3. Create a new **Integrations** application with **Name** set to `CLI` and **Role** set to `admin`. @@ -107,7 +107,7 @@ cl applications:login -o <organizationSlug> -i <clientId> -s <clientSecret> -a < cl plugins:install seeder ``` -8. Run the command below to import three demo [markets](https://data.commercelayer.app/seed/markets.json) (UK, USA, and Europe), a set of [SKUs](https://data.commercelayer.app/seed/skus.json), related [price lists](https://data.commercelayer.app/seed/price_lists.json), related [prices](https://data.commercelayer.app/seed/prices.json), [stock locations](https://data.commercelayer.app/seed/stock_locations.json), and [inventory](https://data.commercelayer.app/seed/stock_items.json) into your organization using the `multi_market` [business model](https://docs.commercelayer.io/data-model/pricing-and-markets/markets-and-business-models). +8. Run the command below to import three demo [markets](https://data.commercelayer.app/seed/markets.json) (UK, USA, and Europe), a set of [SKUs](https://data.commercelayer.app/seed/skus.json), related [price lists](https://data.commercelayer.app/seed/price_lists.json), related [prices](https://data.commercelayer.app/seed/prices.json), [stock locations](https://data.commercelayer.app/seed/stock_locations.json), and [inventory](https://data.commercelayer.app/seed/stock_items.json) into your organization using the `multi_market` business model. ```bash cl seed -b multi_market @@ -199,7 +199,7 @@ Eventually, you would want to set up commerce data in Commerce Layer manually an 2. In the [Contentful dashboard](https://app.contentful.com), add the content for the new SKUs as a `Variant` and associate them with a `Product` content model. You can then go ahead to update other content models like `Taxon`, `Taxonomy`, and `Catalog` as you deem fit. -3. Ensure to read our [onboarding guide](https://docs.commercelayer.io/core/onboarding/guided-setup), [manual configuration guide](https://docs.commercelayer.io/core/onboarding/manual-configuration), or [data models documentation](https://docs.commercelayer.io/data-model) to learn more about how Commerce Layer works and the relationships between each API resource. +3. Ensure to read our [documentation](https://docs.commercelayer.io/) to learn more about how Commerce Layer works and the relationships between each API resource. > **Note** > diff --git a/solutions/commercelayer-slackbot/README.md b/solutions/commercelayer-slackbot/README.md index d153138..86582d1 100644 --- a/solutions/commercelayer-slackbot/README.md +++ b/solutions/commercelayer-slackbot/README.md @@ -90,7 +90,7 @@ The `/cl returns:today` command will return the total number of `requested` retu If for any reason you want to set up your own server (most likely because you want to contribute to this project), kindly follow the steps below. -1. Create a [Commerce Layer account](https://dashboard.commercelayer.io/sign_up), set up your organization, and create the required commerce data resources for your market. You can follow the [onboarding tutorial](https://docs.commercelayer.io/core/onboarding/guided-setup) or [manual configuration guide](https://docs.commercelayer.io/core/onboarding/manual-configuration) to achieve this. +1. Create a [Commerce Layer account](https://dashboard.commercelayer.io/sign_up), set up your organization, and create the required commerce data resources for your market. You can follow our [documentation](https://docs.commercelayer.io/) to learn more about how Commerce Layer works and the relationships between each API resource. 2. Create a demo Slack workspace and create a [new Slack app](https://api.slack.com/apps?new_app=1) (you can [read this Slack guide](https://docs.slack.dev/tools/bolt-js/tutorial/getting-started) to learn the basics of Slack applications).