This was a technological assesment to create a JavaScript application that allows the user to navigate photo albums.
As suggested I timeboxed this exercise to 4 hours, not including the quick UI design in Figma.
It uses the JSONPlaceholder for serving as the API.
I created a very minimal design in Figma (PhotoAlbum.fig) as a guideline for the design of the application.
I used create-react-app to bootstrap the application, therefore, the standard development process applies.
Install the dependencies using yarn
Running the app in development:
yarn start
This App is using the Redux Devtools Extension, so your development environment might not work.
If this is the case you should run the App in production
Running the app in production:
yarn build
then run
yarn run serve -s build
I only wrote a few tests for some actions and the reducer in this application.
To run these tests run:
yarn test
Some areas I would improve:
- The state object is currently flat and not nested per user.
- Move all common logic in the containers into a HOC.
- Implement more tests around the state managments and unit test components.
- Create an API enhancer to remove code duplication and provide more meaningful error messages.
- Extract environemnt specific configuration.