How to use: visit pearpantry.github.io
Ever look in your fridge to find 4 different brands of plant-based milk, 5 tubs of tofu, and not a single easy-to-make meal? Well, we have! This was not an uncommon occurrence at the beginning of the year, living in a house of 8 with only one fridge. Many of us have experienced the chaos of living with roommates, both in college and beyond. When you're sharing a fridge, it's easy for things to get mixed up, you have a lot of duplicate items, and it is difficult to keep track of what is in the fridge at any given moment. The simple solution is to share groceries, but it makes things significantly harder to budget and needs to be more straightforward given the diverse dietary restrictions, preferences, and eating habits that people have. This complexity underscores the need for a practical system to monitor and manage food consumption effectively. This challenge becomes even more pertinent for college students who often face a hectic schedule, making it tough to plan meals and ensure that the food in the fridge is put to good use. PearPantry is a comprehensive web app that combines grocery splitting, budget tracking, and food waste reduction into one convenient platform. With PearPantry, dividing grocery expenses based on what each housemate eats, keeping a close eye on your budget, and receiving timely reminders about food items nearing their expiration date become effortless. Additionally, PearPantry directs you to local food banks to donate unopened goods before they go to waste in your refrigerator. This way, you not only save money but also reduce food waste. PearPantry makes your life easier, and households run smoother, so you can spend less time worrying about groceries and more time planning “family” dinners!
PearPantry’s home page helps you discover personalized recipes based on ingredients available to you in your pantry and also offers suggestions as to what you could make with an additional purchase or two. This means you'll always have dinner options ready, relieving the stress of figuring out what to eat and reducing those last-minute grocery runs. Once you’ve signed in with multiple people, your recommendations will also include ingredients collected together by the household. Your digital pantry is easily stocked by scanning your receipts, serving the dual purpose of simplifying the division of grocery expenses among housemates. Within PearPantry's user-friendly platform, you can kickstart this process by scanning and uploading your receipts to the database. Once the receipts are in, you can freely assign who is consuming specific items, and the system takes care of the calculations, automatically tabulating shared expenses and clearly displaying who owes what to whom. Moreover, it provides a detailed breakdown of your personal spending, a valuable tool for budgeting, especially when the financial flow might seem unclear due to the shared expenses. This ensures that sharing groceries won't disrupt your personal budget in any way, addressing a concern that other tools might not cover. All the items you scan are then added to your digital pantry, along with the purchase date. This purchase date becomes valuable for calculating expiration dates. As items near the end of their shelf life, you'll receive helpful reminders. This not only aids in reducing food waste but also gives you the option to prioritize consumption or consider donating items to a local food bank if you know they won't be eaten in time. This feature greatly minimizes forgotten foods and food waste. While browsing your pantry, you can conveniently access the nutritional information of items with a simple click. This feature is especially beneficial for those who are mindful of specific nutrients in their diet. In summary, PearPantry simplifies the process of managing your groceries, meal planning, and shared living expenses, making life smoother and more enjoyable for everyone involved.
We developed PearPantry as a web application utilizing a stack that includes React, Vite, and Material UI libraries to craft user-friendly front-end components, all hosted on GitHub for accessibility and collaboration. As part of our innovation, we explored the use of AI-based picture-to-text Optical Character Recognition (OCR) technology to automatically recognize pantry items from images of receipts. We were able to successfully test the concept by implementing Apple’s OCR technology using Swift for iOS development. To reach a broader audience though, we decided to move to a completely web-based application. The output from the OCR process is seamlessly integrated into a Firebase-hosted database. This database allows for real-time updates and ensures that the information is readily accessible to all users, fostering efficient data sharing among members of the same household. In addition to logging and storing pantry items, the database efficiently manages all records of monetary transactions, facilitating the calculation of shared expenses and returning individual budget information. Once grocery items are securely stored in the database, they serve as ingredients in queries made to the Spoonacular API. This API, in turn, generates the recipes and provides nutritional facts data that are displayed within the PearPantry platform. The integration of all these different technologies and features is what makes PearPantry something that has yet to be seen.
We knew going in that this would be an ambitious project and there would be features we may not get to implement fully. This was compounded by the fact that we had mixed levels of familiarity with React and web development in general on the team. Finally, one of the biggest challenges we faced was communicating with APIs, handling usage limits, and working around internet security protocols not present on other platforms. Two of our main features, receipt AI image to text and recipe searching were powered by wonderful services on the web. However, we ran into challenges with transferring images across the internet and also dealing with Cross-Origin Resource Sharing (CORS) which prevented some of our API calls from working. This revealed to us the differences in security considerations between mobile platforms (where image capture and processing occur on the same device) and web services that transfer information over the internet.
We are very excited to have a resulting product, especially with our very limited web development experience. There were lots of moving parts, but we meticulously planned the entire process to completion, which made it a lot easier to break tasks down. In addition to building the web app itself, we also created a multi-user platform powered by a functional back-end cloud database. This was also new to us, so this experience overall was a lot of learning on the go in a short amount of time. We are also proud of how well we worked together as a team; we did a good job dividing up work so that everything could get done as efficiently as possible, while everyone was able to play their own role and make their own contributions.
Most of the team were new to React and modern JavaScript frameworks and they have all now built a web application with these tools! This was a very exciting experience and definitely a lot was learned about the kinds of modern tools available and how they work. Part of this experience also included learning about what Cross-Origin Resources Sharing (CORS) is and how this differs from how mobile applications handle data. The considerations of web security were new and very interesting.
We are extremely confident in PearPantry’s capacity for growth and have fleshed out ideas on where we want to take it past the hackathon! Our main goal is to improve the UI. For this project, since we were determined to get a working demo, we sacrificed much of the aesthetics and visuals of the product. We think that a more sophisticated UI would attract users and allow us to expand. Secondly, an important aspect for us to implement is the ability to filter recipes and item markings. For example, if a user makes themself a vegetarian, we want to customize the app for their experience by automatically excluding them from non-vegetarian grocery items their roommate might have bought and by filtering their customized recipe recommendations. Lastly, we want to refactor the backend to accommodate for multihome functionality. As of right now, the website assumes everyone who makes an account belongs to the same home and therefore shares the same pantry, but obviously, this is not the case. In the future, we want to enable users to invite their roommates to their homes so that the pantry can only be shared with those users. Later, we hope that roommates can invite other users to a “dinner party” so that the app will tailor recommendations based on the food preferences of the group.