CarbonScope
Inspiration
Cities are the heartbeats of our world, but they're also major contributors to climate change. As urban planners, sustainability consultants, and even passionate students, we often struggle to answer a fundamental question: "How sustainable is this specific place, and how can we make it better?" The data is often scattered, abstract, and difficult to communicate. We were inspired to build a tool that could instantly bridge this gap to make sustainability analysis accessible, visual, and actionable for anyone, anywhere. We envisioned a professional toolkit that could transform a complex analysis that takes weeks into a report that takes minutes, empowering professionals to drive meaningful change and win proposals with compelling, data-driven narratives.
What it does
CarbonScope is an AI-powered sustainability analysis platform that transforms any location on Earth into a comprehensive, interactive report. A user simply provides a location (like a city, neighborhood, or even a single street) and a few key points of interest.
Our application then:
- Analyzes the Area: Using generative AI, it analyzes the points of interest to understand the environmental context identifying high-traffic areas, green spaces, industrial zones, and commercial districts.
- Generates a Data-Driven Report: It produces a full sustainability report that includes:
- An estimated Carbon Score (0-100), providing a simple metric for the location's current state.
- A Benchmark Score to compare the location against regional or global averages.
- A detailed Emissions Analysis identifying the primary sources of pollution.
- Concrete, actionable Recommendations for improvement, each with a potential impact analysis and a plausible, real-world address for implementation.
- Visualizes the Future:
- The "Green Vision" feature uses generative image models to create stunning, photorealistic images of what the location could look like with sustainable initiatives in place.
- An Interactive Map displays a heatmap of opportunity hotspots and pinpoints the exact locations for each recommendation.
- The "Impact Simulator" allows users to select which recommendations they'd like to implement, and the app instantly recalculates the Carbon Score and generates a new, combined "Green Vision" image, providing a powerful "before-and-after" narrative.
How we built it
CarbonScope is a full-stack web application built on a modern, robust, and scalable tech stack:
- Frontend: We used Next.js and React for a fast, server-rendered user interface, styled with Tailwind CSS and beautiful, pre-built components from ShadCN UI. For dynamic animations that bring the UI to life, we used Framer Motion.
- Backend & AI: The core intelligence is powered by Genkit, an open-source framework from Google for building production-ready AI applications. Our Genkit flows orchestrate multiple calls to the Gemini API for text analysis, data generation, and image generation (using Gemini 2.0 Flash). We used features like structured output (Tool use) to ensure the AI's responses are consistently formatted and reliable.
- Mapping & Geolocation: All mapping features, including heatmaps, geocoding addresses to coordinates, and finding nearby points of interest, are powered by the Google Maps Platform APIs.
- Database & Authentication: We used Firebase Authentication for secure and easy user sign-in (via Google) and Cloud Firestore as our NoSQL database to store user data and their saved analysis reports.
Challenges we ran into
One of the biggest challenges was prompt engineering and schema enforcement with the AI. Getting the generative model to consistently return data in a specific JSON format, especially with complex nested objects for recommendations, required many iterations. We learned to be extremely specific in our instructions and used Zod schemas to validate the output rigorously.
Another challenge was integrating multiple asynchronous AI calls (for data analysis, image generation, and impact simulation) without making the user wait too long. We tackled this by running some AI flows in parallel and using loading states and optimistic UI updates to create a smoother user experience, like generating a "Did you know?" fact to keep the user engaged during analysis.
Accomplishments that we're proud of
We're incredibly proud of the Impact Simulator. It's the core of the application and provides a tangible, interactive way for users to see the direct results of their choices. Watching the Carbon Score increase and seeing a brand new, greener "Green Vision" image generate in real-time is a powerful moment that truly brings the data to life.
We are also proud of the professional-grade UI/UX. We didn't just want to build a functional tool; we wanted to create a polished, client-ready platform that a real-world urban planner or consultant would be happy to use in a presentation.
What we learned
This project was a deep dive into the power of multi-modal generative AI. We learned that the real magic happens when you chain different AI capabilities together using text models for analysis, then feeding that output into image models for visualization.
We also learned the importance of robust error handling and schema validation when working with AI. Models can be unpredictable, and building a resilient application requires anticipating and gracefully handling responses that don't match the expected format.
What's next for CarbonScope
This is just the beginning! We have a clear vision for the future of CarbonScope:
- Integrate Real-Time Data: We plan to connect to live APIs for air quality, traffic data, public transit information, and building energy consumption to make our Carbon Score even more accurate and dynamic.
- Pro Tier & Collaboration: We'll build out the "Upgrade to Pro" feature to offer more detailed reports, unlimited scans, and collaborative tools for teams of planners and developers to work on projects together.
- Policy & Cost Analysis: We want to add another AI layer that suggests local policies that could support the recommendations and provide rough cost-benefit analyses for each proposed intervention.
- Mobile-First Experience: We will develop a dedicated mobile version to allow for on-site analysis, letting users get sustainability insights while walking through a neighborhood.
Built With
- firebase
- gemini
- genkit
- google-maps
- nextjs
- react
Log in or sign up for Devpost to join the conversation.