Tech Talk: Developing APIs the Easy Way – Streamline your API process with an endpoint-focused approach on Dec 5 at 11 am EST! Register now

Back to blog
API DEVELOPMENT

Accelerate API Development: From 13 Days to 3 with Blackbird

Bailey DeCamillis
November 12, 2024 | 6 min read
Grocery Guardian Acceeration

GroceryGuardian’s 2024 Hackathon Win Shows Intense Acceleration


“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,”
– the GroceryGuardian team

As a part of the API World 2024 Hackathon Challenge, we asked teams to create an API as quickly as possible in Blackbird and another solution to organically demonstrate the level of acceleration and speed that Blackbird can bring to the development table.

One of our winning teams, the GroceryGuardian team, built the same API in two environments. One was created in Blackbird api development, where Go is used to create the various endpoints and test the API with its mock feature. The other was built with Python and FastAPI. They also created unit tests and mock data from the database and used the Postgres DB database in both cases.

As they shared in their video recap of the process, with Render, Python, and FASTAPI it took the team 13 days and 90 minutes with FastAPI and Render. In comparison, using Blackbird to build that same API took only three days, one hour, and 25 minutes with Blackbird.

Grocery Guardian Blackbird Demo

The Inspiration Behind the Project: Reducing Food Waste in America

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, the team aimed 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,” shares the GroceryGuardian team.

Meet the Home Grocery Management API

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. The following features streamline this process:

  • 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.

The Building Process

For the Hackathon challenge, the team tackled two builds: one in Blackbird using Go and another with Python/FastAPI and Render. The difference? Using Blackbird, they completed the API in just three days versus 13 days with Python and FastAPI. Blackbird’s accelerated environment enabled rapid endpoint creation and testing, thanks to its built-in mocking and intuitive UI.

“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,” shares the GroceryGuardian team. “Along the way, we improved our problem-solving skills and became more comfortable troubleshooting setup issues across different environments.”

Building was not without challenge, however. The team was new to GO, so it took time to ramp up but ended up being much quicker in the end when comparing the two solutions. (Note: Blackbird supports other languages in Code Runs and Deploys currently and will be adding more languages to Code Gen soon.)

“On the flip side, while creating tests in Python, we had to create some scenarios of each endpoint. We fixed some bugs in the code but it did take longer time to debug with various test cases when compared with Blackbird setup,” shares the GroceryGuardian team.

The Next Phase of GroceryGuardian for Speed

Moving forward afterwinning the hackathon, the team aims to leverage the rapid development environment of Blackbird to add more features in GroceryGuardian. The next features they’re hoping to add are:

  • Alerts and Reminders: They 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: They 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.

With Blackbird, GroceryGuardian achieved its goal of building a fast, functional solution that can make a real impact on reducing food waste, plus Blackbird was 76% faster than using FastAPI and Render. Inspired by their story? Try Blackbird for free and experience a smarter, faster way to develop APIs.