yes, it is something similar. it depends what do you want to do, it is fully customizable.
all the pir sensors + physical buttons (lets call them buttons, not switch, because switch has at least 2 stabile position) are working with 5v ttl signals (high, low)
the mains are only used at the relays. and yes, every lamp (or wall plug) you want to control needs 2 digital ports: one for the button (input) and one for the relay (output).
this is why advisable to use arduino mega, because it has around 70-75 pins. from that some are used for networking (i used enc28j60 module), some are used for rx/tx, so you actually will have around 60 usable ports. 60 / 2 = 30 lamps. i think that is enough for one normal house. but if you have very big house, you can have 1 arduino mega at every floor, say. this way the system is more redundant, if something dies.
regarding the lamps / wall sockets state after a power loss: the arduino mega is powered from a small capacity ups or battery, so in the event of blackout, the current states are not lost. if you want to make the system super fancy, you can continuously save the state of every relay into eeprom, so even if the system freezes or crashes, on restart it will restore every relay in the last used position.
we used these boards:
(they are cheaper on ali)
it needs 12v source. has onboard 5v supply for arduino, optically isolated digital channels, feedback leds for the state of every relay. every relay has 2 basic position: you can use them either no or nc. they are rated for 10a, but i wouldn't recommend more than 5-6a for continuous consumption. (for longer life and piece of mind)
but, actually, for lamps it is hardly needed more than 0.5a nowadays)
if one wants to use for wall socket with big consumption, it can use the relay to cascade a much stronger heavy duty relay with it, so theoretically this setup has no limits, you can even turn on / off 30-40 amps.