Giter Site home page Giter Site logo

Green Web Foundation API

In this repo you can find the source code for the API and checking code that the Green Web Foundation servers use to check the power a domain uses.

Build Status

Overview

Following Simon Brown's C4 model this repo includes the API server code, along with the green check worker code in packages/greencheck.

API

Apps - API Server at api.thegreenwebfoundation.org

This repository contains the code served to you when you visit http://api.thegreenwebfoundation.org.

When requests come in, symfony accepts and validates the request, and creates a job for enqeueue to service with a worker.

API

The greenweb api application running on https://api.thegreenwebfoundation.org

This provides a backend for the browser extensions and the website on https://www.thegreenwebfoundation.org

This needs:

  • an enqueue adapter, like fs for development, amqp for production
  • php 7.3
  • nginx
  • redis for greencheck library
  • ansible and ssh access to server for deploys

Currently runs on symfony 5.x

To start development:

  • Clone the monorepo git clone [email protected]:thegreenwebfoundation/thegreenwebfoundation.git
  • Configure .env.local (copy from .env) for a local mysql database
  • composer install
  • bin/console server:run
  • check the fixtures in packages/greencheck/src/TGWF/Fixtures to setup a fixture database

To deploy:

  • bin/deploy

To test locally:

Packages - Greencheck

In packages/greencheck is the library used for carrying out checks against the Green Web Foundation Database. Workers take jobs in a RabbitMQ queue, and call the greencheck code to return the result quickly, before passing the result, RPC-style to the original calling code in symfony API server.

API

Packages - public suffix

In packages/publicsuffix is a library provides helpers for retrieving the public suffix of a domain name based on the Mozilla Public Suffix list. Used by the API Server.

The Green Web Foundation's Projects

greentrace-lib icon greentrace-lib

The standalone library used by the GreenTrace App, to map network traces and the power they use

grid-intensity icon grid-intensity

A simple API to build awareness of carbon intensity into javascript programs

grid-intensity-exporter icon grid-intensity-exporter

A grid intensity exporter for use with prometheus. Designed to be used for understanding carbon footprint of compute.

grid-intensity-go icon grid-intensity-go

A tool written in go to help you factor carbon intensity into decisions about where and when to run computing jobs.

gwf-brand-assets icon gwf-brand-assets

Assets for use when creating Green Web Foundation stuff like browser extensions, presentations and so on

issues-and-ideas icon issues-and-ideas

An empty repo for tracking ideas and issues, until we work out which repo if any these apply best to

lighthouse-co2-action icon lighthouse-co2-action

A forkable repo, as an experiment in running github actions to git-scrape a sites to record how well they perform in terms of accessibility, performance, and carbon emissions from transfer

node-traceroute icon node-traceroute

Wrapper around native traceroute command, with the critical security issue fixed

profiler icon profiler

Firefox Profiler — Web app for Firefox performance analysis

scaphandre icon scaphandre

Electrical power consumption metrology agent. Let scaph dive and bring back the metrics that will help you make your systems and applications more sustainable !

scion icon scion

SCION Internet Architecture

searx icon searx

Privacy-respecting metasearch engine

searxng icon searxng

SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.

sustainability-policy icon sustainability-policy

An creative commons licensed sustainability policy, to use as a starting point in your own organisation.

talks icon talks

A public repo for presentations and talks given by staff in the green web foundation

tgwf-2020 icon tgwf-2020

The wordpress theme for the 2020 refresh of The Green Web Foundation website

tgwf2015 icon tgwf2015

The wordpress theme in use on www.thegreenwebfoundation.org

thesis-technical-product icon thesis-technical-product

A Django environment with visualizations of findings from my bachelor thesis for The Green Web Foundation.

url2green-js icon url2green-js

An npm module for quickly checking a domain against the The Green Web Foundation url2green dataset

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.