Mailchimp Developer LogoMailchimp Developer Wordmark

Fundamentals

The basics

Mailchimp Open Commerce is an API-first, modular commerce stack. The API implements all features in GraphQL and is fully extensible via plugins.

Open Commerce is open-source-licensed, freely available software. You can explore the platform’s repos on GitHub, or follow the Quick Start guide to install the development platform on your computer. If you’re interested in contributing to Open Commerce, be sure to read and follow the code of conduct and check out the community resources.

Previous versions of the Reaction Commerce docs are archived on GitHub.

Using Open Commerce

Whether you’re a business owner running a shop or a developer setting up a custom implementation, it’s easy to get a shop up and running with the Open Commerce development platform and build from there.

Every shop is built around a catalog of products. You can set up your products in the admin dashboard and then organize them with tags to help shoppers navigate your catalog. Once shoppers have found what they want and make a purchase, you’ll fulfill their orders by accepting payments and delivering their items.

Developers can customize any part of the administrator or shopper experience by manipulating existing plugins and environment variables or by writing their own plugins. Because Open Commerce is fully modular, you’ll often want to share code between plugins so features are available across the entire platform. If you’ve created a new plugin or modified an existing one and you want to share it with other developers, you can contribute to the Open Commerce community. When committing to existing Open Commerce repos, you should follow the testing requirements.

Open Commerce vs Reaction Commerce

Open Commerce was formerly known as Reaction Commerce. You may see references to Reaction throughout the guides and docs, especially in code—all Open Commerce repos are under the reactioncommerce GitHub organization.

As we continue the renaming process, we’ll announce any future breaking changes in the release notes.

Local GraphQL playground

One of the development platform services is a local instance of the GraphQL playground. When using the playground, some queries—such as ping—don't require authentication, but many others do. Running them without authenticating will return an error or incorrect results. 

For example, if you try to retrieve the viewer’s email address without authenticating, you will receive a null result:

Unauthenticated request

GraphQL
{
  viewer {
    emailRecords {
      address
    }
  }
}
{
  "data": {
    "viewer": null
  }
}

To authenticate, you need an access token based on the SHA256 hash of your account password. To get that hash, open a terminal window and run echo -n "YOUR_PASSWORD" | shasum -a 256. Then pass the hash in the authenticate mutation to generate the access token:

Authenticate mutation

GraphQL
    mutation {
      authenticate(serviceName: "password", params: { user: { email: "YOUR_EMAIL_ADDRESS"}, password: "YOUR_HASHED_PASSWORD" }) {
        tokens {
          accessToken
        }
      }
    }

Click HTTP HEADERS at the bottom of the playground and add the access token as the value of "Authorization" in the header JSON object. Now you should be able to perform queries and mutations that require authentication.

Community

Open Commerce has a global team of contributors to its projects on GitHub. New contributors are always welcome, and they should read and abide by the code of conduct.

If you have questions about implementing Open Commerce, customizing code for your own purposes, or contributing to a project, check out the Discord server. For bug reports and feature requests, you can create a new issue directly in the appropriate repo.

For more information on getting your code ready to commit, check out the ESLint configuration project, and Contributing to Open Commerce, Testing Requirements, and Git Formatting Conventions.