The PWA Kit is a storefront technology for headless commerce using Salesforce Commerce APIs and React. It provides front-end developers with a more flexible and agile approach to build and maintain modern shopping experiences.
This repository is a monorepo that includes the code that powers the PWA Kit. The code is divided into the following packages:
pwa
: A set of sample code and tooling for PWA Kit projects called the Retail React Apppwa-kit-create-app
: A tool that generates PWA Kit projects based on the Retail React Apppwa-kit-react-sdk
: A set of components and utilities for PWA Kit projects
Node ^12.x or ^14.x
npm ^6.14.4
Behind the scenes, we're using Lerna to manage the monorepo. Lerna lets us install all dependencies and link all packages together with one command:
npm ci
Dependencies that are added to the package.json
at the root of the
repo are shared between packages. Dependencies listed in the
package.json
files within each individual package directory work as normal.
When you pull changes that include modifications to any package's dependencies, run npm ci
from the top-level directory (pwa-kit
). This command cleans and reinstalls all packages. Run this command frequently during development to ensure that you're using the same package versions as everyone else.
For more information, see the Lerna docs.
npm run lint
See the Localization README.md for important setup instructions for localization.
Run tests for all packages with:
cd [repo root]
npm test
Run integration tests against live APIs for all packages with:
cd [repo root]
npm run test:integration
The PWA Kit is licensed under a BSD 3-Clause license. See the license for details.
The full documentation for PWA Kit is hosted on the Commerce Cloud Developer Center.