# RecipeHunt

## Inspiration

We chose this project as the current pandemic has created a situation where many people that were lacking in cooking skills had to make their own food.
Before the pandemic many individuals let their cooking skills dwindle as simple solutions such as fast food existed that let us easily get access to food.
given the situation many people were left not knowing what to make with the ingredients in their fridges, so this solution gives people ideas on what to make just by entering in what ingredients they have.

## What it does

RecipeHunt is a platform that allows users to find recipes based on the ingredients that they have at home. The application will provide a list of recipes that use those ingredients.

## How we built it

We divided teams into front end and back end specialties and helped each other to achieve our dreams.

## Challenges we ran into

For our first hackathon, we think we did a really good job as a team. However, we did run into a couple of issues. From our front end developers, creating the checkboxes was the most difficult part as they had a very specific vision of what they wanted.
From our back end developers, integrating with the google search API and python scripts were the most difficult part as it was hard to convert data to useable states for the different programs.
For everyone one of the biggest problems was time management, we got too obsessed with making a specific element perfect and because of that we had to leave out key elements that could have made the project much better.

## Accomplishments that we're proud of

We made a working application in the given time.

## What we learned

We improved on our skills to be more useful programmers.

## What's next for RecipeHunt

We look forward to updating it in the future.
## Inspiration

Acting on the wrong information can kill. In the first 3 months of 2020, nearly 6 000 people around the globe were hospitalized because of coronavirus misinformation, recent research suggests. During this period, researchers say at least 800 people may have died due to misinformation related to COVID-19\*.

At its extreme, death can be the tragic outcome of what the World Health Organization has termed the infodemic, an overabundance of information - some accurate, some not that spreads alongside a disease outbreak. False information runs the gamut, from discrediting the threat of COVID-19 to conspiracy theories that vaccines could alter human DNA.
Preventing false information can :

1. Reduce anxiety and stress among people
2. Reduce the spread of unproven remedies
3. It will prevent people from entering panic mode
4. Prevent contamination of true facts

## What it does

Corona Bot delivers credible and updates information related to COVID 19 regarding the number of cases, recoveries, precautionary measures, and a lot more.
It has :

1. Audio responses and speech recognition. [User commands]
2. Choice for male / female voice assistant.
3. Advanced error handling conditions.
4. Mental health support.
5. Includes basic support for North American slang.
6. Accepts voice commands for a hands-free experience.
7. Accessible to blind and deaf people. [Provides output as both audio and text]
8. Includes exception handling for personal questions.
9. Includes the ability to search for off-topic questions.

## How we built it

Corona Bot is a webscraping project built using python and a few python libraries like speech recognition API's and text-to-speech conversion libraries [pyttsx3].

Corona Bot uses an algorithm that was built by us to deliver appropriate responses to each question. It breaks down the user input to separate words and coverts them to lowercase and then matches the word to the keywords from the database. Then based on the tags identified in the user response, the algorithm obtains the latest information through web scraping and delivers customized outputs through the device audio.

## Challenges we ran into

Neither of us had used selenium before so that was a bit tricky. Creating our own algorithm and database gave us a few logical errors. Which we were able to overcome in the end.

## Accomplishments that we're proud of

We are very proud of successfully creating and implementing my own response generation algorithm and implementing a fully functional exception handling backend.

## What we learned

We learned to do web scraping using selenium and to work with python libraries like pyttsx3 and speech\_recogniton.

## What's next for Corona Bot

We want to create a web/ app interface for the corona bot to be easily accessible to everyone.
## Inspiration

When it comes to finding solutions to global issues, we often feel helpless: making us feel as if our small impact will not help the bigger picture. Climate change is a critical concern of our age; however, the extent of this matter often reaches beyond what one person can do....or so we think!
Inspired by the feeling of "not much we can do", we created *eatco*. *Eatco* allows the user to gain live updates and learn how their usage of the platform helps fight climate change. This allows us to not only present users with a medium to make an impact but also helps spread information about how mother nature can heal.

## What it does

While *eatco* is centered around providing an eco-friendly alternative lifestyle, we narrowed our approach to something everyone loves and can apt to; food! Other than the plenty of health benefits of adopting a vegetarian diet — such as lowering cholesterol intake and protecting against cardiovas­cular diseases — having a meatless diet also allows you to reduce greenhouse gas emissions which contribute to 60% of our climate crisis. Providing users with a vegetarian (or vegan!) alternative to their favourite foods, *eatco* aims to use small wins to create a big impact on the issue of global warming. Moreover, with an option to connect their *eatco* account with Spotify we engage our users and make them love the cooking process even more by using their personal song choices, mixed with the flavours of our recipe, to create a personalized playlist for every recipe.

## How we built it

