As the main objective and theme of this hackathon is to promote health within people, we decided to create a website that would give user access to the healthiest recipes depending on their preferences and ingredients. The website allows users to search for potential recipes based on inputted food ingredients, as well as sort the recipes by their preferred criteria. The user can also check the nutritional factors of a specific dish to determine whether the recipe or dish is healthy or not. We created the website using CSS, JavaScript, and HTML on GitHub and VS Code, and we also used the OpenAI API to generate the various recipes and their nutritional labels. For the website's recipe-generating feature, calls are made to the API with the user's ingredients to return a 10-item list of dishes that include one or multiple of the listed ingredients. To save on the number of tokens used in the API response, the first call to the API returns only the names and some nutritional facts of each item in the list, and when the user clicks on one specific dish on the website, a second API call is made ot generate the step-by-step instructions of the dish for the user. Similarly, when the user inputs the name of a specific dish, an API call will be made with said name to get more in-depth nutritional facts on it, which will allow the user to determine whether the dish's nutrients fit their personal fitness goals.

Built With

Share this project:

Updates