Explore Storefront Next Code Locally

Explore Storefront Next locally without setting up a B2C Commerce instance or using Business Manager. This procedure uses the default configuration values for the demo instance and isn’t for creating your own storefront. Generate the storefront code via the command line using the predefined B2C Commerce demo instance.

  • Node Package Manager (pnpm) version 10.28 or later. See Installation on the pnpm site.
  • Node.js version 24.13.0 or later. See Download Node.js on the Node.js site.
  • The Storefront Next dependencies are specified in package.json. You install them in this quick start by using the pnpm install command.
  1. Create a folder for all your storefront projects and navigate to it.

  2. Discover the Storefront Next CLI commands available by typing this command.

    To learn more about each subcommand, type the -h or --help argument after the command.

  3. Create a Storefront Next project by typing this command in the new folder, and then answer the questions to configure your storefront.

    a. Provide a name for your storefront. For example, my-demo-storefront.

    b. For the Storefront Next UI template, select Salesforce B2C Commerce Retail Storefront.

    c. For the extensions, press Enter to accept the selected extensions.

    d. Accept the defaults for the SLAS client ID, organization ID, short code, and site ID. The default values reference the demo B2C Commerce instance.

    To use your own B2C Commerce instance, use Business Manager to create your storefront and related resources. See Create a Storefront in Business Manager or Create Storefront Next in Business Manager with a GitHub Repository. To create a SLAS client ID via the CLI, see Storefront Next in the B2C DX documentation on GitHub.

    The command creates a project folder under the current directory with your storefront name, and clones the template into it from the storefront-next-template GitHub repository.

  4. Open the project folder in an IDE.

  5. (Optional) Verify your configuration in the generated .env file. The default values connect to a demo B2C Commerce instance.

  6. In a terminal window, go to the storefront folder.

  7. Install Storefront Next project dependencies that are specified in package.json.

  8. Build the storefront.

  9. Run the development server.

  10. Open the development server URL shown in the output to view the storefront in the browser. For example, the URL with the default port is http://localhost:5173.