FullStack Developer for GreenFrame

Since 2021 I started a new job at Marmelab, a Digital Innovation Studio.

Logo of Marmelab
Logo of Marmelab

I was in charge of GreenFrame development, a SaaS application which allow to measure and reduce web app CO2 emissions.

GreenFrame: Measure and reduce your webapps CO2 emissions

GreenFrame is a SaaS based applications that provides a solution for monitoring and calculating the emissions of an application within a continuous integration environment in order to reduce their ecological impact.

Screenshot of Analyses List
Screenshot of Analyses List

The carbon footprint of the global digital system is already 4% of the global greenhouse gas emissions, and it's energy consumption rises by 9% per year. (source: The shift project)

Developers must change their practices to build sustainable applications. Green IT requires accurate measurements of CO2 emissions. GreenFrame was born out of this observation.

How it works ?

User will run a scenario like an end-to-test in their continuous integration by using the GreenFrame CLI. This scenario is based on Playwright and perform real user actions on a browser.

Code sample of a scenario
Code sample of a scenario

By Running this scenario, we will record every metrics (CPU, Network, RAM, Disk I/O) and we will convert theses metrics in mWh or gram per Co2 through an internally developed model based on scientific publications.

Capture d'écran du résultat d'une exécution dans la CLI
Capture d'écran du résultat d'une exécution dans la CLI

To record these metrics, we run the scenario in a Docker container, it will serve as a black box to isolate the browser processes from the rest of the machine. The Docker Engine API allows us to harvest metrics from this container. Once the scenario is complete, data are sent to an API that which converts it and creates a result page.

In addition, it is also possible to monitor other containers than the browser one, such as an API, a database, a Redit by listening them while the browser interacts with the web app.

Screenshot of an Analysis Page Result
Screenshot of an Analysis Page Result

GreenFrame is an early-stage project for Marmelab. We don't have designers or DevOps to help us build this application. During its development we were charge to design the UI of the application developped with NextJS for the front-end and NodeJS for the CLI and the API. The project is deployed on an AWS and the infrastructure is code-driven with Terraform.

Obviously, we take into account best practices of eco-design and digital sobriety in order to have a lightweight and resource-efficient application. By the way, GreenFrame est monitoré avec GreenFrame dans sa CI !

I learned a lot here and it was a challenging project. Especially by achieving a feature in the shortest possible time without compromising the quality of the application.