Add api-audit md file that list down some api need to handle while offline. #140
Open
Vikaspal8923 wants to merge 15 commits intoohcnetwork:masterfrom
Open
Add api-audit md file that list down some api need to handle while offline. #140Vikaspal8923 wants to merge 15 commits intoohcnetwork:masterfrom
Vikaspal8923 wants to merge 15 commits intoohcnetwork:masterfrom
Conversation
✅ Deploy Preview for docs-ohc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Jacobjeevan
reviewed
Jun 2, 2025
| |-------------------------|-------------------|-------------------------------------------------------------------------------------| | ||
| | **Phase 1: Caching** | Week 1 – Week 3 | • Dexie schema & IndexedDB setup<br>• `PersistQueryClientProvider` integrated<br>• Selective caching (`meta.persist`) verified<br>• Implementation of all tech config mention in phase 1<br>• Offline reads tested | | ||
| | **Phase 2: Offline Writes**(mid-evaluation) | Week 4 – Week 6 | • `offlineWrites` table created<br>• `saveOfflineWrite` hooked into forms| | ||
| | **Phase 3: Synchronization** | Week 7 – Week 9 | • `syncOneWrite`, retry/backoff, and `computeBackoffDelay` complete<br>• `detectAndMarkConflict` implemented<br>• Implementation of all tech config mention in phase 3<br>• End-to-end sync (offline → online) tested | |
There was a problem hiding this comment.
I'd revise the estimate for sync, you would need to handle a lot of situations:
- ex: how are you going to handle cases when patient data isn't available in facility? User could unknowingly create them.
- how to convey the conflict to the user (depending on various forms)?
| | **Phase 1: Caching** | Week 1 – Week 3 | • Dexie schema & IndexedDB setup<br>• `PersistQueryClientProvider` integrated<br>• Selective caching (`meta.persist`) verified<br>• Implementation of all tech config mention in phase 1<br>• Offline reads tested | | ||
| | **Phase 2: Offline Writes**(mid-evaluation) | Week 4 – Week 6 | • `offlineWrites` table created<br>• `saveOfflineWrite` hooked into forms| | ||
| | **Phase 3: Synchronization** | Week 7 – Week 9 | • `syncOneWrite`, retry/backoff, and `computeBackoffDelay` complete<br>• `detectAndMarkConflict` implemented<br>• Implementation of all tech config mention in phase 3<br>• End-to-end sync (offline → online) tested | | ||
| | **Phase 4: Notifications** | Week 10 – Week 12 | • Conflict notification event/UI built<br>• `resolveConflict` helper added<br>•Optimization & Performance<br>•User Testing & Documentation |
There was a problem hiding this comment.
UI here could address the 2nd point mentioned.
- Keep it facility specific, so facility settings page.
- Syncing when transitioning from offline to online is fine. You can display toast notifications during/after this transition and prompt the user to clear any conflicts or failures.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This MD file contains details about the list of some standard workflows and backend APIs of these workflows. The tables present in this MD provide an idea about the dynamic data that needs to be cached. The APIs listed in the table are the ones that help to operate the UI of the workflows mentioned in this document.
Using these tables, we can decide on route registrations in the workbox. This is the initial step before creating the CEP for the offline-support project.