My web push notification implementation for Toot! is now finally in a state where it feels ready for use! I have updated the relay service code to support production and development modes, and fixed bugs:
https://github.com/DagAgren/toot-relay
I also published an excerpt of the code used in the client to handle the cryptography:
https://gist.github.com/DagAgren/77d82e28174b57f87e194c97fae0898b
It is a good starting point for anyone wanting to have their own client receive web pushes from Mastodon.
If anyone wants a more in depth explanation, ask!