There is no one circuit that is universally ok, it depends on the parameters of the circuit.
Easiest is to find app notes for particular devices.
Building your own
It is highly dangerous - there is rectified mains, HV DC, with all the power of your national grid behind it !
It is very difficult to find the isolation transformers. They are not easily available off the shelf.
If you are doing this for learning, be very careful