Help wanted with digital 220 VAC switch

The way to think about the circuit board layout when using mains is
to make sure an ant crawling over it cannot create a bridge between
mains and non-mains. Thus the slot and large spacing between high and
low voltage sides of the board.