High voltage electric circuit design

Hi everyone!
I want to build an electric circuit that will be controlling 230 v at 2500W(water heater,boiler, you name it)
Any way, i have one that ive already built but the part of the controller that handle the high voltage was taken from another system.(image attached)
So my purpose is to understand what i need in order to build another one of those high voltage relay board.
I know that in my last projects i connected 5 volt to relay and the circuit was closed, so what those blue capacitors and diode are for?

more info:
in the image you can see a square yellow power converter(220v to 5v DC) that is connected to the power input through a coil, my best guess is that this is for avoiding the power jumps when turning on/off the boiler.
The boiler switch connected differently from, lets say, a light switch, both the L and N wires are being switched at the same time.
The relays as you can see close when it gets 5 v DC.

So my main question is, which components i need in order to build this kind of relay controller unit.

Thank you!

What voltage (AC or DC) and amperage will the relay contacts be handling?

A 2.5kW 230V heater will be about 11A resistive load, so a mains capable relay of 16A rating
would seem about right, 16A is a common current rating.

The capacitors in the picture are possibly part of a snubber circuit across the relay contacts
to reduce arcing damage when switching inductive loads, the diode is part of the relay winding
drive circuit (a free-wheel diode to prevent the winding inductance damaging the circuit).

Commonly available relay modules tend to provide the transistor and diode for driving the
relay winding and just take a logic supply and control signal per relay.

For mains you need a module with mains-rated relay(s), and a safe module will have good
physical separation between DC and mains side - the PCB traces keeping their distance.

Hi,
i wrote a comment yesterday and now i see that it didn't sent :frowning:
I want to build this project on a custom PCB and because im facing a high voltage and its not just for myself i have to make sure that it's 100% safe to use and that there is no risk of fire\electric shock.

Ive been investigating online and understood that in the DC side of the circuit i need flyback or snubber diodes.
But in the AC high voltage side i'm kind of clueless.
I really hope that its not too much to ask, but can you please tell me the list of required parts for this AC circuit? I dont want to make any mistake because of the high risk..

Thanks

You have a resistive load, so a snubber isn't needed on the contacts. Its inductive loads like motors and
old-style fluorescent light fittings that cause the real issues.

Hi,
You can use an SSR relay since the input it is an opto couple and it will give you a completely isolation between the input and the high voltage output. Also if the application require repetitively On/Off the contact will not wear out. Just google SSR relay.