Skip to content

Declare and prove your environmental impact on-chain. ZeroBound is an Impact Evaluator that allows people to cryptographically prove that they have taken flights.

Notifications You must be signed in to change notification settings

ZeroBoundLabs/zero-bound

Repository files navigation

Flight Carbon Offset Tracker

Flight Carbon Offset Tracker is an open-source application that securely reads your Gmail or G Suite account to extract flight confirmation emails, compile a list of your flights, calculate the total carbon emissions from those flights, and provide options to offset the carbon footprint. This project is currently a work in progress and aims to integrate with the Ethereum Attestation Service (EAS) to create blockchain attestations of your carbon footprint and the corresponding offsets.

Table of Contents

Features

  • OAuth-based Gmail or G Suite access.
  • Reads flight confirmation emails from your inbox.
  • Generates a list of all flights you've taken.
  • Calculates the carbon footprint of your flights.
  • Provides options to offset the calculated carbon emissions.
  • Plans to integrate with Ethereum Attestation Service (EAS) to record flight and offset data.

Security

The application requires high-level permission to read your emails. It only accesses flight confirmation emails and does not store or access any other email data. However, given the high-security nature of email access, we recommend using the application carefully and only after reviewing its source code.

Installation

Prerequisites

  • Node.js >= v14
  • Google Cloud Platform (GCP) credentials for OAuth

Steps

  1. Clone the repository:

    git clone https://github.com/your-username/flight-carbon-offset-tracker.git
    cd flight-carbon-offset-tracker
  2. Install dependencies:

    npm install
  3. Set up your Google OAuth credentials by following this guide.

    • You'll need to enable Gmail API and set up OAuth credentials on the GCP console.
  4. Create a .env file to store your credentials:

    GMAIL_CLIENT_ID=your-client-id
    GMAIL_CLIENT_SECRET=your-client-secret
    GMAIL_REDIRECT_URI=your-redirect-uri
  5. Start the application:

    npm start

Usage

Once the application is running, it will prompt you to authenticate with your Gmail or G Suite account via OAuth. After authentication, it will scan your emails for flight confirmation messages and display a list of all your flights along with the carbon footprint of each flight.

You will also be able to choose from various carbon offsetting options, which will be factored into the final calculations. Future updates will include generating attestations on the Ethereum blockchain using the Ethereum Attestation Service (EAS).

Future Plans

  • Ethereum Attestation Service (EAS) Integration: Automatically create blockchain-based attestations of your flights and carbon offsets.
  • Flight Offset Marketplace: Integration with third-party services to provide multiple carbon offsetting options.
  • Improved Email Parsing: Enhanced algorithms to detect a wider range of flight confirmation formats.

Contributing

Contributions are welcome! Feel free to submit pull requests or open issues to help improve the project.

  1. Fork the repo.
  2. Create a new branch:
    git checkout -b feature-branch
  3. Make your changes and commit:
    git commit -m "Add some feature"
  4. Push to the branch:
    git push origin feature-branch
  5. Submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

This is a Next.js project bootstrapped with create-next-app.

Getting this app up and running Started

You will need to register with the relevant google apis also, but this is the NextJs part:

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.tsx. The page auto-updates as you edit the file.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

This project uses next/font to automatically optimize and load Inter, a custom Google Font.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

About

Declare and prove your environmental impact on-chain. ZeroBound is an Impact Evaluator that allows people to cryptographically prove that they have taken flights.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages