Access the GitHub Repositories
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 AccountVijay 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.
- Create an account at http://github.com/join if you don't already have an account with github.com.
- Enable two-factor authentication for his GitHub account: https://help.github.com/articles/configuring-two-factor-authentication-via-a-totp-mobile-app/.
- Navigate to https://github.com/orgs/SalesforceCommerceCloud/sso.
- Follow the steps to log in via your Commerce Cloud Account Manager credentials.
- Access the Commerce Cloud GitHub repositories (login required).
Each user must have active/valid Account Manager credentials to authenticate.
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.
Optional or Required
||Is the foundation of SFRA. It contains the app_storefront_base cartridge and a modules cartridge that includes the server module.
||Includes the data for SFRA.
||Contains the command-line tools that compile the project and upload the cartridges.
||Builds the JSDoc for the project. You can extend the JSDoc to include the JSDoc for custom cartridges.
||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_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.
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.
- In GitHub, search for the first repository: storefront-reference-architecture.
- Click Clone or download to clone or download this repository to your local system.
- If you download the zip files:
- Create a new folder in your local machine.
- Move the zip file from the download folder to your new folder.
- Open each zip file.
- 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.
│ ├── app_storefront_base
│ └── modules
Vijay has everything he needs to get started on his local machine and on the server. Next, he installs and configures SFRA.