Quick Start
This guide features streamlined instructions for experienced Node.js developers who want to get started with PWA Kit immediately using a demo storefront and a demo sandbox for the back end.
- Node.js 18+ and npm 9+.
- Apple silicon users: If you haven’t installed Rosetta already, run
softwareupdate --install-rosetta
.
For detailed setup instructions, see Set Up Your Local Environment.
To create a project using the Retail React App template and connect the project to the demo sandbox, open a terminal and run either of the below commands.
For version 3.0.0 or later of PWA Kit, use the @salesforce scoped packages as shown below. To install a specific version of the Retail React App, use the --templateVersion argument with your chosen version number, such as 1.0.0
, in this example. See the Retail React App Changelog for template versions.
For a version of PWA Kit earlier than 3.0.0, use the unscoped pwa-kit-create-app package as shown below. To install a specific version of the Retail React App, replace latest
with a version number, such as 2.7.3
, in this example.
For a version of PWA Kit earlier than 3.0.0, if you don’t specify a version of the Retail React App, you can get unexpected results due to caching of old versions.
The project generator script will create a folder in a directory called pwa-kit-starter-project
. Open this folder in your text editor and start exploring!
To start your local web server run the following commands:
Now that the development server is running, you can open a browser and preview your storefront:
- Go to http://localhost:3000/
Changes made to your project files will be visible in your browser when you refresh.
To continue getting started with PWA Kit, choose one of the following guides based on your project status:
Guide | Project Status |
---|---|
Create an On-Demand Sandbox | No B2C Commerce instances created for development and testing. |
Set Up API Access | At least one B2C Commerce instance created. |
Set Up Your Local Environment | At least one B2C Commerce instance created and configured for API access. |
Push and Deploy Bundles | Local environment setup complete. |