I decided to build the app with React, run the tests with Jest and use Webpack for module bundling. I considered using Redux for state management but decided it was overkill for a small app. The reason I chose React is because I'm confident building apps with it and I like the component-based UI. I used Jest as I wanted to try using its snapshot-based component testing.
I spent two days on this test and tried to prioritise my tasks. As such, the app is essentially CSS-less as I wanted to focus my efforts on the code. That being said, I would've liked to:
- Implement full CSS styling
- Add more than one unit test
- Utilise WebSocket responses to update the UI
- Fix a small bug with the dropdown search component
- Include loading spinners for ajax requests
- Learn Docker
Please make sure to have Node v6 or higher and Docker installed and running:
- Install dependencies:
npm install
- Spin up the Docker container:
docker-compose up
- Start the app (in a separate terminal window):
npm start
- Navigate to the following URL in the browser:
localhost:9090
- To run the unit test:
npm test