Space Configuration
Journey Applicants takes a bespoke approach to 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.
The example application 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 makes it easier for you to modify, extend and upgrade your Journey Applicants solution.
Structure and Usage
A Journey Applicants portal configured with the Applicants space has just that one space. This is because the Journey Applicants portal 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.
import global from './global';
import applications from './applications';
const spaces = [applications];
export default {
global,
spaces,
};
All exports are lowercase, representing the space id 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.