wow - so lucky
so close, so lucky!
the person who opened the door is at major fault. you cannot just open a door completely without first looking at the back. The best approach is: open slightly, very slightly just to peek behind.. and then SLOWLY open the door if the road is clear.
I would develop the following piece of technology: "2 cameras integrated into the side mirrors which will not allow a passenger or driver to open the side doors in the event that a cycle is driving towards the mirrors."