Giter Club home page Giter Club 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

admin-portal icon admin-portal

The member portal and platform powering The Green Web Foundation

boaviztapi icon boaviztapi

🛠 Giving access to BOAVIZTA reference data and methodologies trough a RESTful API

carbon.txt icon carbon.txt

A proposed convention for making it possible demonstrate that your infrastucture uses green power

carbonalyser icon carbonalyser

The add-on "Carbonalyser" allows to visualize the electricity consumption and greenhouse gases (GHG) emissions that your Internet browsing leads to.

cloud-carbon-coefficients icon cloud-carbon-coefficients

Notebook and sources for calculating the Cloud Carbon Coefficients used in the Cloud Carbon Footprint project.

cloud-carbon-footprint icon cloud-carbon-footprint

Cloud Carbon Footprint is a tool to estimate energy use (kilowatt-hours) and carbon emissions (metric tons CO2e) from public cloud usage

co2.js icon co2.js

An npm module for accessing the green web API, and estimating the carbon emissions from using digital services

dataset-browser icon dataset-browser

A lightly modified deployment of datasette, for serving snapshots of the TGWF data

datasets icon datasets

Open datasets & methodologies for carbon emissions from different activities. Forked from OpenAMEE, and npm installable

developer-docs icon developer-docs

The developer documentation site for The Green Web Foundations open source libraries.

doctrine icon doctrine

A very simple tool for visualising how competitive is the company in the light of Simon Wardley's Doctrine.

energy-usage icon energy-usage

Provides a function to measure the energy usage of another function.

enqueue icon enqueue

[READ-ONLY] Messaging solutions for PHP.

enqueue-bundle icon enqueue-bundle

[READ-ONLY] Message queue bundle for Symfony. RabbitMQ, Amazon SQS, Redis, Service bus, Async events, RPC over MQ and a lot more

enqueue-dev icon enqueue-dev

Message Queue, Job Queue, Broadcasting, WebSockets packages for PHP, Symfony, Laravel, Magento. DEVELOPMENT REPOSITORY - provided by Forma-Pro

gitpod-wordpress icon gitpod-wordpress

Easily develop plugins and themes for WordPress directly from your browser with Gitpod.

green-cost-explorer icon green-cost-explorer

See how much of your cloud bill is spent on fossil fuels ,so you can do the right thing and switch. We're in a climate crisis, remember?

green-spider icon green-spider

Hilft Dir dabei, Deine BÜNDNIS 90/DIE GRÜNEN Website zu optimieren

greenflow icon greenflow

A CLI tool to help understand how network traffic moves across the real world, what powers it, its CO2 footprint

greenhouse icon greenhouse

Lighthouse, but for running sites on renewable power instead of fossil fuels

greenhouse-ci icon greenhouse-ci

Lighthouse CI, but checking for fossil fuels too, and available over an API and running in containers

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.