This is a transformerless power supply for low current applications. C1 is the X rated AC capacitor that reduces high volt AC. D1-D4 rectifies AC to DC and C2 removes ripples. R1 is the bleeder to remove stored current in AC when power is off. R2 limits inrush current. A Zener can be used in the output to get regulated DC.
Caution! Circuit is lethal since it carries high volt AC. Do not touch or test when connected to Mains. Enclose in a shock proof case.