We will work on a project that has to be offline first. First we want to do PoC (proof of concept). The project is invoicing frontend.
We will provide api for data. Your job is to do this flow:
1. Get data from an api that is on the server, if api is unreachable use data that you have already stored or if you don't have nothing (first run) - display error message.
For that data locally you need to use some kind of Db like NeDB, LevelDb or your own choice (simple local storage isn't enough solid for this?).
2. We will use two items from received data and create simple invoice and try to send it to another api that only receives data from our app, if the api isn't reachable, you need to send it when service is online again. All invoices should be saved in local Db too.
This is just PoC, we will continue after this...
Please bid! Thanks