ChefMate: A Recipe Search Engine
My Kenzie Academy Capstone project. This application will give you a list of recipes with the ingredients you have at hand, eliminating a trip to the grocery store. There are also other functionalities to the application.
To navigate to the GitHub repository, click on the GitHub logo below
Below you will see:
Tech stack used for this project
Server Design Diagram
Videos and descriptions of each functionality
Java, DynamoDB, REST API, Spring Boot, AWS Lambda, Spoonacular API, Auth0, JUnit, Mockito, Dagger, Google Guava, Gson, JavaScript, HTML, CSS, Bootstrap
Developed a recipe search engine with a team of 4 using Java
Functionalities include search by ingredients, search by nutrients, get all recipes, get random recipes, add review, get reviews, and login/logout
Wrote AWS Lambda functions acting as a proxy service to a 3rd Party API (Spoonacular), this included writing backend service methods, controller methods, models, and DAO methods for my features (search by ingredients/nutrients). As well as a get recipe information functionality used behind the scenes
Wrote frontend package (HTML, CSS, Bootstrap) including JS to communicate with our backend RestController
Wrote REST API endpoints and tested them on Postman during development
Wrote unit tests with JUnit & Mockito meeting a code coverage above 80%
Wrote integration tests that utilized MockMvc for my endpoints
Utilized DynamoDB to store reviews for recipes and used a local container to locally run the application on Docker during development
Leveraged Agile Scrum methodology to create a backlog and weekly sprint plans for an 8-week project deadline with daily standups
Created branches and pull requests while working as a team for an effective version control using Git/GitHub
Teammate added in-memory caching with Google Guava for the get reviews functionality
Teammate added login/logout authentication feature using Auth0
Server Design
Functionalities
Search By Ingredients
This feature is a GET request I was responsible for. This allows a user to enter a list of ingredients, separated by commas, so that it returns a list of recipes with just those ingredients. This will let the user enter what they have in their fridge or pantry, eliminating a trip to the grocery store.
The list of ingredients received from the client, is turned into a query and creates a call to Spoonacular, our 3rd party API. This involved deserializing JSON strings using Google’s Gson library. This was done in our AWS Lambda packages as it acted as a proxy to keep our application separate from external services.
Search By Nutrients
This feature is a GET request I was responsible for. This allows a user to enter the nutrients they would like to have included in their recipes. After entering the fields, it is then turned into a query for a call to our 3rd party API, Spoonacular.
This too is an AWS Lambda function that had to use Google’s Gson library to deserialize JSON strings from Spoonacular’s HTTP response.
Get All Recipes
This feature is a GET request. By typing in a single ingredient like “apple”, it will return a list of recipes that revolves around apples.
This too is an AWS Lambda function that had to use Google’s Gson library to deserialize JSON strings from Spoonacular’s HTTP response.
Get Random Recipes
This feature is a GET request. When the user clicks on the get random recipe dropdown option, a list of recipes are returned.
This too is an AWS Lambda function that had to use Google’s Gson library to deserialize JSON strings from Spoonacular’s HTTP response.
Add Review
This feature is a POST request. This will allow a user to review a recipe. All the user needs is a recipe ID. The user can only review the recipe once, to keep recipe reviews honest and accurate.
Get Reviews
This feature is a GET request. The user will just need the recipe ID to retrieve the reviews. Here you will see the review from the recipe that was reviewed in the previous video above.
In-Memory Caching
This feature is a GET request. This is the get reviews feature from above, but here is an example of the in-memory caching functionality in action.
As you may have noticed in the previous video, the initial request to retrieve reviews for a single recipe can take a couple of seconds. This is really slow. We did not want the user to have to wait multiple times when retrieving reviews. In this video, you will notice that during a second call to the previous review with the recipe ID of 716272, the response was instant.
This helps the user go back and forth between reviews when looking for the right recipe to cook.
This functionality was achieved by using the Google Guava library.
Login
This feature allows authentication of a user to use our application. This was done by using Auth0
Log Out
This feature allows an authenticated user to log out of our application. This was done by using Auth0
Expansion plans
Because of an 8-week deadline, my team was not able to fully implement Auth0 and its capabilities with our application. An expansion plan would have been to be able to save user preferences, shown in the Login feature video above. This would allow a user to quickly make searches with their saved preferences that are tied to their user account.
Another expansion plan would have been to have a user mark recipes as tried, shown in the Login feature video as well. The plan with this functionality was so that users can only review recipes they have tried. Marking recipes as tried will then allow a user to add a review to a specific recipe ID. Otherwise, an error message would have been displayed letting the user know they first need to try the recipe before they can review them.