Retreat Hackathon: Automated carbon cost reports with real-time notifications
Speckle is data infrastructure for the AEC industry.
What is Speckle? Check our
Give Speckle a try in no time by:
This repo contains the code for the a carbon cost report generator developed on a 1-day hackathon during our company retreat on October 2021.
We wrote a blog post about it!
Go see the app live here
It is divided into 2 folders:
frontend/
: A vue.js
application allowing to setup carbon report generation for any stream, and view the resulting report.server/
: A FastAPI
Python server that receives notifications of each new commit in a stream, and generates a carbon report based on the data.First, install all necesary dependencies by running npm install
on the frontend/
folder.
Inside the frontend/
folder, you’ll find a file named .env.local-example
. Rename it to .env.local
and fill in the variables accordingly.
The app ID and app secret are obtained when creating a new app in your Speckle profile section.
Then run npm run serve
to run the app in development mode.
To build the app run npm run build
To run the app, use the provided Dockerfile
To run the app, create a .env
file based on the .env_example
, and pass that to docker run via the --env-file
flag
For debug see the .vscode/launch.json
for a sample config.
Use the example hooks provided, and the http://localhost:8000/docs
page to test things.