Module for switching between DC power and battery with automatic charging

Is there a module or readymade circuit available which does below?

  1. A 5V DC and a battery can be connected to the module.
  2. When Power is available it runs the arduino using power and simultaneously charges the battery.
  3. When DC power is not available it switches to battery for power.

If nothing like this available can you please suggest a module/circuit which can switch between DC power and battery. Automatic battery charging function can be excluded and a charging port will be added for manual charging.