Giter Site home page Giter Site logo

tagheuerhq / sfcc-ecom-poc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from salesforcecommercecloud/sfcc-sample-apps

0.0 1.0 0.0 24.58 MB

Salesforce Commerce Cloud Sample Apps

License: BSD 3-Clause "New" or "Revised" License

JavaScript 51.56% HTML 23.19% CSS 10.93% TypeScript 14.31%

sfcc-ecom-poc's Introduction

Commerce Storefront Sample Application · CircleCI

Our storefront sample application shows how you can build amazing commerce experiences with the latest Commerce platform technologies. The sample application helps developers get started by proving out a clear path to successfully build a storefront using our latest platform technologies, such as the Salesforce Commerce API and the Salesforce Commerce Node.js SDK.

The sample application shows an example implementation of some basic storefront use cases. The implementation helps development teams quickly understand how to use our latest platform technologies and begin their own journey of building commerce experiences. It contains examples for the homepage, product list page, product detail page, and cart. While this sample application demonstrates some of the Salesforce and Commerce Cloud technologies, it’s provided as a purely educational and instructional demonstration and not as a fully functional deployable reference storefront.

The application back end is built on the new Salesforce Commerce API (a RESTful headless API). The front end is built with Lightning Web Components (LWC). In between, it uses GraphQL and the Salesforce Commerce Node.js SDK. Read more about the sample application architecture.

Have more questions? See the Sample Application FAQ.

Prerequisites

  1. Download and install Node.js v12.
  2. Install yarn: npm install yarn -g

Setup

To set up the sample application:

  1. Clone the sfcc-sample-apps repository: git clone [email protected]:SalesforceCommerceCloud/sfcc-sample-apps.git

  2. Change into the sfcc-sample-apps folder: cd sfcc-sample-apps

  3. Copy the api.example.js file located at /packages/storefront-lwc/app/, save it as api.js, and make sure api.js is added to your .gitignore file.

  4. In the api.js file, provide values for the following variables:

VariableDescription
COMMERCE_CLIENT_API_SITE_IDUnique site ID (for example, RefArch or SiteGenesis).
COMMERCE_CLIENT_CLIENT_IDUnique ID used exclusively for API access. See Add a Client API for more information.
COMMERCE_CLIENT_REALM_IDUnique four-character realm ID (for example, bblx).
COMMERCE_CLIENT_INSTANCE_IDUnique instance ID within a realm (for example, 015 for an on-demand sandbox).
COMMERCE_CLIENT_SHORT_CODEUnique region-specific merchant ID (for example, staging-001).
COMMERCE_SESSION_SECRETUnique ID for session management (for example, thisisasecretkey).
COMMERCE_CORSOptionally enable CORS for GraphQL on the defined domains (for example, enable all domains with "\*").

Note: You can obtain these values from your Account Executive (AE) or Customer Support Manager (CSM), except for COMMERCE_SESSSION_SECRET, which is an arbitrary unique value that you create yourself. If the COMMERCE_SESSION_SECRET key is not unique per customer application, session information can be unintentionally shared between ecommerce sites.

  1. Install dependencies: yarn

  2. Build the sample application: yarn build

  3. Start the sample application: yarn start:dev (development mode) or yarn start (production mode)

  4. To access the application, open the browser to http://localhost:3000

You can optionally test the sample application: yarn test

Debug

We recommend Visual Studio Code inbuilt debugger to troubleshoot the code. The .vscode launch configuration is included in the repo. To debug using VSCode, see VS Code Debugging.

Configuration

  • You can change the logging levels by modifying the COMMERCE_LOG_LEVEL property in api.js. The supported log levels are:
    • TRACE
    • DEBUG
    • INFO
    • WARN
    • ERROR
    • SILENT
  • You can also change the server listening port by changing the port property in sfcc-sample-apps/packages/storefront-lwc/scripts/runtime.js.

Learn More About Supporting Technologies

Library of Components

The sample app currently includes the following components:

Contributing

Note: As of 06/30/20, the integration branch has been removed from the sfcc-sample-apps repository. We recommend that you delete your local integration branch, if you have one.

sfcc-ecom-poc's People

Contributors

abkap02 avatar echessman avatar coopaq avatar zsardone avatar syedshehrozhussain avatar blittle avatar anndiep-sfcc avatar gurpreetsainisalesforce avatar pdisabito avatar alex-clark-sfcc avatar jasonpob avatar p-mehta-sf avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.