Creating new applications
Use one of the IBM-provided Angular schematics to generate a new application and then access the application within Order Hub from a new menu item.

- The Sterling™ Order Management System system backend
- Sterling Intelligent Promising Inventory Visibility tenants
- Other micro service tenants
- Carbon UI libraries to design pages to have the same look and feel as existing pages in Order Hub.
Creating an Order Hub monorepo
This schematic creates a new monorepo by using Lerna and Single-Spa.
- Make sure that you extracted the Order Hub code. For more information, see Getting started with customizing Order Hub.
- Open a terminal and go to the Order Hub code directory.
- The default location is devtoolkit_docker/orderhub-code.
- Run the following command to set
strict-sslto false.npm config set "strict-ssl" false - Run one of the following commands to reinstall the latest version of
@buc/schematics to access the IBM-provided schematics. For Angular v18, run the following
command.
For Angular v20, run the following command.npm uninstall -g @buc/schematics npm install -g ./lib/buc/schematics/schematics-v4latest.tgznpm uninstall -g @buc/schematics npm install -g ./lib/buc/schematics/schematics-v5latest.tgz - Create a folder for your application. The name of the folder is the module name.
In the folder, create an app-config.json file that describes the routes in the
module. The value for "name" must be the module name. For example,
{ "name": "custom-monorepo", "devServerConfig": { "port": 9300, "contextRoot": "/custom-monorepo" }, "prodServerConfig": { "hostName": "static.omsbusinessusercontrols.ibm.com" }, "routes": { "custom-page1": { "devServerConfig": { "port": 9301, "contextRoot": "/custom-page1" } }, "custom-page2": { "devServerConfig": { "port": 9302, "contextRoot": "/custom-page2" } } } } - In the terminal, go to the folder that you created.
- Run the following command.
The schematic supports the following options.ng new --collection=@buc/schematics \ --app-config-json=<app-config.json-file-name> \ --module-short-name=<short-name-for-the-module> \ --prefix=<selector-prefix>- --skip-git: Do not initialize a GitHub repository. Default false.
- --commit: Initial git repository commit information. Default true.
- --app-config-json: This option is required. Use the app-config.json file that you created in step 5.
- --module-short-name: The short name for the module. If the module name has
dashes, then the short name must be the text after the last dash. For example, if the module name is
buc-app-settings, the module short name must be
settings.Note: The root-config package is generated based on the module-short-name. Do not rename or add a prefix to the module-short-name or you will not be able to deploy the customizations.
- --prefix: The HTML selector to use for generated components. Default: buc
- --shared-library-name: The name of the shared library. The default name is <module-short-name>-shared. The package name is @<prefix>/<module-short-name>-shared.
- --generate-root-config: Indicates whether to generate a root-config router project. Default true.
- --skip-install: Indicates whether to install packages. Default false.
For example:ng new --collection=@buc/schematics --app-config-json=app-config.json --module-short-name=monorepo --prefix=monorepoAfter the command completes, a success message appears: "Packages installed successfully."Note: If you encounter an error that is similar to the following message, you can safely ignore the error. These errors do not affect the icons that are used by Order Hub.Error: Failed to compile entry-point @carbon/icons-angular/
- Start the server.
yarn start-appNote: You see the following message."** Angular Live Development Server is listening on bucgenerichost:<port>, open your browser on https://localhost:<port>/<module>/<route> **"
You can ignore this message.Note: If you encounter an error similar to the following message, increase the heap size before you start the new application.Error command failed with exist code 134. lerna ERR! yarn run start .... exited 134
Run the following command and then start the new application.- Windows CMD prompt:
SET NODE_OPTIONS=--max_old_space_size=8048 - Bash/Git Bash:
export NODE_OPTIONS=--max_old_space_size=8048 - Powershell:
$Env:NODE_OPTIONS=--max_old_space_size=8048
Note: If you need to stop the server, stop the server job and run the yarn stop-app command to verify that everything is stopped properly. - Windows CMD prompt:
- If you want to test your customizations with a different OMS server than
the server that is configured in your Order Hub tenant, update the
<module-name>/packages/<route-name>/src/environments/environment.ts file
by adding the following information:
Whereimport { BucSvcAngularStaticAppInfoFacadeUtil } from '@buc/svc-angular'; // set url to the OMS app server // example url: https://mydomain.mycompany.com:9443/smcfs BucSvcAngularStaticAppInfoFacadeUtil.setLocalDevModeCustomizationTeamOMSUrl('https://<host>:<port>/smcfs');hostandportare the values of the OMS server's hostname and port number that you want to test.
Creating an Order Hub basic Angular repo
- Make sure that you extracted the Order Hub code. For more information, see Getting started with customizing Order Hub.
- Open a terminal and go to the Order Hub code directory.
- The default location is devtoolkit_docker/orderhub-code.
- Run the following command to set
strict-sslto false.npm config set "strict-ssl" false - Run one of the following commands to reinstall the latest version of
@buc/schematics to access the IBM-provided schematics. For Angular v18, run the following
command.
For Angular v20, run the following command.npm uninstall -g @buc/schematics npm install -g ./lib/buc/schematics/schematics-v4latest.tgznpm uninstall -g @buc/schematics npm install -g ./lib/buc/schematics/schematics-v5latest.tgz - Create a folder for your application. The name of the folder will be the module name. In the
folder, run the following command. The value for
--module-namemust be the module name.
The following options are supported by the schematic.ng new --collection=@buc/schematics \ --module-name=<name-of-the-module> \ --module-short-name=<the-short-name-for-the-module> \ --prefix=<selector-prefix>- --skip-git: Do not initialize a git repository. Default false.
- --commit: Initial GitHub repository commit information. Default true.
- --module-name: Required. The name of the module. For example, buc-app-settings.
- --module-short-name: The short name for the module. If the module name has dashes, then the short name must be the text after the last dash. For example, if the module name is buc-app-settings, the module short name must be settings.
- --prefix: The HTML selector to use for generated components. Default: buc
For example:ng new --collection=@buc/schematics --module-name=custom-angularrepo --module-short-name=angularrepo --prefix=angularrepoNote: If you encounter an error similar to the following message, then you can safely ignore the error. These errors do not affect the icons that are used by Order Hub.Error: Failed to compile entry-point @carbon/icons-angular/
- Start the server.
yarn start --host=bucgenerichostNote:- You see a
message:
You can ignore this message. Connect your Order Hub tenant to your local workstation to view your customizations. For more information, see Testing existing module customizations in Order Hub."** Angular Live Development Server is listening on bucgenerichost:<port>, open your browser on https://bucgenerichost:<port>/<module>/<route> **"
- You see a
message:
- Update the src/app/app.component.html file and add some text to display in
your application. For example, to add Hello, World!, use the following
code:
<div class="app-root-custom-angularrepo"> <div class="app-region-body"> <div class="app-body-content" *ngIf="isBucTenantChangeSuccess || isBucJwtRefreshSuccess"> <router-outlet></router-outlet> </div> <div *ngIf="isInitialState" class="app-loading"> <div ibmCol> <buc-loading [isActive]="isInitialState"></buc-loading> </div> </div> Hello World! </div> </div> - After you develop your application, configure Order Hub to connect to your server and load your new page within the user interface. For more information, see Testing new applications or routes in Order Hub
- To test your customizations with a different OMS server than the server
that is configured in your Order Hub tenant, update the
<module-name>/src/environments/environment.ts file by adding the following
information:
Whereimport { BucSvcAngularStaticAppInfoFacadeUtil } from '@buc/svc-angular'; // set url to the OMS app server // example url: https://mydomain.mycompany.com:9443/smcfs BucSvcAngularStaticAppInfoFacadeUtil.setLocalDevModeCustomizationTeamOMSUrl('https://<host>:<port>/smcfs');hostandportare the values of the OMS server's hostname and port number that you want to test.