The battery will be used for both peak shaving and in the case of an outage for grid backup. I do have experience with building different sizes of Lithium packs, for solar LiFePO4 is indeed the one I was going for.
I'm missing the knowledge in inverters, this includes inverter <-> battery...