• About the project Be sure to write what inspired you, what you learned, how you built your project, and the challenges you faced. Format your story in Markdown, with LaTeX support for math. About Carbon-X Carbon-X is a gamified sustainability platform designed to empower campus communities to take measurable action against climate change. By turning sustainable habits into a rewarding experience, we bridge the gap between individual effort and global impact.

🌟 Inspiration The inspiration for Carbon-X stems from a simple observation: students perform countless eco-friendly actions every day—cycling to class, taking the bus, or recycling—but these efforts often go unnoticed and uncelebrated. We wanted to build a "Fitbit for the Planet" that makes carbon reduction visible, social, and rewarding. Our goal was to replace the abstract "guilt" of climate change with the tangible "gain" of XP and rewards.

🛠 How We Built It Carbon-X is a full-stack web application built with a focus on speed, intelligence, and aesthetics.

Frontend: Built with React and Vite for a high-performance, single-page experience. We used Framer Motion to create a "Neo-Brutalism" design language featuring bold borders, high-contrast colors, and smooth micro-animations. Intelligence: We integrated Google Gemini Pro Vision to analyze user-uploaded proofs. Whether it's a photo of a bike or a recycling bin, the AI verifies the action in real-time. Backend: Firebase powers our entire infrastructure, from Authentication and Firestore (for the "Carbon Ledger") to Cloud Functions for server-side processing. Integrations: We integrated the Strava API to allow users to automatically import their cycling and running activities, converting kilometers directly into CO₂ savings. 📊 The Math Behind the Impact We use a verified carbon calculation model to determine the impact of every action. The total savings are calculated as follows:

$$CO_2_Saved = \sum_{i \in Actions} (Metric_i \times Rate_i)$$

Where the rates are defined by campus-specific sustainability benchmarks:

Cycling: $Rate_{cycling} = 21\text{g } CO_2 / \text{km}$ (Savings compared to driving) Public Transit: $Rate_{bus} = 105\text{g } CO_2 / \text{km}$ Recycling: $Rate_{recycling} = 500\text{g } CO_2 / \text{action}$ The XP system follows a linear mapping: $$XP = CO_2_Saved \text{ (in grams)}$$

🚀 Challenges We Faced The Anti-Cheat System: One of our biggest hurdles was preventing "double-counting" and fraudulent uploads. We implemented a hashing check in Firestore to ensure the same image isn't used twice and combined it with AI confidence scores to reject unrelated content. Strava OAuth Flow: Handling the Strava authentication redirect in a single-page app (SPA) required careful state management to ensure tokens were exchanged securely without breaking the user session. AI Prompt Engineering: Teaching the AI to distinguish between a "recycling bin" and a "standard trash bin" took several iterations of prompt tuning to ensure high verification accuracy. 🧠 What We Learned Throughout the development of Carbon-X, we learned how to effectively integrate multi-modal AI models into a production-ready web app. We also gained deep experience in managing complex third-party integrations and realized that gamification—through leaderboards and rewards—is one of the most powerful tools for driving real-world behavioral change.

Carbon-X isn't just an app; it's a movement to make the greenest choice the easiest choice. 🌍✨

Built With

Share this project:

Updates