Solar, battery, and load circuit
You just need to design an UPS (uninterruptible power supply). You need to select proper solar block, which will give you interruptible source. All you need then is to study PMIC (power management IC) offerings by companies like TI. Look at something like BQ24296, which will provide the rest of functions: Li-ion charger, +5V system voltage boost, and balanced power bypass.