Build a React app (using Typescript) using this template project that accomplishes the following:
- Let's you search for
Recipe
s by diet, certain health restrictions, meal type, dish type, cuisine type, and any arbitraryquery
text that appears in theRecipe
(i.e.query=chicken
) using the Edamam Recipe Search API with the key that was provided to you. - Let's you select
Recipe
s returned and add it to your next 7 dayMeal Plan
. - Let's you view a final summary of your
Meal Plan
for the week, showing what to eat each meal of each day of the week, and provides you with the recipes, their instructions, details, etc. grouped by meal type (i.e.Breakfast
,Lunch
,Dinner
,Snack
).
While we'll be judging this on functionality above all else, feel free to showcase your skills and diligence -- from documentation, testing, design, architecture, and more.
Note that the current site uses skeleton.css. Feel free to replace this if you like with anything you're more comfortable with.
Use the api key and app id that sent to you to populate recipes. If for whatever reason this isn't working, you'll have to sign up for the Edamam API and use your own app id and key.
This example curl will use the API to search for alcohol free recipes between 591-722 calories, limiting to three results, which contain the word "chicken" in them.
curl "https://api.edamam.com/search?q=chicken&app_id=${YOUR_APP_ID}&app_key=${YOUR_APP_KEY}&from=0&to=3&calories=591-722&health=alcohol-free"
Feel free to use this domain model as a starting point for the application.
{
label: "recipe title",
image: "image url",
source: "source site identifier",
url: "original recipe url",
yield: 100, //integer, number of servings
calories: 835.25, //float, total energy, kcal
totalWeight: 25.2 //float, total weight, g
ingredients: Ingredient[] //Ingredient[], array of Ingredient types
totalNutrients: NutrientInfo[],//NutrientInfo[], nutrients for entire recipe
totalDaily: NutrientInfo[], //NutrientInfo[], % daily value for entire recipe
dietLabels: enum[], //diet labels
healthLabels: enum[], //health labels
}
{
foodId: "food identifier string",
quantity: 2.5, //float, quantity of specified measure
measure: Measure, //Measure
weight: 2.5, //float, total weight, g
food: Food //Food
}
{
uri: "string identifier",
label: "display label",
quantity: 2.5, //float quantity of specified units
unit: "unit"
}
{
uri: "string identifier",
label: "common name",
}
{
foodId: "string food identifier",
label: "common name",
}
[ "balanced", "high-protein", "high-fiber", "low-fat", "low-carb", "low-sodium" ]
[ "vegan", "vegetarian", "paleo", "dairy-free", "gluten-free", "wheat-free", "fat-free", "low-sugar", "egg-free", "peanut-free", "tree-nut-free", "soy-free", "fish-free", "shellfish-free" ]
["Breakfast", "Lunch", "Dinner", "Snack"]
["Bread",
"Cereals", "Condiments and sauces", "Drinks", "Desserts", "Main course", "Pancake", "Preps", "Preserve", "Salad", "Sandwiches", "Side dish", "Soup", "Starter", "Sweets"]
["American", "Asian", "British", "Caribbean", "Central Europe", "Chinese", "Eastern Europe", "French", "Indian", "Italian", "Japanese", "Kosher", "Mediterranean", "Mexican", "Middle Eastern", "Nordic", "South American", "South East Asian"]
NTR Code | Name | Unit | NTR Code | Name | Unit |
---|---|---|---|---|---|
CA | Calcium | mg | ENERC_KCAL | Energy | kcal |
CHOCDF | Carbs | g | NIA | Niacin (B3) | mg |
CHOLE | Cholesterol | mg | P | Phosphorus | mg |
FAMS | Monounsaturated | g | PROCNT | Protein | g |
FAPU | Polyunsaturated | g | RIBF | Riboflavin (B2) | mg |
SUGAR | Sugars | g | SUGAR.added | Sugars, added | g |
FAT | Fat | g | FASAT | Saturated | g |
FATRN | Trans | g | TOCPHA | Vitamin E | mg |
FE | Iron | mg | VITA_RAE | Vitamin A | æg |
FIBTG | Fiber | g | VITB12 | Vitamin B12 | æg |
FOLDFE | Folate (Equivalent) | æg | FOLFD | Folate (food) | æg |
K | Potassium | mg | VITC | Vitamin C | mg |
MG | Magnesium | mg | VITD | Vitamin D | æg |
NA | Sodium | mg | VITK1 | Vitamin K | æg |
VITB6A | Vitamin B6 | mg | THIA | Thiamin (B1) | mg |