For the front-end component of the website, we created our web-app pages in React and used HTML5 with CSS3 to style the site. There are three main pages the site routes to: the main app, and the login and register page. The login pages utilized a minimalist aesthetic with a CSS style sheet integrated into an HTML file while the recipe pages used React for the database. Because we wanted to keep the user experience cohesive and reduce the delay with rendering different pages through the backend, the main app — recipe searching and viewing — occurs on one page. We also wanted to reduce the wait time for fetching search results so rather than rendering a new page and searching again for the same query we use React to hide and render the appropriate components. We built the backend using the Flask framework. The required functionalities were implemented using specific libraries in python as well as certain APIs. For example, our web search API utilized the googlesearch and beautifulsoup4 libraries to access search results for vegetarian alternatives and return relevant data using web scraping. We also made use of Spotify Web API to access metadata about the user’s favourite artists and tracks to generate a personalized playlist based on the recipe being made. Lastly, we used a mongoDB database to store and access user-specific information such as their username, trees saved, recipes viewed, etc. We made multiple GET and POST requests to update the user’s info, i.e. saved recipes and recipes viewed, as well as making use of our web scraping API that retrieves recipe search results using the recipe query users submit.

## Challenges we ran into

In terms of the front-end, we should have considered implementing Routing earlier because when it came to doing so afterward, it would be too complicated to split up the main app page into different routes; this however ended up working out alright as we decided to keep the main page on one main component. Moreover, integrating animation transitions with React was something we hadn’t done and if we had more time we would’ve liked to add it in. Finally, only one of us working on the front-end was familiar with React so balancing what was familiar (HTML) and being able to integrate it into the React workflow took some time. Implementing the backend, particularly the spotify playlist feature, was quite tedious since some aspects of the spotify web API were not as well explained in online resources and hence, we had to rely solely on documentation. Furthermore, having web scraping and APIs in our project meant that we had to parse a lot of dictionaries and lists, making sure that all our keys were exactly correct. Additionally, since dictionaries in Python can have single quotes, when converting these to JSONs we had many issues with not having them be double quotes. The JSONs for the recipes also often had quotation marks in the title, so we had to carefully replace these before the recipes were themselves returned. Later, we also ran into issues with rate limiting which made it difficult to consistently test our application as it would send too many requests in a small period of time. As a result, we had to increase the pause interval between requests when testing which made it a slow and time consuming process. Integrating the Spotify API calls on the backend with the frontend proved quite difficult. This involved making sure that the authentication and redirects were done properly. We first planned to do this with a popup that called back to the original recipe page, but with the enormous amount of complexity of this task, we switched to have the playlist open in a separate page.

## Accomplishments that we're proud of

Besides our main idea of allowing users to create a better carbon footprint for themselves, we are proud of accomplishing our Spotify integration. Using the Spotify API and metadata was something none of the team had worked with before and we're glad we learned the new skill because it adds great character to the site. We all love music and being able to use metadata for personalized playlists satisfied our inner musical geek and the integration turned out great so we're really happy with the feature. Along with our vast recipe database this far, we are also proud of our integration! Creating a full-stack database application can be tough and putting together all of our different parts was quite hard, especially as it's something we have limited experience with; hence, we're really proud of our service layer for that. Finally, this was the first time our front-end developers used React for a hackathon; hence, using it in a time and resource constraint environment for the first time and managing to do it as well as we did is also one of our greatest accomplishments.

## What we learned

This hackathon was a great learning experience for all of us because everyone delved into a tool that they'd never used before! As a group, one of the main things we learned was the importance of a good git workflow because it allows all team members to have a medium to collaborate efficiently by combing individual parts. Moreover, we also learned about Spotify embedding which not only gave *eatco* a great feature but also provided us with exposure to metadata and API tools. Moreover, we also learned more about creating a component hierarchy and routing on the front end. Another new tool that we used in the back-end was learning how to perform database operations on a cloud-based MongoDB Atlas database from a python script using the pymongo API. This allowed us to complete our recipe database which was the biggest functionality in *eatco*.

## What's next for Eatco

Our team is proud of what *eatco* stands for and we want to continue this project beyond the scope of this hackathon and join the fight against climate change. We truly believe in this cause and feel eatco has the power to bring meaningful change; thus, we plan to improve the site further and release it as a web platform and a mobile application. Before making *eatco* available for users publically we want to add more functionality and further improve the database and present the user with a more accurate update of their carbon footprint. In addition to making our recipe database bigger, we also want to focus on enhancing the front-end for a better user experience. Furthermore, we also hope to include features such as connecting to maps (if the user doesn't have a certain ingredient, they will be directed to the nearest facility where that item can be found), and better use of the Spotify metadata to generate even better playlists. Lastly, we also want to add a saved water feature to also contribute into the global water crisis because eating green also helps cut back on wasteful water consumption! We firmly believe that *eatco* can go beyond the range of the last 36 hours and make impactful change on our planet; hence, we want to share with the world how global issues don't always need huge corporate or public support to be solved, but one person can also make a difference.