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)
- TailwindCSS
- 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 and scss stylesheets for styles. (Please DO NOT use any third party component libraries or css libraries. write custom code. You can use TailwindCSS for utility classes)
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 soonlabel if Expiry date is due in one month. - Show
Expiredlabel if Expiry date is passed. - Show
Healthylabel 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 dateinput field. (You can use ANY datepicker)
- Add List item delete functionality.
- Show an alert confirmation window before deleting an item. (You can use your imagination for the confirmation window design)
- The deleted item should immediately remove from the shown list without a page refresh.
- When clicked on each item, load the data to the form input fields and, add the item modification functionality.
Request
GET https://thefridge-api.karapincha.io/fridge
Request
POST https://thefridge-api.karapincha.io/fridge
Body
{
"title": "Lemon",
"expiry": "20/11/2040"
}
Request
GET https://thefridge-api.karapincha.io/fridge/:itemId
Request
PUT https://thefridge-api.karapincha.io/fridge/:itemId
Body
{
"title": "Lemon",
"expiry": "20/11/2040"
}
Request
DELETE https://thefridge-api.karapincha.io/fridge/:itemId
- Follow instructions
- Attention to design details
- Code splitting
- Use of React best practices
- Use of SCSS best practices
- Code cleanliness and readability
- Write SCSS using BEM methodology
- Better folder structure
- Redux toolkit usage
Once you are completed;
- Please commit the codebase to a Github repository.
- Host the application on Vercel.com
And email us the both links.