The Inspiration
We all want to save the planet, but recycling is confusing. Is a coffee cup recyclable? What about a greasy pizza box? Because of this confusion, people engage in "Wish-cycling"—tossing everything into the recycling bin hoping it gets recycled. The reality? One non-recyclable item can contaminate an entire batch, sending tons of useful material to the landfill. For Sustain-a-thon, we wanted to build a tool that doesn't just "identify trash"—we wanted to visualize the consequence. We wanted to show users that throwing a plastic comb in the trash isn't just "waste"—it's microplastics entering the ocean and fossil fuels being burned.
What it does
EcoLens is a Progressive Web App (PWA) that uses Multimodal AI
- Instant Analysis: Point your camera at any object.
- The Verdict: It instantly categorizes the item as Recyclable, Compostable, or Landfill.
Climate Consequence ⚠️: Unlike other apps, EcoLens warns you about the specific danger of negligence (e.g., "Decomposing textiles release Methane (CH4)" or "Synthetic fibers turn into microplastics").
Impact Tracking 🧪: It calculates the CO2 saved, Water conserved, and Toxic Chemicals avoided by disposing of the item correctly.
Sustainable Swaps 💡: It doesn't just scold you; it offers solutions. Scan a plastic bottle, and it suggests: "Try a stainless steel flask next time."
How we built it
We prioritized a lightweight, mobile-first stack:
- Frontend: Built with React.js and Vite for blazing-fast performance.
- AI Vision: We utilized Google Gemini (1.5 Flash). We engineered a specific prompt to force the AI to return structured JSON data containing climate impact metrics.
- PWA: We configured it as a Progressive Web App, allowing users to install it natively on Android/iOS without an app store.
Challenges we faced
- AI Hallucinations: Early versions of the AI would ramble in paragraphs. We had to strictly prompt-engineer it to return only valid JSON so our UI could render the "Danger" and "Impact" badges correctly.
- Rate Limiting (429 Errors): During testing, we hit API quotas quickly. We optimized our API calls and implemented error handling to guide the user gracefully if the service was busy.
- Mobile Layout: Creating a split-screen dashboard that worked on Desktop but transformed into a seamless "Camera + Drawer" layout on Mobile required complex CSS Flexbox handling.
Accomplishments that we're proud of
- The "Chemical Badge": We went beyond CO2. Tracking Methane and Water savings makes the impact feel much more real.
- Gamification: Implementing a "Lifetime Impact" score using LocalStorage keeps users motivated to scan more.
- Zero-Backend: The entire app runs in the browser, making it carbon-efficient and easy to deploy.
What's next for EcoLens
- Barcode Integration: Scanning UPC codes for precise material breakdown.
- Community Heatmap: Visualizing neighborhood recycling rates to encourage local competition.
- Smart Home API: Connecting to smart trash cans to auto-sort waste
Log in or sign up for Devpost to join the conversation.