The Inspiration

Even before this hackathon, our team was inspired and motivated to solve issues regarding food waste. Roughly one-third of the food produced in the world for human consumption every year — approximately 1.3 billion tonnes — gets lost or wasted. Food losses and waste amount to roughly 680 billion US dollars in industrialized countries and 310 billion US dollars in developing countries. We wanted to create something small and practical to address this large issue.

The Experience

As beginner hackers, we used JSON parsing to retrieve data from free, public APIs which is a skill we have already learned from our college courses.

The Idea

As college students, our hectic and demanding academic lives often lead to neglect in other areas of our life, such as cooking at home. We let our valuable ingredients in our fridge get unused, expired, and wasted. So, we came up with Recipedia: a simple recipe generator application that takes ingredient names provided by the user and generates a recipe that uses these ingredients. With Recipedia, we can take advantage of the food we already have and turn it into our next, delicious homemade meal.

The Development

The project uses the Model-View-Controller (MVC) architectural pattern. We used JSON data retrieval from RecipePuppy's public API database. Additionally, we used SceneBuilder to create JavaFX code to design our application interface.

The Challenges

Retrieving data from public APIs require a stable internet connection. Since the HackDavis wifi was very unstable sometimes, our program would not perform correctly due to this issue. The program does not tell you it is a internet connection issue, so we spent an unnecessarily long time trying to identify bugs in our program.

Files

The files inside this repository are:

  • HealthView.fxml - View for project
  • HealthController.java - Controller for project
  • HealthModel.java - Contains public static void main to start the application
  • HealthMain.java - Main program to run the application
  • badartistname.png - Image displayed if an invalid recipe is found
  • gson-2.2.4.jar - Required to parse JSON code returned
  • hamcrest-core-1.3.jar - Required to run JUnit tests
  • junit-4.12.jar - Required to run JUnit tests
  • README.md - README file with details of this repository

Getting Started

Make sure all files are in the same directory. Configure the gson-2.2.4.jar, hamcrest-core-1.3.jar, junit-4.12.jar files.

Operation

Run the HealthMain.java file and the interface for the application should appear. Enter a comma-separated list of ingredients and click on the Search! button. The recipe's information will be displayed. Click next or previous to look at more recipes. An invalid or empty ingredients field will display an error message.

Authors

  • Julia Beatriz Ramos
  • Rami Mostafa
  • Allan Yu
  • Boei Lee

Built With

Share this project:

Updates