When you have completed the assignment, please name the file in accordance with this naming pattern: [YOUR FULL NAME]-Assignment for [NAME OF THE ROLE THE ASSIGNMENT IS FOR] and upload it to **this dropbox.**

This exercise is estimated to take about two (2) hours to complete, though you may choose to spend as much time as you'd like. We do expect a usable backend program. That means assumptions and compromises will have to be made, please document these in the README. Also think about how your program maybe improved in the future. The assessment will be scored based on the following criteria: coding style, functionality, testability and creativity.

The Exercise:

Suppose you have $50,000 in cash, your goal is to develop a REST API backend that can recommend headphones you should buy on Head-Fi, with the pure interest of selling them in the future to make money. You need to consider how to invest your money to maximise your profit. (Friendly reminder: you might want to consider the pricing trend of second-hand headphones)

The requirements are:

  1. A JSON dataset from Head-Fi's trading forum has been crawled for you, you can download it using this link. You should parse and analyse this dataset and extract key information as the basis of your solution. You can use memory, local storage or databases to store your processed data.
  2. You backend needs to provide a GET route /recommend where it needs to return an array of recommended "For Sale" threads to buy headphones from. Your recommendation algorithm should be based on data provided in step 1, and the result sorted by descending profitability. Profitability can be defined as how likely and how much you will be making a profit by buying and reselling a headphone.
  3. You must have a file that explains:
  4. Our preference is for you to use Javascript/Typescript to implement the solution using the MERN stack.