What is the best way to store data locally, that also syncs with either Firebase or a WebAPI?

(topic deleted by author)