Inspiration
- The average food waste per household in the U.S. is estimated to be around 1,300 to 1,400 pounds each year, translating to a financial loss of approximately $1,500 to $2,000. Commonly wasted items include fruits, vegetables, dairy products, and meats.
- This waste contributes to about 8-10% of global greenhouse gas emissions when considering the entire supply chain, from production to disposal.
- Inspired by these staggering figures, we aim to reduce food waste through a home grocery management API that acts as a guardian, raising awareness of current grocery items and helping households make smarter, more sustainable choices.
- We wanted to leverage Ambassador’s Blackbird tool to showcase the rapid development to save developers time from start to finish.
What it does
- The GroceryGuardian: Home Grocery Management API provides an efficient solution for households to track and manage their grocery items, helping to minimize waste and optimize usage.
- Feature #1 - Add, Update, and Delete Grocery Items: Users can add new grocery items to their inventory, update item details (such as quantity or expiration date), and delete items they no longer need. This ensures a comprehensive, up-to-date list of groceries at any time.
- Feature #2 - Expiration Date Tracking: The API tracks the expiration dates of grocery items and identifies those that are near expiry. Users can easily access a list of expired or soon-to-expire items, helping to prioritize them in meal planning and reducing the chances of spoilage.
- Feature #3 - Categorization and Search: Items can be categorized (e.g., dairy, produce, meat), making it easy to organize and find specific items. The API also allows for keyword-based search functionality, enabling users to quickly locate any item in their inventory.
How we built it
We built the same API in two environments. One is the Blackbird environment where Go is used to create the various endpoints and test the API with its mock feature. The other environment is built with Python and FastAPI. We also created unit tests and created mock data from the database. We used Postgres DB database for both environments.
Challenges we ran into
Go is a new language for our team and Blackbird supports only that language. So it took time to ramp up. While creating tests in Python, we created some scenarios of each endpoints. We fixed some bugs in the code but it did take longer time to debug with various test cases when compared with Blackbird setup
Accomplishments that we're proud of
We’re proud to have built a functional, straightforward solution that addresses food waste in a practical way. Learning new tools and navigating setup challenges allowed us to create an API that could make a small but meaningful impact.
What we learned
Through this project, we gained experience in designing APIs with Blackbird, from specification generation to deployment. We also learned how to manage API keys for secure access, and adapt to a new programming language, Go, for backend development. Along the way, we improved our problem-solving skills and became more comfortable troubleshooting setup issues across different environments. We also learnt to develop API from start to finish in Python and FastAPI.
What's next for GroceryGuardian for Speed
We want to leverage the rapid development environment of Blackbird to add more features in GroceryGuardian as follows
Alerts and Reminders: We plan to integrate automated reminders for upcoming expiration dates and low stock items. This feature would help users proactively manage their groceries, reducing food waste and prompting timely usage.
Barcode Scanning: Adding barcode scanning functionality would allow users to quickly add items by scanning product barcodes, simplifying inventory management and ensuring accurate item details.
Receipt Parsing for Inventory Updates: We aim to implement receipt parsing so that users can upload a shopping receipt, and the app will automatically update grocery inventory based on purchased items.
Built With
- blackbird
- fastapi
- go
- openapi
- postgresql
- python
- sqlalchemy




Log in or sign up for Devpost to join the conversation.