Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability to fetch recipes #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

jack-mullen
Copy link
Contributor

@jack-mullen jack-mullen commented Feb 2, 2024

NOTE: This pull request is part of Oddbox's technical test. This pull request is a mock pull request for candidates. None of this code is for real world production use.

Purpose

This change provides the ability to easily see a list of recipes between a date range and grouped by category (e.g. main, dessert, side).

The marketing team asked for this as they want customers to have a place where they can easily filter recipes between two dates, and customers generally want this grouped by category. In the future, the marketing team said they will likely be adding new categories of recipes.

The marketing team told us customers regularly access this data on the go from their mobile devices, so the page should also be responsive.

I was not provided any wireframes for how this should look, and so I have gone with a grid system using flexbox so that it is responsive.

Approach

I have created some backend and frontend code. The backend code loads the recipe data between two dates and groups by category (currently loaded from a JSON of recipes, this will be a database of recipes at some point).

The backend has an API endpoint recipes/ which returns recipes provided between two dates. For example: recipes/?start_date=2022-07-25&end_date=2024-08-25

The frontend allows a user to enter the dates they want to filter by, and then shows the recipes in a grid format. I've attached a screenshot of how this looks with some recipes:

localhost_3000_ copy

@jack-mullen jack-mullen self-assigned this Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant