Inspiration
India generates over 1.6 lakh tonnes of solid waste daily, and a huge share of recyclable material still ends up in landfills — often because people simply don't know which bin an item belongs in. We kept standing in front of our own garbage asking "is this recyclable?" and realised the answer should be one photo away. So we built it.
What it does
ECO SNAP turns your camera into a waste-sorting expert:
- Snap & analyse — upload or drag-drop any photo of a waste item
- AI identification — Google Gemini Vision identifies the object and its material
- Recyclability verdict — a clear yes / conditional / no answer with confidence
- Correct disposal — tells you exactly which bin or category to use, with handling steps
- Environmental impact — explains what happens if it's recycled vs. landfilled, with an impact severity rating
- Reuse ideas — practical upcycling suggestions before you throw it away
- Personal impact tracker — every real scan is logged locally, showing items scanned, recyclables found, and estimated CO₂e saved
- Honest results — every result card is explicitly labelled "Live AI analysis" or "Demo sample". Failed AI calls show the real error, never a fabricated answer.
How we built it
- Frontend: React 19 + TypeScript with TanStack Start, styled with Tailwind CSS v4 in a dark-green glassmorphism design system, animated with Framer Motion
- AI: Google Gemini Vision (structured JSON output enforced with a response schema), called from a secure server-side function — the API key never touches client code
- Validation: Zod schemas validate every AI response before it's shown, so malformed output fails safely instead of showing wrong information
- Guardrails: the AI returns an
isWasteObjectflag, so photographing your dog gets a friendly "that's not waste" message instead of a nonsense analysis - Resilience: a model fallback list handles Google retiring preview models (we hit this live and fixed it), with typed error states for rate limits, blocked content and network failures
- Storage: scan history and impact stats live in localStorage — no account needed, private by design ## Challenges we ran into
- Google retired the Gemini model we started with for new free accounts, breaking every analysis with a 404 — solved with an automatic model fallback chain
- Getting reliably valid structured JSON from a vision model — solved with response schemas plus client-side Zod validation
- Drawing the line between AI failure and AI honesty — we made the hard call that the app never invents results, even when it would look smoother ## Accomplishments that we're proud of
- A real, working end-to-end flow: photo → genuine AI analysis → animated result cards → impact tracker
- An honesty-first design where demo data is visibly separated from live AI output
- One polished, distinctive visual identity instead of a generic template ## What we learned
- Model availability changes fast: production AI apps need fallback chains, not hardcoded model names
- Structured-output enforcement plus schema validation turns an unpredictable LLM into a dependable API
- Trust in an AI product comes from labelling and honest failures, not from hiding the seams ## What's next for ECO SNAP — AI Waste Scanner
- Live camera capture, not just uploads
- Local recycling-centre lookup and pickup scheduling
- Community leaderboards for waste diverted from landfill
- Regional recycling rules (bin colours differ by city)
Built With
- framer-motion
- gemini-vision
- google-gemini
- me
- react
- tailwindcss
- tanstack-start
- typescript
- vite
- zod