implementing physical switch & web switch

Hello all, Im trying to turn on some components with both a physical switch, and a switch on a web interface (via Node.js server on a raspi connected to arduino). How could this be accomplished? I understand ill need to make a webpage and and connect via socket.io or something. I'm just not sure how the wiring/schematic would look. The buttons would be connected to solenoid valves run on relays.

There are many examples on the internet, check by web server with button.

(The Raspberry Pi card already has general purpose pins, you may not need to use an Arduino.)

How to control Raspberry Pi GPIO via http web server