Note if component fails in this power supply how full line 240 rms line voltage could be in circuit with no protection.
This circuit is in well insulated case. When you see well insulated case consider they may be used for a reason.
The capacitor 470 nF must be X2 type capacitor.
Warning: transformerless power supplies provide no isolation from mains power, and are very dangerous. You must use isolation transformer whenever you want to connect anything, such as scope, DVM, or any other external equipment to the circuit. Even with isolation transformer high voltages are present, be very careful.
Also, voltage divider resistors could be added at right of circuit for more voltage stability.