Inspiration
Food here at UCSD is expensive. Conversely, club meetings and events I've been to that offer free food almost always have food left over that nobody wants to take home. Restaurants also have tons of food waste left over at the end of the day that is perfectly edible, but goes into the dumpster anyway. All of this compounds to college students spending way more on food than is necessary when there is so much food waste around campus. FreeEats aims to fix this issue by providing students, club officers, and business owners a way to give away or sell leftover food at a discounted price.
What it does
FreeEats is a progressive web application that allows anyone to contribute, review, and view locations and information about free food around their college campus. Upon signup, the user will be prompted for their campus, their food preferences, and their dietary restrictions, which will be taken into account as they use the app. The main UI has two views: a map view so users can see locations of free food on a map taking their location into account, and a feed view so users can see more detailed information about food in real time, sorted by dietary restrictions, food preferences, and proximity to the user. Food submissions are filtered by AI so that people don't submit non-food items.
How we built it
We built this app using Next.js for the frontend and Convex for the backend and database. Convex provides real-time updates to the frontend as the database changes, which is perfect for our usecase. We used Clerk for authentication because it integrates nicely with Convex. We also used AI SDK along with the Gemini API to filter out spam posts.
Challenges we ran into
One issue we ran into was content moderation at scale. Since anyone can sign up, if this app were to ever hit a larger user base, scam and spam posts are unavoidable. We wanted to avoid manual moderation, since this would take valuable time away from us that could be used to make the product better. So, we settled on AI-powered spam filtering using gemini-2.5-flash that analyzes both images and text before posts go live. The tricky part was handling the asynchronous nature of AI validation: posts are held in a "pending" state while the AI verifies they're actually food-related, with graceful fallbacks if the API is down.
Another challenge we ran into was the prevention of trolling with the "food is gone" button. We wanted a way for students to tell others if food is gone prematurely, but wanted to prevent users from "trolling" other users by removing another user's food. To solve this, we built a reputation system where reports only trigger expiration after multiple distinct users report it, and the original poster receives notifications about this. We also added food reviews/ratings so users could build credibility over time, which required designing a whole review schema with photos and ratings.
Accomplishments that we're proud of
- Review System: We implemented a complete food rating and review platform with 1-5 star ratings, written feedback, and optional review photos. The system prevents self-reviews, supports editing/deleting reviews, and calculates real-time average ratings. Reviews are indexed for fast lookups.
- Responsive-First Design: We built a custom responsive dialog component that switches between desktop modals and mobile drawers based on viewport size, ensuring that the app felt native and pleasant to use on any device. The result feels native on every device.
- Dietary Restriction/Preference Engine: We built a dietary tagging system supporting 7+ different restriction types (vegan, halal, kosher, gluten-free, etc.) that works both for filtering posts. Users can set their dietary needs during signup and the feed automatically highlights matching food.
- Production-ready architecture: We followed Convex best practices throughout: proper indexes for query performance, type-safe IDs, internal vs. public function separation, and efficient database patterns.
What we learned
We learned that responsive design is not just CSS media queries; it requires component-level decisions. For example, dialogs are not mobile/touch-friendly, and there is no way to convert a dialog to a mobile-friendly drawer at breakpoints using media queries. We had to write a custom component that switched between the two.
We also learned proper hackathon feature scope management: we added AI filtering mid-project, expanded from 10 to 380+ campuses, and redesigned the UI twice. We learned to build vertical slices first: a working end-to-end flow before adding features like reviews or dietary tags.
What's next for FreeEats
We hope to expand FreeEats to more than just college campuses. Food waste is a real problem everywhere, especially in big cities like San Diego, and FreeEats has the potential to feed people who need food while decreasing the effect of food waste on the environment. We will ensure that users of our app will never pay; instead, costs will be covered through non-intrusive, food-only ads, from restaurants or small businesses with surplus food.
Built With
- ai-sdk
- clerk
- convex
- gemini
- next
- openstreetmap
- react
Log in or sign up for Devpost to join the conversation.