Code Monkey home page Code Monkey logo

sfcc-react's Introduction

sfcc-react

sfcc-react is a React Native mobile application that uses Sales Force Commerce Cloud or SFCC (formerly Demandware) and their Open Commerce API (OCAPI) to read and write to an SFCC instance.

The app uses the Redux framework for global state management and redux-thunk for handling ASYNC action creation methods in order to make calls to OCAPI. This project was bootstrapped with Create React Native App.

Setup and Run

To run this app you need to setup a connection to your SFCC sandbox instance. This can be done by changing the settings in the appConfig.js file: SFCC-RN-Components/src/config/appConfig.js. There are 2 main exports from this file that define the current compile time settings for the app.

apiConfig

The apiConfig object literal that is exported from the appConfig.js configuration file contains the information needed for your app to make calls to your SFCC instance using OCAPI. All of the OCAPI config is contained in a property of the apiConfig export simply named 'OCAPI'. There are several properties to this object property that allow for different setups:

  • environment : An attribute with string properties for each type of instance setup (i.e.: production, staging, qa, development). Each of these environment attributes has a string property denoting if the app is to use live API calls to the SFCC instance for that environment setup, or if it should use mock API calls instead.
  • resources : This is where you define the resource calls that you will be accessing from the Open Commerce API, and the different types of parameters that will be accepted and/or required to make a specific API call for a resource.
  • baseEndpoints : Contains attributes for each type of environment which point to the corresponding URL for making OCAPI calls.
  • clientIDs: This attribute must be setup with a valid SFCC user ID that has been configured for OCAPI use. See the SFCC documentation for information on how to setup a user account for OCAPI access. Like the baseEndpoints, and environment attributes, this setup object also has attributes for describing the URL for each individual SFCC instance type.

Disclaimer

The repo is still in the setup phase and there is still a large amout of work left to do. Check back soon to see more.

Author: Galen Goforth -- [email protected]

sfcc-react's People

Contributors

ghgofort 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.