I am building a reporting app on node.js and Angular. I am using the Quickbooks Online API to pull in reports information.
I have to add custom fields to the reports I pull in and save this customized report locally to a database. The custom fields are basically to aid in forecasting. (Note that these custom fields are only present in the local copy of the database)
However, I also have to make sure that the local copy is in sync with the remote one. That is proving to be a challenge.
I am struggling on what the best approach to this problem would be. Currently, I am just making an API call, getting the JSON and saving it to a Mongo DB. I am thinking of adding a manual "Refresh database" button that syncs the two copies.
Is this a good approach? Any help or pointers would be appreciated.