DEV Community

Muhammad Zulqarnain
Muhammad Zulqarnain

Posted on

EcoMind: AI Carbon Footprint Analyzer for Earth Day 2026

DEV Weekend Challenge: Earth Day

What I Built

EcoMind is an AI-powered carbon footprint analyzer that helps individuals understand their environmental impact and receive personalized, actionable recommendations to reduce their carbon emissions.

Live Demo: https://ecomind-coral.vercel.app
GitHub: https://github.com/mzunain/ecomind

Demo

EcoMind provides:

  • 🌍 Instant carbon footprint analysis based on your lifestyle
  • 📊 Sustainability score (1-10) with detailed breakdown
  • 💡 Top 5 personalized reduction actions ranked by impact
  • 🌱 Region-specific advice (optimized for Nordic countries)
  • ⚡ Fast, beautiful dark theme UI

Journey

Why Google Gemini?

I chose Google Gemini for its structured JSON output capability, which is perfect for generating consistent, type-safe environmental data. The model excels at understanding complex lifestyle patterns and providing nuanced, regional advice.

Technical Implementation

Using Next.js 15 with the App Router and Google's @google/generative-ai SDK, I implemented:

  1. Structured Schema: Defined a TypeScript schema for carbon analysis
  2. Regional Context: Added location-aware recommendations
  3. Difficulty Scoring: Categorized actions by implementation difficulty
  4. Premium UI: Modern glassmorphism design with Tailwind CSS

Challenges Faced

  • Model naming: Gemini API model versions required experimentation
  • Structured output validation: Ensuring consistent JSON responses
  • Regional accuracy: Balancing global averages with local context (e.g., Finland's clean energy grid)

Category Submission

Best Use of Google Gemini - EcoMind showcases Gemini's strength in structured data generation and contextual understanding for environmental impact analysis.

Additional Prize Categories

N/A

Top comments (0)