Inspiration
In Baltimore, more than 1 in 3 residents face food insecurity. Neighbors often travel to pantries without knowing what is actually available, while busy pantries struggle to keep hours and inventory updated. Pantree makes updates simple for pantries giving neighbors live information on where to go and what is there before they leave home.
What it does
Pantree connects food pantries with neighbors through real-time inventory updates. For neighbors, Pantree shows what food and items are available right now, where to find it, and which pantries are open. Users can search by food, location, or time, with no account required.
For pantries, volunteers can check in households with one tap, report run-outs instantly, and snap a photo of incoming food to update inventory in real time. Between updates, Pantree uses mathematical modeling and a Kalman filter to estimate what is likely still on the shelf resulting in less work for pantries and fewer wasted trips for neighbors.
How we built it
We built Pantree as two separate experiences on one shared backend — a dignity-first public locator for neighbors, and a lightweight operator console for pantry staff — so clients never see admin tools and volunteers get a console built for speed.
Frontend: We used Next.js (React) with Tailwind for both apps, and Leaflet for the interactive map that shows live "Plenty / Low / Out" stock pins across Baltimore pantries.
AI donation scanning: The core of our operator toolkit is a Google Gemini 2.5 Flash multimodal vision integration. A volunteer photographs a donation — a paper delivery manifest, sealed cases, or open crates of produce — and Gemini reads it and returns structured JSON (item, category, count, packaging), which flows straight into inventory. This turns minutes of manual data entry into a single photo.
Backend: We built a Python FastAPI service exposing our pantry search, check-in, intake, and inventory-correction endpoints, backed by a lightweight JSON data store for fast, dependency-free reads and writes — ideal for shipping quickly in a hackathon timeframe.
Mathematical Engine for Inventory Tracking and Updates: Pantree uses a Kalman state-estimation loop to track pantry stock in real time. The system predicts depletion from 1-tap household check-ins, reconciles human visual checks using Kalman gain (K), and self-calibrates consumption rates after every shift:
x̂ᵦ = x̂ₚ + K(z − x̂ₚ)
Hosting: We deployed the frontend on Vercel and the backend on Render.
Built with: VS code, Claude, Antigravity and a lot of time spent debugging
Challenges we ran into
- Human checks vs. model predictions: Prevented a volunteer marking stock as Low from being overridden back to Plenty.
- Growing uncertainty: Let confidence decrease as more families are served without a shelf check.
- Inventory updates: We came up with a mathematical algorithm to update inventories based on the size of families checking in
- Deployment: As we were about to launch, we realized vercel could only deply serverless functions so we had to pivot to using Render to host our backend and connecting that as well as our gemini API key to Vercel
Keeping the backend warm: With a simple JSON-store backend and no WebSocket/real-time push, changes made by pantry staff couldn't reach neighbors' screens on their own — so we poll every 3 seconds to keep both sides in sync.
Accomplishments that we're proud of
To keep data feeling live across devices, the frontend polls the FastAPI backend every 3 seconds — which doubles as a keep-warm ping that prevents Render's free tier from spinning down, so refreshes stay responsive instead of hitting a cold start.
Made the model self-correcting, so pantry-specific usage rates improve over time.
Enforced security measure by making the sensitive data and reports aspect of the pantry view, visible to only administrators with an administrative pin.
Hid all of the math behind a 1-tap volunteer workflow so the system stays simple to use.
What we learned
- Inventory is uncertain: Real families take different amounts, so stock is better modeled as an estimate with uncertainty than a fixed number.
- Humans + math work better together: Volunteers provide quick shelf observations, while the Kalman filter combines them with the system’s running estimate.
- Supabase solely as the database source of truth is much more suitable for deploying serverless applications
- Testing features and user experience helps clarify the MVP and not clutter the application
What's next for Pantree
In the future, we hope to be able to integrate features such as easy language switching between English and Spanish as well as Kiosk feature where volunteers can easily use the app in tablet mode to check-in families on site and much more.
Built With
- fastapi
- geminiapi
- next.js
- postgresql
- supabase
- typescript
Log in or sign up for Devpost to join the conversation.