In this practical test, we build a simple CRUD application called 🍔 The Fridge. We use this application to see what we have in our fridge at a glance and when do they expire.
Please read the instructions properly before you proceed.
- React.js (Latest)
- SASS Stylesheets (scss)
- Axios http client
Each objective will be evaluated individually. Please use the given API endpoints below.
Develop the UI following the given 🎨 Figma design, using react functional components
, hooks
and scss stylesheets
for styles. (Please DO NOT use any third party component libraries or css libraries. write custom code)
https://www.figma.com/file/IPXZBpnc20QUbGcuiv1K9Z/TheFridge-React-Practical-Test
- List the items with details as pointed in the Figma design, once data completely fetched from API.
- Show a pre-loading message/spinner while fetching the List items from API.
- Show Total items count by counting the list items.
- Show
Expiring soon
label if Expiry date is due in one month. - Show
Expired
label if Expiry date is passed. - Show
Healthy
label if Expiry date is NOT due in less than one month.
- Add form functionality to add a New item to the fridge.
- Each added item should show on the items list without a page refresh.
- Add a date picker to the
Expiry date
input field. (You can use ANY datepicker)
Request
GET https://thefridge-api.karapincha.io/fridge
Request
POST https://thefridge-api.karapincha.io/fridge
Body
{
"title": "Lemon",
"expiry": "20/11/2040"
}
- Follow instructions
- Attention to design details
- Use of React best practices
- Use of SCSS best practices
- Code cleanliness and readability
- Your coding style and practices
- Write SCSS using BEM or your preferred style structure
- Better folder structure
- Unit tests
Once you are completed;
- Please commit the codebase to a Github repository.
- Include instructions to run the app locally in the readme
And email us the repository link.