Bunny Test - 5h1rU/bunnytest GitHub Wiki
Start Date: 2018-09-26
Summary
This is the RFC related with the test for Head of Engineering position. The information below describes how the development process was done.
Motivation
I decide to make this test because I'm sure my experience would be beneficial for Bunny Inc. Besides the idea of work with you is an incentive and I hope you like this solution.
Further questions don't hesitate in contact me [email protected]
Detailed design
The main idea is to generate an application with three main points.
- Fetch Data from Torre Bio API.
- Fetch Data from LinkedIn API.
- Compare and merge where is possible both results.
Due to the restriction of time to perform the test, the selection of technologies stack was the most important point.
I decided to use React-Create-App CLI, this tool generate all the scaffolding and initial set up to run a project saving a lot of time, a pretty good option for move forward a quick project.
Taking a look at https://torre.bio is evident the use of Material Design approach, so Material UI is part of the toolchain of this project and the principal source of UI.
I'm a big fan of CSS-in-JS approach, that's why react-jss is part of the project. You don't need to think on how your CSS will be split or structured, this responsibility is part of the Componentization of the project, controlled by another concern (described below).
React as a library for build UI allow building applications in a compositional style, you can find across the source code patterns like composition over inheritance, DRY, single responsibility among others.
Each section of the app is a component built by others components, consuming external resources (torre.bio, LinkedIn) from the parent and hydrating the UI each time any of the main points mentioned above is triggered.
The project is currently deployed at https://netlify.com a service pretty straightforward to use, working out of the box with zero configs.
Last but not least GitHub was the repository chosen due to popularity.
Drawbacks
LinkedIn API: A big blocker was found here in order to complete the test with better results, unfortunately, if I want to have full access to the LinkedIn profile I need to ask for a permission to linkedin.com be a member of the partner program and wait around 15 business days to get the permission.
Comparing with torre.bio info you only can get public information from LinkedIn with the next fields; name, professionalHeadline, and picture.
CORS: Server doesn't have active the option and is not allowed consume data from external sources. This is not related to a browser bug or related to any different problem. Is a permission backend restriction.
Alternatives
LinkedIn API:
The use of the option called r_fullprofile on LinkedIn API is the only way to get full information from the user. More information: https://stackoverflow.com/questions/31508923/how-to-get-linkedin-r-fullprofile-access
CORS:
Add "Access-Control-Allow-Origin" to sources. More information https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS https://enable-cors.org/server.html