Inspiration
We first came up with this idea while, ironically, listing out things we thought would be cool. Ibrahim had blurted out an idea about having some kind of Arduino scan everything you throw away and keep track of that somewhere (ideally some kind of label printer for easy access). That way when you go to the grocery store, it's easy to know exactly what you needed without:
- Taking time out of your day for guesswork
- Going back and forth through a store while remembering what you needed
- Keeping track of items consciously
This idea lingered with us, which ultimately led to the idea of GreenScan. We linked this idea with buying sustainable and eco-friendly food items, while also tracking your grocery lists to avoid buying unnecessary food (which may go bad/go to waste), and unnecessary trips to the grocery store (wasting gas)
What it does
In short; It tracks the packaging you throw away and stores that into a MongoDB Database. Everytime you scan an item, GreenScan brings up a menu with information about the product. The background color indicates the eco-score provided by Open Food Facts. From there, you may choose to view alternate items (this functionality was not finished in time) or add it to your shopping list. It will then log it in your database for you to view in the other tab.
GreenScan also acts as a grocery tracker. Designed to scan discarded packages, the application works by having you scan your items as you throw them away for easy logging in a database. This revolutionizes the simplicity and usability of grocery lists; No longer do you have to manually add them, let the magic of UPC do it for you!
How we built it
We split this project into two elements; frontend and backend.
The frontend is built with Python and PyQT5, using native OS-specific elements for the interface. We used native PyQT widgets to ensure reliability and performance. For instance, we use QCameras instead of an OpenCV2 instance, and use native QWidgets throughout; some custom made, and some default to the OS.
The backend was built using Flask in Python, and uses MongoDB as the database. It's a fairly simple system which allows for easy tracking of UPCs and allows for easy future additions of user-authentication.
This project required many custom integrations to be built, one of which being our OpenFoodFacts API Wrapper. The default OpenFoodFacts API did not meet our expectations and was painful to use. As such, we had to write a wrapper to ease these difficulties.....
Challenges we ran into
....that brings us to the challenges!
The OpenFoodFacts API was archaic. Nothing was organized and it felt like each item was in a completely different format than the next! We had to build many adapter classes to bridge the gap, however ultimately ended up with more problems because of it.
We also ran into a few issues with PyQT5 due to the lack of documentation. This made niche changes such as positions and alignment very difficult. Nonetheless...
Accomplishments that we're proud of
...We're very proud of how the frontend turned out. This was our first time using PyQT5, and it proved to be a robust and powerful wrapper for the QT5 framework. Despite its flaws, we will definitely consider it for future frontend work
What we learned
- Frontend devs are very important and we no longer take them for granted
- Backend devs can't do frontend to save their lives
- We learned a lot about PyQT and MongoDB with Flask
- Auth0 is not very useful for locally hosted applications
What's next for GreenScan
- A mobile port for sure
- A wider range of API support
- Price tracking/sale monitoring
Proper Authentication- Support for user contributions to the Open Food Facts API
- Alternate product API
Log in or sign up for Devpost to join the conversation.