ResilientSync is an offline-first synchronization framework for applications that need to keep working even when internet is not available.
The main idea is simple: different devices should be able to work independently, save their changes locally, and when connection comes back, all the changes should sync and merge safely without losing data.
I used a healthcare / field worker example in the demo because it makes the problem easy to understand, but the framework itself is generic and can be used in other kinds of apps too.
In many real situations, internet is unstable or fully unavailable.
Examples:
- disaster zones
- rural healthcare
- field surveys
- remote research work
If two devices both update the same record while offline, most normal systems either:
- overwrite one version
- lose data
- or ask the user to manually fix the conflict
This project tries to solve that by:
- storing operations locally
- syncing later
- resolving conflicts automatically
- offline-first local storage
- operation-based synchronization
- automatic sync when online
- Last-Write-Wins conflict resolution
- Tombstone deletion handling
- G-Counter support for grow-only counters
- duplicate detection using UUID operation IDs
- dead letter queue for rejected operations
- validation of incoming operations
- web UI for field worker + dashboard + DLQ view
- unit tests and integration tests
- Node.js
- Express.js
- SQLite
- JavaScript
- HTML / CSS
- UUID
- CORS
resilient-sync/
├── src/
│ ├── core/
│ ├── strategies/
│ ├── adapters/
│ ├── shared/
│ └── index.js
│
├── server/
│ └── index.js
│
├── demo/
│ ├── app/ # new combined web UI
│ ├── healthcare/ # old CLI demo files + scenario
│ └── dashboard.js # old dashboard backup
│
├── test/
│ ├── unit/
│ └── integration/
│
├── docs/
├── package.json
└── README.md