I built a Carbon Footprint tracker for my code (using Electron?!) ๐Ÿƒ

Published: (February 8, 2026 at 11:59 AM EST)
2 min read
Source: Dev.to

Source: Dev.to

The Problem: Invisible Emissions โ˜๏ธ

As developers, we are obsessed with optimization. We profile our code for time complexity ($O(n)$), memory leaks, and bundle size.
But there is one metric we usually ignore: carbon intensity. Every time we run a heavy build, spin up a Docker container, or train a model, we draw power. Depending on where you live (and your gridโ€™s current mix of coal vs. renewables), that power has a carbon cost.

I wanted to see that cost in realโ€‘time, so I built CarbonLint.

Solution: CarbonLint

CarbonLint is an openโ€‘source desktop app that monitors your development environmentโ€™s energy usage and estimates the COโ‚‚ emissions of your workflow. It helps you answer questions like:

  • โ€œHow much COโ‚‚ did that last CI/CD run generate?โ€
  • โ€œIs my local grid green right now, or should I wait to run this heavy task?โ€

The app is built with Electron, React, and Vite.

Architecture

Backend

  • Uses systeminformation and node-powershell to pull raw system metrics (CPU, memory, network).

Calculation

  • Applies regional grid intensity factors to convert raw kWh into gCOโ‚‚.
  • The hardest part was obtaining accurate regional data; the app fetches and caches grid intensity values for the userโ€™s location.

Frontend

  • React + Chart.js for visualizing energy usage and emissions.

Contributing

I am looking for contributors to help improve the calculation models and add support for more regions.
Repository:

Tech Stack

  • Electron
  • React
  • TailwindCSS

Call for Feedback

If you are interested in Green Software Engineering, Iโ€™d love your feedback!
Let me know in the comments: Do you track your codeโ€™s energy usage?

0 views
Back to Blog

Related posts

Read more ยป

Happy women in STEM day!! <3

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as we...