fullpath-emissions-cost-model

Privileged Web Extension: Carbon Visualiser GitHub license CI Dependabot Updates Server Uptime

Firefox priviledged browser extension to track the internal system metrics and generate estimated carbon emissions.

Overview

This browser extension uses experimental API features in Firefox for access metrics and is built with modern web technologies including React, TypeScript, and Webpack. The project leverages Babel for transpilation, Material UI and Emotion for styling, and a suite of tools to streamline development and packaging.

Additionally, a backend service, cost-estimation-server, supports the extension by providing data and real-time communication. This component is deployed live; check its status above.

Interface

Screenshot 2025-03-28 at 20 55 20 Screenshot 2025-03-28 at 20 55 30

Known Limitations

When starting a tracking session, please note the following:

Browser Extension (cost-model-addon)

Requirements

Installation

  1. Clone the Repository:

    git clone <repository-url>
    cd cost-model-addon
    
  2. Install Dependencies:

    npm install
    

Available Scripts

Script Command Description
test echo "Error: no test specified" && exit 1 Placeholder for tests (no tests currently specified).
build webpack --config webpack.dev.js --mode=development --watch Bundles the project in development mode and watches for file changes.
clean rm -rf dist Cleans the build output by removing the dist directory.
xpi cd dist && web-ext build --overwrite-dest && mv web-ext-artifacts/carbon_footprint_tracker-1.0.zip web-ext-artifacts/carbon_footprint_tracker-1.0.xpi Packages the extension as a Firefox XPI file.
build:production webpack --config webpack.prod.js --mode=production Bundles the project for production deployment.

Development

Key Dependencies

Backend Service (cost-estimation-server)

Overview

The cost-estimation-server supports the browser extension by providing data and real-time communication. Built with Node.js, Express, and TypeScript, it is deployed live and its status can be monitored through the provided links.

Requirements

Installation

  1. Navigate to the Backend Directory:
    (If the backend service is in a separate directory, navigate accordingly.)

    cd cost-estimation-server
    
  2. Install Dependencies:

    npm install
    

Available Script

Script Command Description
start tsc --noEmit & node --no-warnings=ExperimentalWarning --loader ts-node/esm src/index.ts Compiles the TypeScript files (without emitting) and starts the backend service using ts-node and Node.js.

Development

License

This project is licensed under the MIT License.