- Nodejs(v14+)
- Kafka
- Informix
- Java 1.8
Configuration is at config/default.js.
The following parameters can be set in config files or in env variables:
PORT: port number the health check dropin listening onLOG_LEVEL: the log levelKAFKA_URL: comma separated Kafka hostsKAFKA_CLIENT_CERT: Kafka connection certificate, optional; if not provided, then SSL connection is not used, direct insecure connection is used; if provided, it can be either path to certificate file or certificate contentKAFKA_CLIENT_CERT_KEY: Kafka connection private key, optional; if not provided, then SSL connection is not used, direct insecure connection is used; if provided, it can be either path to private key file or private key contentKAFKA_GROUP_ID: the Kafka group idMEMBER_API_URL: the member api urlSTANDARD_TERMS_ID: The Topcoder standard terms idNDA_TERMS_ID: The NDA terms idPROFILE_UPDATE_EVENT_COUNTRY_FIELD_NAME: The name of the field which corresponds to country value in the message generated by update profile event; default value ispayload.competitionCountryCodeTERMS_USER_AGREEMENT_TOPIC: The kafka topic on which the processor will listen to terms agreement eventsUSER_TAXFORM_UPDATE_TOPIC: The Kafka topic to which to listen to user tax form updated eventsUPDATE_MEMBER_PROFILE_TOPIC: Topic for receiving member profile update eventsCREATE_MEMBER_PROFILE_TRAIT_TOPIC: Topic for receiving member profile trait creation eventsUPDATE_MEMBER_PROFILE_TRAIT_TOPIC: Topic for receiving member profile trait update eventsDELETE_MEMBER_PROFILE_TRAIT_TOPIC: Topic for receiving member profile trait removal eventsUPDATE_PROFILE_PICTURE_TOPIC: Topic for receiving update profile picture eventsauth0.AUTH0_URL: Auth0 URL, used to get TC M2M tokenauth0.AUTH0_AUDIENCE: Auth0 audience, used to get TC M2M tokenauth0.AUTH0_CLIENT_ID: Auth0 client id, used to get TC M2M tokenauth0.AUTH0_CLIENT_SECRET: Auth0 client secret, used to get TC M2M tokenauth0.AUTH0_PROXY_SERVER_URL: Proxy Auth0 URL, used to get TC M2M tokenauth0.TOKEN_CACHE_TIME: Auth0 token cache time, used to get TC M2M tokenPAYMENT_METHODS_PROCESSOR_CRON_EXPRESSION: The cron expression for the user payment methods processor, default value is* * * * *(every minutes, used for development only)MODIFIED_PAYMENT_METHODS_TIMEFRAME_DAYS: The timeframe expressed in days for which to get the updated user payment methods from informix database, default value is 3 which means that when the job runs it will get the user payment methods records modified in the last 3 days- INFORMIX: This configuration object contains the configuration parameters for Informix database connection, the confguration parameters defined in this object are self-explanatory, for more details refer to
config/default.js ID_VERIFICATION_PROCESSOR_CRON_EXPRESSION: The cron expression for the id verification processor, default value is* * * * *(every minutes, used for development only)PAUSE_ID_VERIFICATION: If this value is true then while the job is running, check if it is true, if so just log the log message The id verification is currently pausedFETCH_LOOKER_VERIFIED_MEMBER_TIMEFRAME_DAYS: The timeframe expressed in days for which to fetch looker api, default value is 3 which means that when the job runs it will get the id verification records in the last 3 days- lookerConfig: This configuration object contains the configuration parameters for looker api, for more details refer to
config/default.js
-
Navigate to the directory
local -
Run the following command
docker-compose up -d
This will setup both Kafka and Informix database with Topcoder databases all set
-
Make sure to use Node v14+ by command
node -v. We recommend using NVM to quickly switch to the right version:nvm use
-
From the project root directory, run the following command to install the dependencies
npm install
-
To run linters if required
npm run lint
To fix possible lint errors:
npm run lint:fix
-
Local config
In the
onboarding-processorroot directory create.envfile with the next environment variables. Values for Auth0 config should be shared with you on the forum.# Auth0 config AUTH0_URL= AUTH0_AUDIENCE= AUTH0_CLIENT_ID= AUTH0_CLIENT_SECRET= AUTH0_PROXY_SERVER_URL=- Values from this file would be automatically used by many
npmcommands. ⚠️ Never commit this file or its copy to the repository!
- Values from this file would be automatically used by many
-
Start the processor and health check dropin
npm start
-
Run unit tests
npm run test npm run test:cov
To run the processor using docker, follow the below steps
-
Navigate to the directory
docker -
Rename the file
sample.api.envtoapi.env -
Set the required configuration parameters in the file
api.env.Note that you can also add other variables to
api.env, with<key>=<value>format per line. -
Once that is done, run the following command
docker-compose up
-
When you are running the application for the first time, It will take some time initially to download the image and install the dependencies