Next-generation platform

Setting up a local development instance


You can set up a local instance from the DTK to develop and customize the Sterling Store Engagement user interface to meet your business requirements.

The best way to develop an Angular 15-based application is to use Angular CLI when you are developing locally. After you develop a feature locally, you can deploy the application in developer toolkit or cloud environment.

Before you begin

Ensure that you have set up the UI middleware. Currently, you must download the middleware that is needed for the development of Sterling Store Engagement.

Procedure

  1. Download the latest developer toolkit.
  2. Browse to <runtime>/repository/eardata/isf/war/store-frontend-src and copy the Sterling Store Engagement source code.
  3. Paste the source code to a temporary directory. For example, <WORKSPACE>/store-frontend-src, which is referred to as <store_temp>. The package.json is present in <store_temp>. To manage your source code management, use <WORKSPACE>/store-frontend-src/extensions.
  4. Install the node module dependencies. Go to the <store-temp> folder, and run the following command:
    yarn bootstrap
  5. Modify the app-config-overrides.json file to pick routes that need to run locally (useRemote:false). By default, all routes run from a remote server. To run all routes locally, set serveAllAppsFromLocal:true
    For example, if you want app-shell, home, login, navigation-bar, and backroom-pick applications to run locally, the app-config-overrides.json file will look as shown.
    {
        "name": "store-frontend",
        "serveAllAppsFromLocal": false,
        "remoteServerConfig": {
            "hostName": "1.1.1.1",
            "port": 9080,
            "https": true
        },
        "routes": {
            "app-shell": {
                "useRemote": false
              },
              "login": {
                "useRemote": false
              },
              "nav-bar": {
                "useRemote": false
              },
              "home": {
                "useRemote": false
              },
              "backroom-pick": {
                "useRemote": false
              }
        }
    }
  6. Modify the app-config-overrides.json file to pick routes that need to run locally (useRemote:false). By default, all routes run from a remote server. To run all routes locally, set serveAllAppsFromLocal:true
  7. Testing your customizations.

What to do next

After all the micro-frontend applications are started, you can access Sterling Store Engagement by using the following URL:
http://localhost:9000/isf/store-frontend/index.html
Note: During development, if you Log in to a Store Inventory Management-enabled Sterling Store Engagement application from your local Sterling Store Engagement application, it is recommended that you launch the Google Chrome browser in the web security disabled mode. This is to ensure that your browser does not block any cross origin HTTP requests made to the Store Inventory Management server from your local Sterling Store Engagement application.
  • For windows, run the following command:
    chrome.exe --user-data-dir="C:\tmp" --disable-web-security
  • For Mac, run the following command:
    open /Applications/Google\ Chrome.app --args --disable-web-security --user-data-dir=/tmp