DEV Community

Cover image for EcoTwin: An AI Climate Coach for Real-World Emissions Cuts
jaysid97
jaysid97

Posted on

EcoTwin: An AI Climate Coach for Real-World Emissions Cuts

DEV Weekend Challenge: Earth Day

What I Built
EcoTwin is a personalized climate action coach that turns a few everyday inputs, like commute habits, food choices, home energy use, and travel frequency, into a practical action plan with estimated annual CO2e savings.

The goal was to build something useful immediately. Instead of giving users a generic sustainability lecture, EcoTwin acts like a climate twin: it estimates a baseline footprint, then recommends the highest-impact changes first.

Users get:

  • A baseline annual footprint estimate
  • A personalized set of top climate actions
  • Projected annual CO2e savings
  • A concise AI coaching summary powered by Gemini (with fallback if key is unavailable)

Demo
Live demo: https://ready-lamps-poke.loca.lt

Quick walkthrough:

  1. Open the app
  2. Enter a city and lifestyle inputs
  3. Click Generate My Climate Plan
  4. Review before/after footprint and recommended actions
  5. Read the AI coach summary

Code
Source code is in the project folder:

  • Backend: Flask API for scoring, recommendations, and AI summary
  • Frontend: HTML/CSS/JS dashboard with interactive results
  • Data: Curated action library with estimated CO2e savings

Core implementation highlights:

  1. Transparent footprint estimation model
  2. Rule-based personalization of actions by user profile
  3. Gemini API integration for natural-language coaching
  4. Stable local fallback summary for reliability

How I Built It
I built EcoTwin as a focused full-stack Flask app to keep the product easy to run, easy to demo, and easy to judge.

Architecture flow:

  1. Frontend collects a lightweight user profile
  2. Backend computes annual baseline emissions
  3. Action library is filtered by relevance and sorted by impact
  4. App calculates projected reductions and renders before/after metrics
  5. Gemini generates a short personalized coaching summary

Design decisions:

  • Kept input friction low so users can get value in seconds
  • Prioritized practical behavior-change suggestions over abstract climate theory
  • Added clear before/after visuals to make impact tangible during a live demo

Prize Categories
This submission is for:

  • Best use of Google Gemini
  • Best use of GitHub Copilot

Team
Solo submission.

Top comments (0)