π Welcome to the Simbase Frontend Test Assignment!
Here is my submission All completed tasks are highlighted below with a β
- Fork this repository to get started, and share it with beikeni (Alessandro Baccini) when you're finished.
- This repository uses React + ReactRouter v6 + Typescript + Tailwind CSS, these tools are mandatory.
- Some components are built using HeadlessUI, you can continue using it or replace it with another Tailwind-based library of your choice.
- You can use whatever 3rd party library you want to achieve any of the tasks detailed below.
- This excercise uses the Cat API. You will need to sign up to get an API key.
- Consult the API Docs here. You will find a couple of endpoints already present in the app, but you will need to implement a couple more to complete the Favorites feature.
- Make sure to read this entire document before getting started, some bonus tasks might affect how you work on the main features.
- Before submitting the assignment write a brief explanation of your choices and any additional information you think is relevant.
![sample](https://private-user-images.githubusercontent.com/64857643/313762305-089211b5-c7b1-469a-941c-fd5dfe4132bb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3NDQ3MDcsIm5iZiI6MTcyMTc0NDQwNywicGF0aCI6Ii82NDg1NzY0My8zMTM3NjIzMDUtMDg5MjExYjUtYzdiMS00NjlhLTk0MWMtZmQ1ZGZlNDEzMmJiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIzVDE0MjAwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTljOGY3NDJjNGUyYmViZGRlMDg3MDA4NDhmMmQwY2EwM2M1MzA2OWZmNGVkMzg5NGMxYzE2OTNkOTMyOWFjOGMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.LYtGvMWecsQMFFnT2CZA62SoEh4aeEEtDC4-hwgvyXI)
The βFavoritesβ feature:
- β Allow users to toggle the favorite status on and off.
- β
The favorite status has to bee visible and toggleable from both the
Home
page and theFavorites
page. - β The favorite status has to be propagated to the API.
- β A confirmation modal has to be displayed when a user attempts to remove a favorite, only upon receiving this confirmation will the change be propagated to the API.
- β
If the user is on the
Favorites
page and the favorite status is removed from a picture, the list has to refresh without any further action.
The βLimitsβ feature:
- β A component of your choice has to be placed next to the dropdown allowing the user to select how many pictures to display.
- β The component can be a radio, a slider, or anything else that you think would offer a good user experience.
- β The list of cards should refresh immediately if the limit is updated.
The βDelete Cardβ feature:
- β
In the
Home
page the cards have an additional button marked with an βXβ. - β This button should remove the card on which it is on from the local state/cache.
- β Removing a card, similarly to removing a favorite, also should be confirmed via a confirmation modal.
- β
This feature should only be present on the
Home
page.
Data Fetching & State
- β Implement some form of caching, you can use the tool of your choice. Some options are react-query, zustand, redux-toolkit/rtk-query, or even React context.
Types
- β Introduce types across the application.
Components
- β
Create two confirmation modals on top of the
BaseModal
component:- β
Use one to confirm the deletion of a cat card from the
Home
page (local state). - β Use the other one to confirm the removal of a favorite (local state & API).
- β
Use one to confirm the deletion of a cat card from the
Style
- β
Style the
BaseModal
component. - β
Make the
Home
page and theFavorites
page responsive. (desktop + mobile) - β Make the card buttons responsive (heart and βxβ).
Code Quality
- β
Refactor the code of the
Home
page to be tidier and more readable.
Tip
We understand that some of these tasks can take up a lot of time. If a task is marked with a star, you have the option of explaining your approach in writing instead of implementing it.
- β
Implement generic types in the
BaseDropdown
component. - β Implement the confirmation modals so that they are rendered only when needed.
- Make the page multilingual (static elements only) β
- Explain your approach to accessibility β
- β Write automated tests (use the tooling of your choice) β
- β Deploy website via a CDN (ex. AWS Cloudfront) β
- β Any additional UX improvements will be counted as bonus. These can be things like highlighting important details, adding animations that help the user focus on the right element, adding hover states, etc..
At Simbase we try to walk the line between building solid products and delivering them within a reasonable time frame, always erring on the side of stability over speed of development.
We strive to write readable, modular, testable and well documented code that will make the life of those who will come after us (or ourselves 3 months later) easier. Through this assignment we hope to see how you can help us furthering this goal.
We normally don't encourage over-engineering, but if you wish to go overboard to illustrate how you would approach an issue in a production environment, by all means don't hold back.
Whether you're selected for the next stage or not, we'll provide feedback on your assignment. We're looking forward to seeing your work! π