Inspiration

Software infrastructure and data centers currently consume roughly 4% more global electricity than the commercial aviation industry, and the rise of AI is only accelerating this. At the same time, new global regulations (like the EU's CSRD) are making Environmental, Social, and Governance (ESG) reporting mandatory for enterprises.

Despite this massive environmental and financial burden, developers lack native tools in their workflow to measure or optimize their footprint. We realized that carbon-efficient code is cost-efficient code. We built Carbon Lens to shift sustainability "left," putting the power to reduce emissions directly into the hands of the engineering teams building the software.

What it does

CarbonLens acts as an automated sustainability consultant for your tech stack. Developers simply drag and drop their standard configuration files (like package.json, docker-compose.yml, or requirements.txt) into our dashboard.

Our AI engine instantly parses the architecture across the compute, data, and delivery layers. It calculates an overall Green Score, estimates annual CO₂ savings, and provides a prioritized list of actionable architectural fixes such as migrating to a hydro-powered cloud region, optimizing database caching, or implementing auto-scaling to eliminate idle waste. Finally, with a single click, teams can export a perfectly formatted PDF ESG Report to hand straight to compliance officers and stakeholders.

How we built it

CarbonLens is designed as a secure, full-stack Enterprise SaaS prototype:

Frontend: We built a high-contrast, data-rich UI using HTML5, CSS3, and Vanilla JavaScript. We integrated Chart.js for real-time data visualization of cloud region carbon intensities and html2pdf.js for seamless report generation.

Backend: We engineered a secure Node.js and Express.js server to act as the brain of the operation, safely managing our API keys and handling cross-origin requests.

AI Engine: We integrated Anthropic's Claude 3.5 Sonnet API. We heavily prompt-engineered the model to act as a strict software sustainability expert, ingesting raw code and outputting highly structured JSON data for our frontend to render.

Challenges we ran into

Our biggest hurdle was enforcing strict data structures from the LLM. We needed Claude to parse complex tech stacks and return perfectly formatted JSON without hallucinating or adding conversational filler that would break our frontend logic.

Additionally, we faced challenges with the PDF generation tool (html2canvas). The initial PDF exports were rendering as blank black strips due to CSS scrollbar overflow constraints. We had to write custom JavaScript to dynamically restructure the DOM, expand the viewport temporarily to take the snapshot, and revert it instantly so the user experience remained flawless.

Accomplishments that we're proud of

We are incredibly proud of the UX/UI. We took a notoriously boring and complex topic (corporate ESG compliance and cloud infrastructure metrics) and turned it into a beautiful, drag-and-drop experience that feels like magic. We successfully bridged the gap between deep technical infrastructure choices and high-level business value, proving that reducing carbon emissions also drastically cuts cloud billing costs.

What we learned

We learned a massive amount about "Green Software Engineering." The data we researched showed us just how drastically carbon intensity varies by cloud region (e.g., deploying in AWS Mumbai vs. AWS Ireland changes footprint size by nearly 3x). Technically, we mastered building secure backend proxies for AI APIs to prevent client-side key exposure and CORS errors.

What's next for CarbonLens

Our next major milestone is moving CarbonLens out of the dashboard and directly into the CI/CD pipeline. We want to build a GitHub App that acts as an automated "Carbon Bot." When a developer opens a Pull Request, Carbon Lens will automatically analyze the changes and leave a comment: "This PR adds a heavy Redis cluster in us-east-1, increasing your carbon footprint by 12%. Click here for greener deployment alternatives." We also plan to integrate directly with AWS/GCP APIs to pull live billing and usage telemetry.

Built With

Share this project:

Updates