This project visualizes the carbon footprint of software development activities, helping developers and teams make more sustainable choices. It collects data from GitHub Actions, calculates green software metrics (CO₂ emissions, energy consumption), and displays them in an interactive dashboard. In this project, CO2 emission is estimated using simplified version of Software Carbon Intensity (SCI) specification by Green Software Foundation (GSF). The dashboard was hosted on AWS EC2.
-
Fetches and displays metrics such as:
-
Repository name
-
Commit hash
-
Duration of run
-
Energy consumed
-
Estimated CO₂ emissions
-
Timestamp of the activity
-
-
Clean and minimal UI built with React
-
API endpoint served via a Node.js or compatible backend
- Frontend: React + Tailwind CSS
- Backend: Node.js / Express (or compatible) serving
/api/green-metrics - Tunneling: Ngrok (used when GitHub Actions needs to send data to a local backend)
- Deployment: Docker / AWS EC2-ready setup
git clone https://github.com/malihanawshin/Develop_Greenly.git
cd green-dev-dashboardnpm installnpm run devEnsure your backend is running locally and exposes the GET /api/green-metrics endpoint.
Example:
node server.jsThe frontend can read from the local backend directly through the Vite proxy. Ngrok is only needed when a GitHub-hosted workflow has to POST metrics into your local machine.
Start the backend:
cd green-dev-backend
npm startIn another terminal, expose the backend:
npx ngrok http 3000Then add or update these GitHub repository secrets in the project whose workflow sends metrics:
GREEN_METRICS_URL=https://your-ngrok-url.ngrok-free.app/api/green-metrics
GREEN_METRICS_TOKEN=your-shared-token
When running the backend with token protection enabled, use the same token locally:
METRICS_API_TOKEN=your-shared-token npm startFor a stable deployment, use a hosted backend URL instead of ngrok and keep the same GREEN_METRICS_URL secret.
[
{
"repo": "malihanawshin/LAN-Chat",
"branch": "main",
"commit": "be7787a42f9561fad8c17cfdbb4e81ac461d36c1",
"duration": 15,
"runner_type": "Linux",
"energy": 0.0125,
"co2": 5.94,
"timestamp": "2025-07-14T18:08:37.987Z"
}
]This project is under the MIT License.