power supply design

Dear all
I am looking for single phase transformer less power supply design. i have atmega328 with 7805 regulator ic.

I wanted to drive the simple relay when power is on.

How to give protection in Surges /high voltage