Start tracking your progress
Trailhead Home
Trailhead Home

Access the GitHub Repositories

Learning Objectives

After completing this unit, you’ll be able to:

  • Access the Salesforce B2C repositories on GitHub.
  • Describe the benefits of the Commerce Cloud Storefront Reference Architecture (SFRA).
  • Download or clone the SFRA repositories.

Get Ready For SFRA

Cloud Kicks, our growing high-end shoe retailer, uses SFRA for all development. Making full use of the latest ecommerce technology can help the company leap over the competition—sporting its stylish new shoe brand, of course. Vijay Lahiri, the Cloud Kicks developer, is excited to work with this product.

SFRA is a real working storefront that’s already set up using best practices in site design and storefront architecture. Using it saves Vijay—and Cloud Kicks—lots of time and resources. He doesn’t have to start from scratch and build the new storefront from the ground up. Instead, he can modify SFRA to meet his company’s needs.

Set Up GitHub Account

Vijay learns that he must use Commerce Cloud Account Manager to access the Commerce Cloud repository on GitHub. This simplifies user access management and provides a seamless SSO experience to all members in this Github org going forward. In this unit, Vijay sets up a GitHub account, learns which repositories are required for SFRA, and then downloads them.

Here are the steps to take.

  1. Create an account at http://github.com/join if you don't already have an account with github.com.
  2. Enable two-factor authentication for his GitHub account: https://help.github.com/articles/configuring-two-factor-authentication-via-a-totp-mobile-app/.
  3. Navigate to https://github.com/orgs/SalesforceCommerceCloud/sso.
  4. Follow the steps to log in via your Commerce Cloud Account Manager credentials.
    Log in to the Salesforce Commerce Cloud repository
  5. Access the Commerce Cloud GitHub repositories (login required).

Each user must have active/valid Account Manager credentials to authenticate.

Which Repositories?

Vijay is in the right place in GitHub to find and download the repositories he needs for SFRA.

Here are some of the repositories he needs.

Repository
Optional or Required
This repository...
storefront-reference-architecture
Required
Is the foundation of SFRA. It contains the app_storefront_base cartridge and a modules cartridge that includes the server module.
storefrontdata
Required
Includes the data for SFRA.
sgmf-scripts
Required
Contains the command-line tools that compile the project and upload the cartridges.
sfra-jsdoc
Optional
Builds the JSDoc for the project. You can extend the JSDoc to include the JSDoc for custom cartridges.
plugin-applepay
Optional
Is for Apple Pay.

Vijay sees the storefront-reference-architecture repository, which is the latest version of SFRA. There are other branches as well, which change as Salesforce develops new features. The SFRA Versions and Releases page in the Infocenter can help you find the right version.

You can install these feature cartridges at once with the All-in-One cartridge (plugin_cartridge_merge) in Business Manager Site Import/Export.

  • plugin-applepay: Apple Pay functionality
  • plugin_datadownload: General Data Protection Regulation (GDPR) related functionality
  • plugin_instorepickup: Buy-online-pick-up-in-store functionality
  • plugin_giftregistry: Gift registry functionality
  • plugin_productcompare: Functionality to compare various products
  • plugin_sitemap: Provides sitemap functionality
  • plugin_wishlist: Provides wishlist functionality

You must clone each of these cartridges individually into your environment. You must also update the entire cartridge path with all the installed cartridges (via Business Manager or cloned) into Business Manager (Administration > Sites > Manage Sites) as shown here.

plugin_cartridge_merge:plugin_datadownload:plugin_wishlists:plugin_giftregistry:lib_productlist:plugin_instorepickup:plugin_sitemap:plugin_applepay:plugin_productcompare:app_storefront_base

Download or Clone the SFRA Repositories

Vijay starts by downloading the required repositories listed in the table. He downloads the other repositories later.

Here’s how to clone or download repositories.

  1. In GitHub, search for the first repository: storefront-reference-architecture.
  2. Click Clone or download to clone or download this repository to your local system.
  3. If you download the zip files:
    1. Create a new folder in your local machine.
    2. Move the zip file from the download folder to your new folder.
    3. Open each zip file.
  4. Find the other required repositories in GitHub, then download and unzip them into the same folder.

By the way, it matters where you put the repositories on your local system. Download or clone them next to each other, as siblings, like in this example.

├── storefront-reference-architecture

├── cartridges

│ ├── app_storefront_base

│ └── modules

├── sfra-jsdoc

├── storefrontdata

├── plugin-applepay

Next Steps

Vijay has everything he needs to get started on his local machine and on the server. Next, he installs and configures SFRA.