Back to Projects
🌍AICase Study

CarbonIQ — Carbon Footprint Tracker

AI-powered carbon footprint tracker where you just type what you did — "drove 45km, ate 1kg of beef" — and Gemini figures out the rest. No dropdowns, no friction.

Next.jsTypeScriptTailwind CSSGoogle Gemini 2.0 FlashFirebase AuthFirebase FirestoreRechartsVercel

Case Study

The Problem

Carbon trackers die at the input step. Nobody wants to fill out a form with five dropdowns every time they eat lunch or take a bus. The friction kills the habit before it starts.

My Approach

Built a single natural-language input powered by one Gemini 2.0 Flash call that handles extraction, calculation, and advice simultaneously. Chose single-prompt over 3-agent pipeline to reduce API calls on free-tier limits and eliminate silent failure points. Added a confidence-gated confirmation step to protect data integrity.

The Result

A fully functional carbon tracker with real AI, real auth, and real Firestore data — not a demo. Includes Earth Debt clock, Carbon Passport with 10-year projections, personalized daily challenges, and streak/badge system. Built for PromptWars Virtual — Main Challenge 3.

What It Does

  • Natural language + photo input — AI extracts activity, quantity, and emission factor automatically
  • Real-time "Earth Debt" clock on homepage ticking up in live rupees
  • Carbon Passport page with 10-year projection chart comparing two futures
  • Personalized daily challenges based on your actual worst-emission category
  • Streak tracking, badges, and CO2 history via Firebase Firestore
  • Confirmation step when AI confidence is low — never saves bad data silently

Challenges & Solutions

Challenge 1

Most carbon trackers fail at the input step — users abandon complex forms.

Solution

Replaced all dropdowns with a single natural language field. One Gemini 2.0 Flash call extracts activity, quantity, unit, and emission factor in a single pass — no multi-agent overhead.

Challenge 2

Preventing garbage data from silently entering user carbon history when AI misreads input.

Solution

Added a confidence-based confirmation step — if Gemini is uncertain, it surfaces what it detected and waits for user approval before touching Firestore.

Challenge 3

Making abstract CO2 numbers feel real and motivating to non-expert users.

Solution

Built relatable comparisons ("= 50 phone charges"), a live Earth Debt rupee clock, and a terminal-styled Carbon Passport page that deliberately feels different from the rest of the app.

Project Gallery

CarbonIQ — Carbon Footprint Tracker screenshot 1CarbonIQ — Carbon Footprint Tracker screenshot 2CarbonIQ — Carbon Footprint Tracker screenshot 3CarbonIQ — Carbon Footprint Tracker screenshot 4CarbonIQ — Carbon Footprint Tracker screenshot 5CarbonIQ — Carbon Footprint Tracker screenshot 6CarbonIQ — Carbon Footprint Tracker screenshot 7

What I Learned

Single-prompt AI architecture vs. multi-agent tradeoffs, Firebase Auth debugging (CSP header conflicts), Recharts data visualization, India-calibrated emission factor modeling