+ Documentation: `blueprint`, `drakov` (for creating a mock server), `npm` for easy initialize everything
+ Application: `angularjs 2`, `typescript`, `webpack` (for easy serving the document and parsing assets), `npm`
node version: v4.4.5
The use case says Display a scrollable list of all one million books. I think this is out of the scope because a list
1Mi elements printed raw on the DOM would make the app innaccesible for some devices due to the requirements to work
within this list (filter, sort .. etc ). The solution is either to implement infinite scrolling
which I think is overengineering this app, or using pagination which is the solution I choosed
So the solution is to provide a server which is able to perform this actions on a stable time ( improving end user experience)
As long as the test is for frontend Developer, I did not implemented any rocket science as backend but just wrote a small
blueprint document as API specifications ( so I am delivering also the contract which should follow the backend, easy to alignment between backend & frontend)
and mock the server straigh from this document. You can find further instructions on README located at docs folder
So as you said, I felt free to change the specifications, I did to deliver a better ready to use product.
In order to get started, you need to start mock server and then run http server to see the application
- go to docs
npm installgrunt defaultnode_modules/api-mock/bin/api-mock dist/latest.dist.apib --port 3000
you can also see the API contract reference on docs/dist/latest.html after runing grunt install
- go to application
npm installnpm start
This will start a web dev server on http://localhost:8080/ . Remember to start first mock server, without changing domain or port because it is hardcoded on application.
- dev ops infrastructure with docker, so no need to have node
- implement infinite scrolling instead of pagination
- deep check on scalfolding configurations
- align blueprint document with backend team
- improve test coverage
- upagrade/downgrade node to v4.4.5 LTS
- remove
node_modules npm install