A bank wants to launch 2 new credit card products, C1 and C2. To receive applications for the products the bank will collect the following detail about the applicant in a web-form or mobile app, which the bank provides:
- Name
- Address
- Email id
The submission of this form will be received by a Tradeledger API and sent over to a Thirdparty service for eligibility decisioning. The Thirdparty provides a RESTful api which responds with one of the following eligibilities:
- C1
- C2
- Both C1 and C2
- Neither C1 nor C2
The Tradeledger APIs should interface with the Thirdparty, sending an eligibility request and updating the user with the result of their application.
- Create React App (CRA)
- A Microservices with Spring Boot (2.2.3.RELEASE+)
- Build Automation Tool - Gradle (6.0.1+)
- Fork the repo to your own repository or setup provided .zip project into your own repository.
- Complete the exercise.
- Add TL-Recruitment Github user to read your repository and/or provide a link to your repo with the completed task
You should spend around ~1.5hrs on this task. You may spend longer if you wish, but ensure you think about which are the most critical pieces to complete first.
Open the project with IntelliJ or Eclipse or any other IDE of your choice
- Go To terminal.
- cd client/cards -- Browse to Directory i.e. client/cards
- npm i -- to install the app
- npm test -- to test the app
- npm start -- to run the app
- Go To terminal.
- cd server/cards --- Browse to Directory i.e. server/cards
- ./gradlew build -- to build the solution and third party
- ./gradlew test -- to unit/integration test the solution and third party
- ./gradlew bootRun -- to run the solution and third party applications simultaneously
- ./gradlew clean -- to clean the solution and third party
or alternatively you can use IDE's builtin plugin for Gradle for these Gradle goals
Note: Gradle version should be 6.0.1+
- For BE, in /server, build a synchronous Tradeledger API to orchestrate the journey from the application submission to retrieval of response. The API should call the provided Thirdparty endpoint over HTTP.
- For FE, in /client, implement a call to the API you've just built and display the results using the provided components.
Within /client/cards
the FE application is a simple CRA. You are provided with a simple form with inputs for name, email and address. You are required to implement the code to call the BE service and display the result.
Feel free to include any additional packages to implement, test and style the application.
BE stub is provided in /server/cards/tl-api
, this is setup to run a spring bootrun service on localhost:8080
.
There is also the third party service which is setup as a separate subproject within gradle in /server/cards/thirdparty
,
this exposes a third party service endpoint on localhost:3317
.
The structure of the com.tradeledger.cards
structure is just a suggestion, feel free to modify or structure
as you think is logical, makes sense and extendable in the future.
Request
POST /eligibility/check
{
"name": "String",
"email": "String",
"address": "String"
}
Response
{
"eligibleCards": "Array of C1, C2, BOTH or None"
}
- The bank believes that the products would be extremely popular and around 1 million requests will be received in the first hour, tailing off from there
- The Thirdparty might take up to 10secs to respond to the request
- The processed applications and results need to be stored for up to 7 years for audit purposes