This is my response to the technical test. The specification of the test are not public and are pretty specific to the organisation. So I've decided not to reproduce them here.
Note: I've also published a version with a Node/Express/TypeScript backend, which can be found here.
- .Net Core 5 (download)
- Clone repo to your local machine
- Run the following in the root of your local working copy of the git repo
cd App
dotnet restore
dotnet run
Note: This will take some time the first time as it will do a npm install
for the React front-end. It does not provide
any feedback while this is done so it looks like it has hung.
When done you should see something like this:
!
In your browser,, go to http://localhost:5000
To query the backend service directly browse to:
- https://localhost:5001/Companies
- https://localhost:5001/Companies?includePrices=false
- https://localhost:5001/Companies?includePrices=true
The solution consists of a .Net Core backend service that exposes the /companies
endpoint which returns a list of
companies (with or without prices). It also serves a React/Typescript frontend.
The backend service doesn't have much logic. So I went with simple architecture, (YAGNI). Instead, choosing to spend more time on the front-end. Also I plan to port the backend to Node/TypeScript.
For the frontend, I used material-ui as and nivo.
The backend service didn't include a huge amount of logic. So I limited testing to:
- A couple of tests that were more integration tests, in that they tested the endpoint, all the way through to querying the DB provided
- Some supporting unit tests that tested some specific logic (e.g. calculating standard deviation for volatility)
Note: I could have invested more in the testing here, but decided to pause with what I had in order to pivot to replacing the C# backend with a Node/TypeScript one.
I would not be as unilateral in a real-life situation but instead more collaborative with the product managers and designers. But lacking easy access to either, here is a list of things I think I have and/or maybe strayed from the specs.
There is an overall total score, which I have used for sorting. But the docs linked too also show a radar chart, so I've chosen to do the same.
The specifications have:
By price fluctuations or volatility in price within the last 90 days
Unlike a company’s overall snowflake score, there were no explicit details on "fluctuation" or "volatility". Based on some Googling, I decided to use standard deviation.
Also, the price data in the database image provided was a year old. Hence, if I were to limit to "90 days", there would be no price data for any companies. So I left out filtering the data to the last 90 days.
The specifications also said the results in the frontend should be sortable by volatility. However, it did not list volatility as one of the bits of data that should be displayed. So I’ve added the sorting to the “Price” column but sorted by the “volatility” metric.
If I had more time, I would have added a “volatility” column along with a chart showing the volatility and then sorted by that, much like I’ve done for the “Score” column.