If veroboard is close by, using it with AC sometimes seriously catches up to me in flames and sparks all over my work bench!
Think twice when you use a veroboard with alternating current or AC grid for that matter!
Below is a not good result on my work bench!
Then below my second attempt without errors on the veroboard:
To enhance this basic design, I incorporated a capacitor into the live input line and included a built-in 1 megohm resistor for safe voltage dissipation. Additionally, I introduced a 47k ohm, 1 watt resistor in the neutral line to mitigate inrush current surges.