Inspiration

Most people genuinely want to live more sustainably but they have no idea what their daily choices actually cost the planet. Flying once, eating beef three times a week, driving 20km a day. These feel abstract until you see the numbers. I was inspired to build CarbonLens after realising that awareness is the first step to behaviour change, and that no tool made that awareness immediate, personal, and actionable all at once.

What it does

CarbonLens is a personal carbon footprint tracker that makes your environmental impact visible in real time. You log your daily activities across five categories: transport, food, home energy, flights, and shopping. The app instantly calculates your CO₂ emissions using verified emission factors. A live dashboard shows your footprint broken down by category with charts, and a comparison view puts your numbers in context against the UK average, EU average, and the Paris 1.5°C climate target. The AI tips feature analyses your specific logged data and generates five personalised, actionable recommendations to reduce your emissions.

How we built it

CarbonLens is built with vanilla HTML, CSS, and JavaScript. No frameworks, no build step, runs in any browser. Charts are powered by Chart.js. The AI recommendations feature uses a Node.js backend proxy server to securely call an AI language model API, keeping the API key off the frontend entirely. Emission factors are sourced from:

Transport: UK DEFRA GHG Conversion Factors 2023 Food: Poore & Nemecek (2018) via Our World in Data Energy: UK National Grid ESO 2023 grid intensity Flights: ICAO Carbon Emissions Calculator methodology Shopping: WRAP lifecycle assessment averages 2023

The app is deployed on Railway with a public URL. No installation needed for users.

Challenges we ran into

The two hardest problems were sourcing accurate, up-to-date CO₂ emission factors across five different categories, and making the AI tips genuinely personalised. Getting the AI to reference the user's actual logged data rather than producing generic advice required careful prompt engineering to ensure the recommendations were specific, quantified, and directly tied to what the user had entered. Building a secure backend proxy to hide the API key from the frontend, while keeping the app simple enough to run anywhere, was also a key architectural challenge.

Accomplishments that we're proud of

The app works end-to-end with zero installation. Open a URL, log activities, get AI tips in seconds Emission calculations use real, peer-reviewed data sources rather than estimates The AI tips are genuinely personalised. They reference the user's exact inputs and quantify the potential CO₂ saving for each recommendation The comparison view gives users meaningful context. Seeing your footprint against the Paris 1.5°C target makes the challenge feel real and urgent

What we learned

Behaviour change is the hardest problem in climate action. The best tool is one that makes the cost of each choice undeniable and the path to improvement clear, personal, and immediate. We also learned that the quality of AI recommendations depends entirely on the quality of the prompt. Vague instructions produce vague advice, but grounding the AI in specific user data produces tips that actually resonate.

What's next for CarbonLens

Streak tracking and weekly goals: gamify the reduction journey Smart meter API integration: automatic energy logging without manual entry Shareable carbon score card: let users share their progress on social media Team and household mode: track collective footprints for families or offices Historical trend chart: see your footprint improving over time Carbon offset marketplace: direct links to verified offset projects for unavoidable emissions

Share this project:

Updates