Vue StoreFront commercetools rest integration

Disclaimer: This project is still in beta phase.

This repository is a vue storefront commercetools integration for the REST API

The main goal of the repository is to extend the offical commercetools integration with REST capabilities that are not possible with the GraphQL API.

These capabilities are:

This repository is a monorepo containing three projects:

  • api-client - communicates with commercetools backend;
  • composables - exposes composable functions used to retrieve data using api-client;
  • theme - nuxt project that glues everything together. It extends our core theme and uses composables to retrieve data. For this particular integration, only sample code for the use of composables is provided.

How to start?

  1. Install all required dependencies:
yarn install
  1. (optional) Then you can verify if everything works properly by building all three projects:
yarn build
  1. If everything built properly, you can run the code with:
yarn dev

How to use?

  1. Create a vue storefront commercetools integration project. Documentation

  2. Install the dependency

yarn add @vsf-devgurus/vsf-ct-rest-integration
  1. Configure the integration in the middleware.config.js file
ctRest: {
      location: "@vsf-devgurus/vsf-ct-rest-integration-api/server",
      configuration: {
        api: {
          uri: "https://api.us-central1.gcp.commercetools.com",
          authHost: "https://auth.us-central1.gcp.commercetools.com",
          projectKey: <project-key>,
          clientId: <client-id>,
          clientSecret: <client-secret>,
          scopes: <client-scopes>
        }
      }
    }
  1. Use the composables exposed