GroceryBot
Know where the whole cart is cheapest, before you shop.
One grocery list, priced across stores. A team of four, Fall 2024. I built the backend that talks to the stores.
A saved snapshot, not live: top Walmart and Amazon results for 19 common items, collected December 2, 2026. Prices vary by location.
What I built
The part that talks to the stores
I led the API research and integration: finding which grocery data we could actually get, then building the Java backend that fetches it.
Server
Set up the backend and the first integration, through RapidAPI.
Second provider
Added SerpAPI behind the same interface.
Pipelines and tests
One format for every provider, with tests on the handlers.
How it works
One list in, one comparison out
- 01
Write a list
The React frontend takes your list and, if you allow it, your location.
- 02
Ask each store
The Java backend searches Amazon and Walmart for every item.
- 03
Normalize
Every provider's answer becomes the same format: product, price, store.
- 04
Compare
Items and totals line up side by side.
The server
I set up the Java backend: a Spark web server built with Maven, with Moshi for JSON. The React frontend calls it over a few routes:
- GET /grocerySearch Amazon and Walmart through RapidAPIMy part
- GET /serpapiSearch Google Shopping through SerpAPIMy part
- GET /priceMocked provider for building the UI without spending API callsTeammates
- GET /stores/nearestThe three closest stores, or all within 10 milesTeammates
Two providers, one shape My part
I researched which grocery data we could actually get, then built a service and handler for each provider: RapidAPI for Amazon and Walmart first, then SerpAPI's Google Shopping engine. The handlers check each request and return a clear JSON error instead of crashing. On the frontend, I mapped each provider's results into the same product, price, and store fields, so the list works with either one.
Tests My part
Integration tests that call both providers through our own server, including empty queries.
The rest of the team Teammates
My teammates built the frontend, the filters and sorting, the shared price-provider interface, and the store locator that uses your device location.
What I'd do next
What the snapshot taught me
Match products, not search results. One search for bananas returned a banana-shaped stress toy. Match by size and brand, ideally by barcode.
Compare unit prices. Price per ounce, so different sizes compare fairly.
Count the real cost of splitting. Two orders mean two delivery fees.
Fill the fresh-food gap. Produce and meat need local, in-store prices.