The UmweltMobilCheck from DB and Joulebug
What it does
HOW DARE YOU! ©
How do you get from A to B?
Do you choose ... ... the fastest way? ... the cheapest way? ... the most sustainable way?
Our tool calculates the your rides CO2 footprint and creates a weekly/monthly reports. It also features a leaderboard where you can compete both with locals and your friends. Since measuring CO2 is only half the deal, the tool also gives customised recommendations on CO2 minimization.
How we built it
We used mitmproxy to reverse-engineer the Jelbi / Trafi API, which we use to obtain a users ride history.
Our frontend is running on TypeScript, SCSS, Bootstrap and plain DOM manipulation, the live-updating scoreboard is implemented using WebSockets. We use Parcel for bundling.
Our scoreboard backend is using Redis SortedSets to model our scoreboard, it's written in TypeScript and runs in a Docker container on a tiny Hetzner VM. Since the Jelbi / Trafi API doesn't play well with CORS, we use cors-anywhere as a CORS proxy and Caddy for HTTPS certificates.
Challenges we ran into
- Complex CO2 calculations due to LCA (life-cycle analysis) for different means of transport
- Incentive creation for the users to use the tool and make decisions based on saved CO2
- getting mitmproxy to work - it took us two damn hours
- CSS media-width
- CSS in general
Accomplishments that I'm proud of
- It works! :)
- It's surprisingly usable.
What we learned
- Netlify and Parcel are great tools
- Paul doesn't like CSS
- Lukas learned working with Promises and async/await
- We all learned more about working in a team
What's next for Footprint Leaderboard
- recommendations on how to minimise your transport-induced footprint
- assign CO2 emissions to Jelbis route planning