Inspiration

I wanted to solve a global issue that affects our lives and the planet. Food waste is one of them. Globally, about one-third of all food is wasted, totaling 1.3 billion tons a year. Additionally, it accounts for significant environmental impacts, including a large carbon footprint and a massive waste of resources. Here at USC, I often find myself having random leftovers in my fridge. Moreover, being a freshman with limited cooking experience, I struggle to decide what to make or how to cook it. Therefore, I came up with Scraps.AI that provides convenience in searching for recipes tailored just for me. Unlike traditional recipes, Scraps.AI also provides a cooking assistant to answer all questions during the cooking process. This way, it motivates people like me who might usually just throw out leftovers to utilize them into delicious food. To me, there is no such thing as waste, just unexplored potential. By providing convenience through technology, I believe we can make doing the right thing the easiest thing.

What it does

Scraps.AI generates recipes with your leftovers based on your preference. The user inputs ingredients/leftovers, available seasonings, and equipment. Seasonings and equipment will be permanently saved until the user unchecks them. The preference page allows users to input their preferences, including cuisine type, calories, preparation time, and dietary restrictions. Based on the user input, Scraps.AI will generate a list of recipes powered by AI. After selecting a recipe, the users can view its details such as ingredients, equipment, and instructions. The recipe page also has an AI cooking assistant that acts as a chatbot to inquire about general cooking questions. After completing the recipe, the user will be greeted with a congratulations page with the estimated number of waste saved, points gained, a leaderboard, and a rating system. A profile page will save all the recipes

How we built it

This web application is made using Lovable. Lovable is a platform that lets you build apps and websites by chatting with AI. I prompted several prompts into Lovable to create and optimize the website. Specifically, the front end was made using React and TypeScript for the UI, Vite for the build tool and dev server, Tailwind CSS for styling, shadcn/ui for reusable component library, React Router for client-side routing, and TanStack Query for server state management. The backend uses Lovable Cloud, PostgreSQL Database to store user data, Row Level Security for authentication, and edge functions as a serverless function for AI integration. For the AI part that powers recipe generation, it uses Lovable's AI Gateway, which uses Google Gemini, specifically gemini-2.5-flash. The entire app is built with modern best practices, from type safety, security-first design, and seamless AI integration without exposing API keys to the client.

Challenges we ran into

The main challenge would be the accuracy that comes from using AI models. Currently, AI can still make errors and mistakes. At times, if the input is too complicated, the model would either fail in generating recipes, generate similar repetitive recipes, or even generate bad recipes in general.

Accomplishments that we're proud of

Overall, I'm proud of the idea itself and how I utilized Lovable to create an impactful project. I'm also proud of the demo video that my team worked on; I really stepped outside of my comfort zone for it.

What we learned

I learned how to leverage Lovable for quick, no-code AI integration. Additionally, by reading Lovable's generated code, I was able to learn a lot of technical aspects from it. In the future, I hope to be able to improve my coding skills to fully implement ideas. Lastly, creating this project gave me hands-on experience with how AI can be used for social good. From the start to the end, this hackathon gave me a platform to test my creativity and skills.

What's next for Scraps.AI

On the technical side, the model can be further optimized to increase accuracy through the use of more data. New features can also be added, for example, image recognition for the ingredients. I would also like to improve the collaborative aspect of the program and make it more interactive through a social media-like platform. Other than the leaderboard, users can upload pictures of food they made to their gallery and share them with others. With further improvements, I hope Scraps.AI can motivate others to reduce food waste.

Built With

Share this project:

Updates