- Clone the repo to your machine.
npm install- Run
npm start - Open a new terminal window and run
npm run server - Open
localhost:3000in a browser to see the front end of the app. localhost:3001is the API.
We ask all candidates for Innovation Labs team to complete a homework as part of the interview process. We expect the candidates to spend about 4-6 hours on the assignment but it’s completely up to you. Spend as much or as little as you’d like that can really show off your skills. During your on-site interview, one of the sessions will consist of you presenting this homework, how you solved the problem, trade offs you made, any limitations, etc. so be ready to talk through it.
We want you to build a web application to maintain and visualize an artificial portfolio containing a subset of 100 possible stocks (From S&P 500) for the user to buy and sell from the year 2017 given a starting budget of $100,000. To make this easier the user can pick a single day to buy all of their stocks and a single day to sell all of their stocks given their budget.
While we are leaving this fairly open ended there are some rough base requirements we’d expect any solution to have:
- A user can pick a start date to buy all of their stocks and the amount of each stock to buy. For example on Jan 3 2017 I could buy 100 shares of GOOG and 200 shares of APPL. Same for selling their stocks.
- A user can visualize how their portfolio performed over the input timeframe (2017)
- A user can add as many shares of as many stocks as they would like, so long as they stay under the starting budget
- The user should be able to update any of the above inputs and recalculate the results. These inputs should be persisted should the user return to the page at a later time.
- A way to look at an individual (or group of) stock and see how they perform over the year.
- Allow users to buy and sell individual amounts of stocks on arbitrary dates (given budget constraint).
- Internationalization and localization
- Accessibility
- Anything else you can think of! :)
- Authentication, assume the user that “loads” the app is logged in. We don't need to see you reinvent OAuth2.
Please reach out to your recruiter and we'll get a turn around to your questions as fast as we can.
npm installnpm run startwill start Create React App on 3000npm run serverwill start json-server on 3001
We have loaded in the stock data into the server under 'stockPrices' and the empty portfolio under 'portfolio'.
- http://localhost:3001/stockPrices - will give you all the data
- http://localhost:3001/stockPrices?date=1/5/17 - will filter by date
It also supports full CRUD operations, see the json-server documentation for more options.