DEV Community

Parul Malhotra
Parul Malhotra

Posted on

EarthLens AI: A Multimodal Climate Scientist in Your Pocket, Powered by Google Gemini

DEV Weekend Challenge: Earth Day

This is a submission for Weekend Challenge: Earth Day Edition

What I Built

EarthLens AI gives you climate-related queries in real time

I built EarthLens AI — an intelligent, multimodal environmental analysis platform that acts as a pocket climate scientist for anyone with a smartphone.

The platform has four core features:

  • EcoVision — Upload or snap a live photo of any environment (river, forest, urban area, factory). Google Gemini analyzes it and returns an Eco Score, biodiversity assessment, and sustainability evaluation with actionable insights.
  • EcoChat — A real-time streaming AI sustainability assistant that answers climate questions and contextualizes your uploaded images.
  • Carbon Compass — An interactive calculator that evaluates your personal carbon footprint across transport and lifestyle categories, with AI-powered reduction tips.
  • Earth Pulse — A live dashboard of key global environmental indicators.

All results can be downloaded as a PDF report or shared natively via WhatsApp, Email, and other apps directly from your device.

Demo

🌍 Live App (Google Cloud Run): https://earthlens-1006999380256.us-central1.run.app

The app is a fully installable Progressive Web App (PWA) — on mobile, tap "Add to Home Screen" for a native app experience!

Code

GitHub logo parulmalhotraiitk / earthlens

EarthLens AI is a multimodal environmental intelligence platform powered by Google Gemini. Upload photos of habitats, analyze daily carbon impacts, and chat about global sustainability through the lens of AI.

🌍 EarthLens AI

An intelligent, multimodal environmental analysis platform powered by Google Gemini.

EarthLens AI Banner

🔗 Live Demo: earthlens-1006999380256.us-central1.run.app


🚀 Overview

EarthLens AI brings the complex world of climate science down to a personal, actionable level by leveraging the powerful multimodal capabilities of the Google Gemini API. Designed to act as a pocket environmental scientist, the application allows users to assess ecological health, track their personal footprint, and learn about sustainability effortlessly.


✨ Key Features

Feature Description
📸 EcoVision Upload or snap live photos of any environment — rivers, forests, cities, factories — and get an instant AI-powered Eco Score, Key Findings, and Recommended Actions
💬 EcoChat A conversational climate assistant powered by Gemini that can answer any question about sustainability, biodiversity, or climate change
👣 Carbon Compass A 4-step lifestyle questionnaire that calculates your personal carbon footprint and generates a tailored Gemini action plan
🌍 Earth Pulse Live global climate

How I Built It

Frontend: Vanilla HTML5, CSS3, and JavaScript — no heavy frameworks. I built a premium glassmorphic dark-mode UI with CSS Grid, smooth micro-animations, and a fully responsive mobile-first layout down to 320px screens.

Backend: A lightweight Node.js + Express.js proxy server sits between the browser and Google Gemini. This keeps the API key completely server-side (stored in Cloud Run environment variables) and applies an in-memory rate limiter (30 req/min per IP) to prevent abuse.

Google Gemini Integration:

  • EcoVision uses the multimodal generateContent endpoint — base64-encoded images are sent alongside structured prompts that force consistent scoring output.
  • EcoChat uses streamGenerateContent with Server-Sent Events (SSE) piped directly from Gemini → Node → browser, creating a real-time typewriter streaming effect.
  • The model used throughout is gemini-3-flash-preview for speed and multimodal capability.

Deployment: The entire app is containerized with Docker and deployed serverlessly on Google Cloud Run with automatic scaling.

Prize Categories

Best Use of Google Gemini — EarthLens AI is fundamentally built around Gemini's multimodal capabilities. The entire platform — from live image-based ecological scoring in EcoVision, to real-time streaming conversations in EcoChat — would not be possible without Gemini's ability to reason across both images and text simultaneously.

Top comments (0)