What the original poster is asking is exactly how thousands of RV and boats are presently wired up. Its not especially complicated and there are literallly hundreds of DIY books showing how to do it. If you are building from scratch there are many retail vendors selling exactly the equipment you need. Beware of buying the least cost equipment.
Cheap prices = cheap equipment in most cases.