Skip to content

Green Meter is a carbon calculator designed to estimate your carbon footprint

License

Notifications You must be signed in to change notification settings

michaelbelete/green-meter

Repository files navigation

Green Meter

Green Meter is a carbon calculator designed to estimate your carbon footprint for flights and vehicle travel. The calculator uses real-time carbon emissions data from the Carbon Interface API to provide users with accurate estimates of their carbon emissions.

Getting Started

To get started with Green Meter, you will need to set up your development environment and configure your environment variables.

Prerequisites

Before you can set up Green Meter, you will need to have the following software installed on your machine:

  • Node.js
  • PostgreSQL

Setup The Project

To install Green Meter, follow these steps:

  1. Create .env file (copy .env.example)
  2. Create postgres database (e.g. via https://www.elephantsql.com/)
  3. Sign up to https://clerk.com/ and add your api keys to env file
  4. Sign up to https://docs.carboninterface.com/ and add api key
  5. Run npm i
  6. Run npm prisma db push
  7. Run npm run dev

Technologies Used

  • Next.js
  • TypeScript
  • Prisma
  • NextAuth
  • trpc

Useful resources

This project uses the t3stack. You can read the documentation here https://create.t3.gg/en/introduction

We also recommend to learn about trpc (https://trpc.io/docs/) and tansack query (used by trpc under the hood) (https://tanstack.com/query/latest/docs/react/overview)

Useful commands

npx prisma studio (starts the data browser) https://www.prisma.io/docs/concepts/components/prisma-studio

Sometimes the linter breaks and you get errors that shouldn't be there. When experiencing this you need to restart the es-lint server or typescript server in VS code:

CMD + p, then enter > restart

image

Contributing

Contributions to the project are welcome! To contribute:

  1. Fork the repository to your own account.
  2. Create a new branch for your feature or bug fix.
  3. Make changes to your forked repository.
  4. Submit a pull request to the main repository with a description of your changes.

License

This project is licensed under the MIT License.

About

Green Meter is a carbon calculator designed to estimate your carbon footprint

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published