Inspiration

Climate change often induces "eco-anxiety"—a feeling that the problem is too abstract, and individual actions don't matter. We noticed a fascinating behavioral paradox: people will enthusiastically optimize a three-digit financial credit score (like FICO) because it's visible, gamified, and rewarding. Yet, their environmental impact remains completely invisible. Tracking carbon footprint today is tedious, requiring users to manually log every commute or meal in boring spreadsheets.

We asked ourselves: What if we built a financial bank for carbon emissions that eliminates data-entry friction using AI, and makes sustainability genuinely addictive? CarbonLedger was born to bridge this gap, turning climate action into a highly engaging, frictionless, and rewarding daily habit.

## What it does CarbonLedger is an AI-powered financial ecosystem for your emissions. It operates exactly like a modern banking app, but for your carbon footprint:

  • 🤖 Conversational "Carbon Banker": Instead of static forms, users are greeted by an AI agent that converses with them to understand their lifestyle (diet, commute) and autonomously calculates a personalized, realistic monthly $CO_2$ budget.
  • 📸 Frictionless Receipt Scanning: Tracking is no longer a chore. Users simply snap a photo of a messy, crumpled grocery or shopping receipt. Our Vision AI pipeline instantly performs OCR, categorizes the products, calculates the exact kilogram $CO_2$ equivalent for each item, and logs it into the user's ledger.
  • 📈 Dynamic Eco-Score Engine: CarbonLedger evaluates user behavior to generate a dynamic score (300 to 850). The algorithm actively rewards staying under budget, week-over-week emission reductions, and logging sustainable "Smart Swaps" (e.g., taking the metro instead of a cab).
  • 🏦 AI Monthly Statements: At the end of every month, the AI analyzes the user's transaction ledger and generates a personalized "Banker's Note"—detailing their environmental trajectory, congratulating wins, and offering hyper-personalized, actionable insights for the next month.

## How we built it CarbonLedger is built on a modern, fully decoupled full-stack architecture to ensure scalability and extremely fast UI interactions.

  • AI Orchestration (Google Genkit): We heavily utilized Genkit as our core orchestration framework to manage multi-turn chat sessions, handle agentic tool-calling, and enforce strict, structured JSON outputs from our underlying Large Language Models.
  • Multi-modal Vision: We integrated advanced vision models to process unstructured image data (receipts), extract text via OCR, reason about the items' environmental impact, and output structured payload data to our backend.
  • Frontend (React + Vite + TypeScript): We focused heavily on an elite UI/UX. We used Framer Motion for premium micro-animations, Spline for beautiful interactive 3D elements, and Recharts for visualizing emission data. Tailwind CSS powers our sleek dark-mode aesthetic.
  • Backend & DB: A lightweight Node.js/Express backend connects to Firebase Cloud Firestore (NoSQL) to securely store hierarchical user profiles and ledgers, secured by Firebase Authentication.

## Challenges we ran into

  1. Taming Multi-Modal Outputs: Getting an LLM to look at a blurry, crumpled receipt and reliably output strictly-typed JSON without hallucinating or breaking the app was incredibly difficult. We overcame this by building robust schema validation pipelines using Zod and Genkit, forcing the model into strict adherence.
  2. Carbon Math Context: Prompting the AI to accurately estimate $CO_2$ equivalents for highly varied, obscure grocery items required extensive prompt engineering and context tuning to ensure the estimates were scientifically grounded and realistic.
  3. UI Performance: Balancing heavy 3D Spline rendering and complex Framer Motion layout animations while keeping the React DOM lightning-fast required significant optimization and clever component lazy-loading.

## Accomplishments that we're proud of

  • Zero-Friction UX: We successfully eliminated the biggest hurdle in sustainability apps—manual data entry. Scanning a receipt feels like magic.
  • Agentic Architecture: Building "Greenie" (our Carbon Banker) as a true tool-calling agent rather than just a simple text-in/text-out chatbot.
  • Design Engineering: We built an interface that doesn't feel like a boring utility, but a premium, modern fintech product that users actually want to open every day.

## What we learned

  • AI Orchestration: Deep insights into building resilient AI pipelines that combine natural language reasoning, vision capabilities, and strict schema enforcement.
  • Behavioral Psychology: How gamification mechanics (scores, ledgers, rewards) can be directly mapped to sustainability to drive real-world behavioral changes.
  • Complex UI State Management: Managing complex, animated UI states driven by asynchronous AI streaming responses.

## What's next for CarbonLedger

  • Plaid / Open Banking Integration: Connecting directly to users' bank accounts to auto-categorize purchases and calculate carbon costs instantly, removing the need for receipts entirely.
  • Social Leaderboards: Allowing users to form "Neighborhoods" or "Squads" to compete for the highest average Eco-Score, bringing a social, competitive edge to climate action.
  • Real-World Green Rewards: Partnering with sustainable brands (like public transit or eco-friendly grocery stores) to offer tangible discounts for users who maintain a high Eco-Score.
Share this project:

Updates