AlfiyaSiddique / TastyTrails

TastyTrails is a web application designed to explore delightful recipes from around the world. It leverages modern technologies to create an immersive culinary experience.
https://delightful-daifuku-a9f6ea.netlify.app/
GNU Affero General Public License v3.0
30 stars 86 forks source link

FEATURE: Recipe For The Day Suggestion section #420

Closed sanchitc05 closed 1 week ago

sanchitc05 commented 2 weeks ago

Fixes #328

What does this PR do?

This PR implements a "Recipe of the Day" feature for TastyTrails. It includes:

  1. Backend changes:

    • New fields in the Recipe model: featured and lastFeatured
    • New controller function getRecipeOfTheDay
    • New route /recipe-of-the-day
  2. Frontend changes:

    • New RecipeOfTheDay component
    • Integration of the new component in the Landing page

The feature selects a new recipe each day, avoiding repetition within 7 days when possible. It provides users with daily culinary inspiration directly on the landing page.

Fixes #328 (Implement Recipe of the Day feature)

How should this be tested?

  1. Backend Testing:

    • Start the backend server
    • Use a tool like Postman to send a GET request to /api/recipe-of-the-day
    • Verify that a recipe is returned with featured: true
    • Run this test on multiple days to ensure a different recipe is featured
  2. Frontend Testing:

    • Start the frontend application
    • Navigate to the landing page
    • Scroll down to find the "Recipe of the Day" section
    • Verify that a recipe is displayed with its image, name, and description
    • Click the "View Recipe" button and confirm it navigates to the full recipe page
    • Check the responsiveness on different screen sizes
  3. Long-term Testing:

    • Monitor for 7+ days to ensure recipes are not repeated within a week unless necessary

Checklist

Required

netlify[bot] commented 2 weeks ago

Deploy request for delightful-daifuku-a9f6ea pending review.

Visit the deploys page to approve it

Name Link
Latest commit f5e76fa23296ded7a348436144ba96135ea3dc26
AlfiyaSiddique commented 1 week ago

@sanchitc05 can you please add the video of the output here

AlfiyaSiddique commented 1 week ago

Also can you test with the case of date change so that every day different recipe is shown?

sanchitc05 commented 1 week ago

Sure thing @AlfiyaSiddique I'll share soon

AlfiyaSiddique commented 1 week ago

@sanchitc05 any updates?

sanchitc05 commented 1 week ago

Yeah @AlfiyaSiddique I'll just do it by today night or tomorrow morning, I had been busy in the past days

AlfiyaSiddique commented 1 week ago

Sure @sanchitc05 take your time.

MastanSayyad commented 1 week ago

@AlfiyaSiddique Review this and merge if possible

AlfiyaSiddique commented 1 week ago

@sanchitc05 ??

https://github.com/AlfiyaSiddique/TastyTrails/pull/420#issuecomment-2460714879 https://github.com/AlfiyaSiddique/TastyTrails/pull/420#issuecomment-2460717864

AlfiyaSiddique commented 1 week ago

@AlfiyaSiddique Review this and merge if possible

@MastanSayyad the change is not completed yet I think; no update from the contributor's side. Can't merge without testing

MastanSayyad commented 1 week ago

@sanchitc05 do the needful, As the PA is active make sure you contact her before you contact us.

sanchitc05 commented 1 week ago

@AlfiyaSiddique TBH my pc got a blue screen error and it is out for repair, I took my friend's laptop but could not run it properly as I was getting various dependencies errors. I would just request you to see the code files, I assure you the logic is right and I have integrated it with react so that the output can be seen under the best dishes section. If you want to check the output you could just merge it and then check it directly deployed on netlify, in case you need any modifications you can always revert my pr and I can make changes to it.

AlfiyaSiddique commented 1 week ago

Okay @sanchitc05 works

AlfiyaSiddique commented 1 week ago

@sanchitc05 There are logical issues in the backend code. I have added a comment please fix it.

sanchitc05 commented 1 week ago

@AlfiyaSiddique On it!

sanchitc05 commented 1 week ago

@AlfiyaSiddique I'm closing this pr and i will make a new pr doing the necessary modifications that you suggested.