“Foodfinder”

Inside.TechLabs
TechLabs
Published in
6 min readSep 15, 2020

This project was carried out as part of the TechLabs “Digital Shaper Program” in Münster (summer term 2020).

Abstract: In times of material abundance lots of groceries are thrown away — even though people are getting more and more sensitive towards reducing their food waste. 12 Million tons of groceries are thrown out yearly only in Germany for instance, whilst other nations are starving. With our techLabs project “foodfinder”, we want to contribute to combating these dynamics. Foodfinder is a digital tool to manage your fridge. More specifically it serves to keep stock of perishable goods in your household and their best-before dates, in order to reduce accidental foodwaste. In the future, users of foodfinder can share left-over stock items to be picked up by other users to reach their mutual goal: Reducing foodwaste to a minimum.

The background, the problem and our solution:

Nowadays more and more people have a reduction of food waste on their agenda. They often lack a proper tool to help them change their habits and keep an overview over their groceries. Foodfinder is the tool that helps them keep and update their stock and help them find a loving fridge for their leftover groceries.

Our Path:

In order to be able to implement our project, we first of all had to think of a way of reducing throwing out previously bought food. Two ways struck our minds: First, you can try to reduce the amount of food thrown out by creating awareness within the household. If a household, respectively a user, is aware of the groceries that they still have, they are less likely to buy more food that eventually will end up thrown out. Secondly, you can create a community of households and users where they can upload the groceries they would have thrown out to be picked up and used by other members of the community. Given the timeframe and skillset we decided to tackle the first audience, the individual household, first, while leaving the communal aspect to be implemented later.

First, we had to define the process of the foodfinder application. We came up with user stories, respectively everything the user should be able to do within our minimal viable product. The process is as follows:

1) The user manually enters the product:

2) The user enters the amount & best before-date of the product

3) The product’s information is stored in the users foodfinder-food-database (“fridge”)

Flask and why we decided not to use it

Both Flask and React.js, two WebApp Frameworks struck our minds to serve as our framework.

From “Data Science with Python” viewpoint, Flask was recommended to us as the go-to WebApp framework for python. Caused by no prior knowledge we deep dived into the topic of creating a web application with Flask and learning the basic of the framework alongside the Data Science Track. By working on that topic we learned a lot about the basic concepts of web development in general, with python specifically and the similarity solution to solve specific problems no matter the programming language in use. Some major topics along with others were the basic structure of web applications with flask, database setup and connections with SQLAlchemy, “App-as-a-Package” — Design, Models vs. Tables and the problems of hierarchical dependencies between classes and modules. For parts of the team, this spark the broader interest in programming with python in general, not only in the data science context, to excel in one the three of the major data science skill areas, the programming/coding skills itself.

During our discussion on the way forward that both of the frameworks, React.js and Flask, would have been a possibility to solve our challenge sufficiently. Lacking a “real” data science use case and therefore no need for an easy to handle python integration of DS functionalities React.js proved to be the better choice, since it’s coded in JSX — a javascript Extension, which in comparison to Python was the less effortful option. As a classic WebApp Framework it breaks the Application down into multiple components to be coded separately, allowing for a more responsive and fluid rendering of contents. The only caveat: we started coding with a slightly older version of React.js, which did not allow for responsive database queries: meaning, one could access information, but storing and editing data was not supported. Our solution? All user input would be saved to local storage, rather than directly writing it into our own database. This also somewhat simplified our database-problems, since user data did not depend on the existence of our own database anymore. However, it also rendered database queries providing food-data like nutritional values and an averaged best-before date to put the actual date into perspective (i.e. yogurt usually is still consumable 1 week after the best-before date) a second order problem, which we did not address in our minimal viable product. Instead, difficulties connected to multiple input values and local Storage turned out to be sufficiently time-consuming. Our first-stage MVP is so far completely detached from any database and relies on the consumer to enter all groceries by hand, via a text-string input form. The best-before date corresponding to each item is entered via a calendar widget below. Both of which are then stored together and rendered to the screen in form of a fridge-management list, resembling a to-do list tool. Food items can be deleted separately after consumption or cleared completely. In terms of User Experience, our lack of knowledge is visible, though, to make life a little easier, an alert explaining the WebApp’s functionality shows once the App is mounted in the browser for the first time. A reminder, when groceries are close to their best-before date, has so far not been installed, due to difficulties with datetime mathematics and rendering. Solving the latter problem would be prioritized, when further developing the application. Once the databaseis established further enhancements in User Experience and Usability will become possible.

Our Biggest Challenges:

As Data Science and Web Development-Frontend Techies with no Backend knowledge it was difficult to connect our paths. A lack of knowledge about the backend structure of a web application combined with the narrow focus of the DS track on “purely” DS tasks caused a blind spot here. Typical for that challenge one of the main questions was: “How do you set up a database, run that on a whatever-backend and connect it then to a web application with proper interaction, calls and responses?” Also, we noticed lack of UX skills to present our site in the most appealing way possible — crucial to attract the required amount of users when trying to impement community-aspects.

Our Goal/Impact:

With the help of foodfinder, we want to raise people’s awareness for a sustainable shopping habit. We want them to know what they still have in stock, how they can reduce their shopping (and, obviously, their costs!) and eventually build a community of likeminded people sharing their leftover groceries.

Outlook:

In order to improve both Usability and User Experience has to be kept in mind at all times, we intend wanted to enable the user to scan the product’s barcode (EAN). This leads to the first two obstacles: Finding a scan-tool and linking the scanned information to a EAN-database. In accordance to techLabs’ mantra of googling until you find the solution, we came up with an in-browser-scanning solution: https://www.scandit.com/. Regarding the EAN-database, our research was also succesful: with open food facts (https://de.openfoodfacts.org/), we found an entire community dedicated to making food data accessible for developers and consumers. Their data is easily retrievable, they offer multiple APIs and even a slack community that is eager to help you with your food-data problems.

The foodfinder-project has a lot of potential for further development. Approaches to extension can be deployed at various points. As mentioned before, apart from the stockkeeping-aspects, we see a big chance in building a community of foodwaste-reducers in which users can offer their products for pickup by other community members around rather than throwing them out. Also, there is potential to increase the usability of the product by e.g. automatically screening the best before date rather than entering it manually.

GitHub-Link: https://github.com/strambb/ms-st-20-14-foodfinder

Team:
Marius Goebel:
Data Science Track
Julia Hagen: Web Development Track
Johannes Weimer: Data Science Track

Mentor:
Jason O’Reilly

--

--

Inside.TechLabs
TechLabs

Our community Members share their insights into the TechLabs Experience