Skip to main content

Frontend Services Configuration

This document provides an overview of the configuration settings for the frontend of OpenCDMP, based on their config.json file structure.

The following table's environment variables are defined inside the .env file of the Docker configuration. The frontend container reads them at runtime to populate its config.json, which drives the web application's behavior. If you want to see the full Docker configuration, you can navigate here.

Core Configuration

Env VariableDescriptionRequiredDefault ValueExample
WEBAPP_API_URLServer API URLYes-https://<hostname>:<port>/<api-path>/
INSTALLATION_URLInstallation base URLYes-https://<hostname>:<port>/
DEFAULT_CULTUREDefault app culture, in ISO639 formatYes-en

Keycloak Authentication

Env VariableDescriptionRequiredDefault ValueExample
KEYCLOAK_ADDRESSKeycloak server URL stringYes-https://<keycloak-hostname>:<port>
KEYCLOAK_REALMKeycloak realm nameYes-opencdmp
KEYCLOAK_CLIENT_IDKeycloak client nameYes-webapp
KEYCLOAK_SCOPEKeycloak scope parametersYes-openid <scope-value-1> <scope-value-2>

Logging

Env VariableDescriptionRequiredDefault ValueExample
LOGGING_ENABLEDBoolean value that enables logging serviceNofalsetrue

Overrides

You can also override config.json values via creating a new config-override.json file, which defines the values that will be overriden. config-override.json configured values are not mandatory and take precedence over other env variables. The file structure is as follows:

Notifications

"notification_service": {
"address": {NOTIFICATION_SERVICE_ADDRESS}
}
VariableDescriptionRequiredDefault ValueExample
addressNotification service URL stringNonullhttp://<hostname>:<port>/<path>

Annotations

"annotation_service": {
"address": {ANNOTATION_SERVICE_ADDRESS}
}
VariableDescriptionRequiredDefault ValueExample
addressAnnotation service URL stringNonullhttp://<hostname>:<port>/<path>

Logging

If LOGGING_ENABLED is true you can define the levels of the frontend logging.

"logging": {
"logLevels": {LOG_LEVELS}
}
VariableDescriptionRequiredDefault ValueExample
logLevelsarray of levelsNo["debug", "info", "warning", "error"]["debug"]

Default:

"sidebar": {
"infoItems": [
{
"title": "SIDE-BAR.SUPPORT",
"icon": "help",
"externalUrl": "/splash/contact.html",
"accessLevel": "unauthenticated"
}
],
"footerItems": [
{
"routerPath": "/about",
"title": "FOOTER.ABOUT",
"icon": "feedback",
"accessLevel": "public"
},
{
"routerPath": "/terms-and-conditions",
"title": "FOOTER.TERMS-OF-SERVICE",
"accessLevel": "public"
},
{
"routerPath": "/glossary",
"title": "FOOTER.GLOSSARY",
"accessLevel": "public"
},
{
"routerPath": "/user-guide",
"title": "FOOTER.GUIDE",
"accessLevel": "public"
},
{
"routerPath": "/contact-support",
"title": "FOOTER.CONTACT-SUPPORT",
"accessLevel": "authenticated"
}
]
}
VariableDescriptionRequiredDefault ValueExample
titlePage titleYes-page-title
routerPathInternal path to the pageYes*-/<relative-route>
externalUrlURL that leads to external viewYes**-http://<base-route>/<route>
accessLevelAccess level of users allowed to view pageYes-authenticated
iconSidebar menu material symbol icon that appears next to the titleNo-feedback

*Required if not using externalUrl **Required if not using routerPath

Authorization Providers

Authorization Providers are used to set an icon next to email in My Profile Page. You can set a default auth provider for all emails or a specific icon based on the email provider that comes from keycloak. If provider do not exist in keycloak, default provider is used.

Default:

"authProviders": {
"defaultAuthProvider": {
"name": "Default",
"providerClass": "defaultIcon"
},
"authProviders": [
{
"name": "google",
"providerClass": "googleIcon",
"cultures": ["en"]
},
{
"name": "facebook",
"providerClass": "facebookIcon",
"cultures": ["en"]
}
]
}
VariableDescriptionRequiredDefault ValueExample
nameprovider nameYes-google
providerClassstyle class to be appliedYes-googleIcon
cultureslist of supported cultures in ISO639 formatYes-["en"]

UserWay

UserWay is an accessibility plugin that OpenCDMP uses. More details here.

"userWay": {
"id": {USERWAY_ID}
}
VariableDescriptionRequiredDefault ValueExample
idString identifier provided by UserWay to enable the accessibility feature.No-<UserWay_id>

Theme

The application supports theme customization. A full explanation of all available theme values can be found in the theming guide.

"theme": {
"primaryColor": {PRIMARY_COLOR},
"cssOverride": {CSS_OVERRIDES}
}

See Also