dexie / Dexie.js

A Minimalistic Wrapper for IndexedDB
https://dexie.org
Apache License 2.0
11.46k stars 642 forks source link

[Suggestions] - Using Dexie.js #557

Open mbj36 opened 7 years ago

mbj36 commented 7 years ago

I am working on Google Summer of Code project for Mifos Organisation which is a platform for delievering financial services. we have a demo server hosted here - https://demo.openmf.org/newbeta . Just for quick understanding we deal with loan, saving account etc which generally has lots of data ( input field to be filled by user)

We have converted our app to PWA (not in production yet) and now we are looking to store data offline i.e when user has no internet connection, and save that data offline and sync that data with the server

We use the Apache Fineract API (REST) - https://demo.openmf.org/api-docs/apiLive.htm

I want your suggestions like how should be go through it ? It will create impact on millions of users

Our app code is here - https://github.com/openMF/community-app/tree/new_reskin

nponiros commented 7 years ago

I wrote some ideas regarding offline storage https://github.com/dfahlander/Dexie.js/issues/553#issuecomment-310833440 maybe that can help you a bit. Feel free to give us more requirements for your app. Maybe someone can give some more (and more relevant) ideas.

mbj36 commented 7 years ago

Our app is banking app made in angular and we use Fineract REST API. I want to create clients offline, what approach should i use ?

https://demo.openmf.org/newbeta/#/createclient

Username - Mifos password - password

mbj36 commented 7 years ago

@nponiros We use REST API. Do i need to create whole new database design to perform these operations offline ?

nponiros commented 7 years ago

I don't know what you mean by "whole new database desing". Depending on how synchronization is implemented you will need to keep some data in the db so you know when a dataset was last synchronized. You can save the info in an existing table which would probably mean that you need to alter the table's schema (I'm assuming sql here). You can also save the info in a separate table or even in an other db (you would have to make sure here that the two dbs are in sync).

FYI I wouldn't use REST for syncing, just one URL which would receive all changes. But this also depends on the exact requirements of your app. Maybe something similar to what meteor does might suit you.