Your task is to create a 2-page application
- display this component:
- automatically fetch rate when both sides of currency and source amount provided
- handle FX rate API response in different states (demo API is provided below)
- calculate and display the markup rate (1% markup) and fee using the following formula:
- when the source amount changes, recalculate the target amount
- click the icon in the middle to switch 2 currencies and re-fetch the rate
- click the "Submit" button to save the conversion data to the database
- make both amounts can be changed (automatically re-calculate another amount)
- if the target amount is provided, the fee is calculated using this formula:
- display this transaction record component:
- fetch data from the database and populate the table
- use TypeScript
- use React
- use any relational database
- use any Node.js framework to create API
- use this API to retrieve currency rates: https://openexchangerates.org/ (Note: This API provides rates with USD as the base currency, e.g., USD -> AUD. It does not allow changing the base currency. Therefore, you need to devise a solution using the available data to calculate the desired conversion rate.)
- keep the component as close to design as possible (blue1:
#33428E
, blue2:#012754
, button:#002854
, background:#F8F9FB
) (please find icons in assets folder) - use docker to containerize the app
- use MUI, Styled-components or Emotion
- use Nest.js to create your API
- write a couple of tests
-
Forking the Repository
-
Work on the code challenge
-
Once you have completed the code challenge and are ready to submit, make sure to commit and push all your changes to your forked repository
-
Send an email to j.dong@forexco.com.au to inform us that you have completed the code challenge. In your email, include the link to your forked repository on GitHub, allowing us to review your solution.