Skip to main content

Version: 21.11

Applicant Portal Configuration Overview

Applicant Portal 21.11 has a unique take on configuration. We encourage the use of TypeScript to write config definitions providing architects with better validation and error handling, while keeping configurations modular and making them extendable.

Our template comes with a set of configs that include default values for common use cases, so you don't need to start from scratch when creating your config files even if you are developing a new solution. Nevertheless, it can be helpful to have a high-level understanding of how the configurations are designed and implemented.

Keeping a well maintained configs folder will help you to keep your Applicant Portal easy to modify, easy to extend and easy to upgrade.

Structure and usage

transact-config.json is the root-level configuration file for specifying which configs and fixtures you want to use, in addition to providing configuration options for deployment and idleTime.

Let's review an example to see how the configuration works:

transact-config.json
{
"buildDir": "build",
"domainModelFile": "transact-schema.json",
"appDef": {
"name": "Workspaces",
"formCode": "workspaces",
"clientCode": "workspaces",
"configPath": "development",
"idleTime": 3600000,
"transactInsights": false,
"formVersion": {
"versionNumber": "21.11"
}
}
}

"configPath": "development" in this case specifies that src/configs/development is used for the configuration files and src/fixtures/development is used for the test data provided to the app in the development environment.

Spaces configuration

A Workspaces portal configured with the Applicant Space has just that one space. This is because the Applicant Space is targetted at a different audience (applicants and their representatives) to the other spaces supported by Workspaces (bank staff).

Inside each sub-folder under src/configs there is an index.ts that imports all the other files in the folder. This will import global and the applications space config.

src/configs/custom/index.ts
import global from './global';
import applications from './applications';

const spaces = [applications];

export default {
global,
spaces,
};

All exports are lowercase, representing the space id that's going to be used by global.ts in its spaces configuration. The global export is the only mandatory export. To learn more about config definitions, see Global Configuration and Current Space Configuration.

The applications space does not need to be imported using the name applications, but whatever name you use will be the name of the space in the app.

Once you have decided what config and fixture best suit your needs, it's time to copy them and create new folders called src/configs/custom and src/fixtures/custom, and import them inside src/index.ts. Your browser will reload, serving your new config.