Managing power of core (plugging and battery)

Hey guys!

I’m new to all this world and I need orientation. I’m working on a project that uses Spark and I want it to work with a battery or plugged. So, in case it is plugged the battery is not working and if it is unplugged, the battery powers the circuit.

My circuit can work between 5V and 7.5V (ideally 7V). The point is that I don’t know if exists a PCB which I can buy that manages all this stuff.