Extending BPMN.IO

Hi,
I want to extend the BPMN.io schema for it to measure and display sustainability metrics like water or CO2 usage. Can you tell me the easiest way I can achieve this. Also, where can I find the open-source code version of the web modeler that allows the downloading of the diagrams?
Thanks

Can you tell me the easiest way I can achieve this

Without knowing more details, it is hard to recommend something. I would keep the data outside of the Model and use Overlays to show the information.

Also, where can I find the open-source code version of the web modeler that allows the downloading of the diagrams?

For downloading the diagram, we have a Modeler example that adds a download button. You can adjust it for your needs.