I am using firebase or pouchsb / couchdb + vuejs / quasar. My architecture does not imply a server layer as such.
There is a task of the following nature. Let's say that at 14:00 the user creates an order that must be executed at 15:00. What if the browser is closed and then reopened at 14:58?
How to make a promise to be fulfilled after closing and reopening the browser?
You can't. When the browser is closed (or the page existed) the JS environment goes away and all promises disappear. You need to take a different approach.
A typical approach would be to store the data about the order in (for example) localStorage and then: