Overview
Polaris is a repository created by Shopify that aims to shape the merchant experience for Shopify’s core product, the admin. This repository includes NPM packages, VSCode extensions, and websites. Polaris focuses on enhancing the user experience and providing a consistent design language for merchants using Shopify.
Features
- Monorepo: Polaris is an intergalactic monorepo that consists of NPM packages, VSCode extensions, and websites.
- Command Line Interface: Polaris provides a CLI tool that allows you to install dependencies, build workspaces, and run commands.
- React Component Storybook: Polaris offers a command
yarn turbo run dev --filter=@shopify/polaris
that opens the React component storybook, allowing you to easily develop and test components. - NextJS Site: Polaris also provides a command
yarn turbo run dev --filter=polaris.shopify.com
that opens the Polaris shopify.com NextJS site, allowing you to preview and work with the site. - Contribution: Polaris welcomes contributions through pull requests. You can refer to the contribution guidelines for more information.
- Licensing: The source code of Polaris is under a custom license based on MIT. Usage of Polaris is restricted to applications that integrate or interoperate with Shopify software or services, with additional restrictions for external, stand-alone applications. All icons and images are licensed under the Polaris Design Guidelines License Agreement.
Installation
To install Polaris, follow these steps:
- Clone the Polaris repository from GitHub.
- Install the required dependencies by running the command:
yarn install
- Build the workspaces by running the command:
yarn turbo build
- You can now use the various commands provided by Polaris, such as the React component storybook command:
yarn turbo run dev --filter=@shopify/polaris
Or the NextJS site command:
yarn turbo run dev --filter=polaris.shopify.com
Summary
Polaris is a comprehensive repository created by Shopify to improve the merchant experience for their core product, the admin. It offers a range of features including a monorepo structure, a CLI tool for managing dependencies and running commands, a React component storybook for developing and testing components, and a NextJS site for previewing and working with the Polaris shopify.com site. Polaris welcomes contributions and is available under a custom license that allows usage within Shopify software and services.