4.2.5 Set up application settings
The next step is to configure some functional application settings. Some of these settings can be changed later, others must be configured now during installation and cannot be changed in production.
You will be referring to the 5. config: Applications Settings Excel sheet that would have been prepared in section 2: Gather requirements.
1. Prepare global functional settings
Prepare your src/api/applcation/application-config.ts source file. This is a Typescript file that is loaded in the application via an API explained in section 4.2.9 Countryconfig APIs explained.
Using our application-config.ts file as an example, update the settings according to your needs.
You can call your instance of OpenCRVS anything you like, such as "Farajaland CR"
DEPRECATED: The code remains to support the transition of existing countries still using previous versions. Fees and certificates are now customisable in a dedicated endpoint.
DEPRECATED: The code remains to support the transition of existing countries still using previous versions. Fees and certificates are now customisable in a dedicated endpoint.
Default timezone for the country. Basis for date and time calculations during searches: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
🏛️ In section 4.2.2 you had to configure admin levels for our standardised address Hierarchy Levels. This property must be completed with the ids and labels to be used in a form FieldType.ADDRESS component below. They are required fields. Optional fields will appear below these selects. The label prop, and further details around localisation are explained in the next section: 4.2.5.1 Managing language content
Related to the above, here is an example screenshot of standardised address Hierarchy Level selects:

DEPRECATED: The code remains to support the transition of existing countries still using previous versions. Fees and certificates are now customisable in a dedicated endpoint.
Fees due for collection and correction of certificates are calculated and displayed according to this value.
This is a regular expression to evaluate if a supplied phone number minus country code is valid.
If you configure your form to include a field to capture a user's National ID number, then this regular expression can evaluate if the string is valid.
If you look at the top of the file, you can see that this refers to a property that imports a copy of your country logo as a base64 image. Do not change this property but instead, locate your official logo/crest, convert it to base64 and you can replace our logo [here](https://github.com/opencrvs/opencrvs-countryconfig/blob/develop/src/api/application/country-logo.ts).
You can set the background of the login page to be a color of choice. You can always use the UI to change this color later, or use a tiled or full screen image.
Other available properties are:
DEPRECATED: The code remains to support the transition of existing countries still using previous versions. Performance ahanlytics are now entirely configurable in Metabase.
DEPRECATED: The code remains to support the transition of existing countries still using previous versions. Performance ahanlytics are now entirely configurable in Metabase.
DEPRECATED: The code remains to support the transition of existing countries still using previous versions. User notifications will use email as a delivery method by default but this can be configured. There does not have to be a universal method of delivery in practice.
DEPRECATED: The code remains to support the transition of existing countries still using previous versions. Informant notifications will use email as a delivery method by default but this can be configured. There does not have to be a universal method of delivery in practice.
This cannot be amended later in the UI and must be configured here. You will notice this separate property used by an API handler called by our analytics services. Whereas countries generally have crude birth rate ratios per area in their stastics, they tend to have a country-wide crude death rate. You can set this here in order to correctly calculate death registration completeness rates.
The National System Administrator can create new employees. In the create user forms, the requirement to add a transparent PNG signature for certain employee roles, so that the signature can appear on the certificate can be configured here.
This relates to the "Quick search" feature in the search bar. Availbale options for the default value in the select are:
Example screenshot for above:

The following features can be enabled on and off in this block. We refer to this block as "Feature flags
This cannot be amended later in the UI and must be configured here. In some countries, individuals do not know their date of birth. If you wish to enable that individuals are allowed to submit their ages in your declaration forms rather than a date of birth, set this to true. Please note that those individuals will have their days and months of birth automatically set to the 1st January in the system in that case.
DEPRECATED: Any event, and its associated availability, is now configurable.
DEPRECATED: Any event, and its associated availability, is now configurable.
DEPRECATED: A Field.Type.ALPHA_PRINT_BUTTON can now be added to enable printing any SVG "template" from any page of the form.
DEPRECATED: Signatures are now entierly configurable on any field on the form.
This prop controls the visibility of a workqueue that you can use for asynchronous integration with an external system at the point of registration via APIs. As an example, we use this for MOSIP asynchronous generation of a National ID.
2. Prepare javascript initialisation settings
The OpenCRVS Core Login application loads the following config js files before connecting to the OpenCRVS backend to serve all the content. The Login app has not communicated with the backend yet and needs to know how to access it
Login app - localhost development: login-config.js
As you can see, the React Login application uses the URL values to understand how to connect to backend services such as the login authentication API and the country configuration API. Do not edit the URLs.
You must set some values:
COUNTRY: Set the Alpha 3 country code to be the same as the value you used when importing the set up files in step 3.2.5. The Login app needs to convert users phone numbers into MSISDN numbers using an Alpha 3 country code in case the user forgets their login details and requires an SMS reset.
LANGUAGES: This property allows you to customise the global language options. This value is a comma separated string of ISO 639-1 language codes for every translation you wish to set up in step 3.2.5.1 Managing language content.
For example, if you wanted to support Spanish and English, with Spanish being the default this string should be:
Login app - server: login-config.prod.js
As you can see, the server config file contains the same settings.
You may notice that localhost is replaced by your domain name dynamically in handlebars. Do not edit the URLs. We have taken care of this substitution for you in step 3.3.5 Deploy
You must set the COUNTRY & LANGUAGES values only.
Client app - localhost development: client-config.js
Following the same process as you did for the local development Login app config file, you must set the COUNTRY & LANGUAGES values, and can optionally change the menu item titles for each of the available analytics dashboards configurable via Metabase.
Client app - server: client-config.prod.js
Following the same process as you did for the production Login app config file, you must set the COUNTRY & LANGUAGES values.
Last updated