Skip to content

v4.0 • Data • 19kb gzipped • MIT

DataSync

Offline-first sync for IndexedDB with conflict resolution you can actually reason about.

★ 3.4kGitHub
↓ 1.4k / week● MIT● TS 5.0+
datasync-preview.png
Abstract preview graphic for DataSync

// why datasync

Offline is the default

Writes land locally first and reconcile when the connection returns. Your UI never waits on a network round trip to feel responsive.

● 16ms render● 60fps● 0 deps

// stack

Deterministic merges

Conflicts resolve through a strategy you supply, and every decision is logged so you can replay exactly what happened.

DataSync started as a single file in a client project and stayed small on purpose. It does one job, it does it in 19kb gzipped, and it has no runtime dependencies.

Getting started

Install it, import it, call it:

npm i datasync-js

Writes land locally first and reconcile when the connection returns. Your UI never waits on a network round trip to feel responsive.

What it does not do

It does not manage your state, style your components or ship a plugin system. Those are your decisions, and keeping them out is what keeps the bundle honest.

  • Survives flaky networks
  • Replayable conflict log
  • MIT licensed, commercially friendly

Features

Survives flaky networks

Partial syncs resume from the last acknowledged record rather than starting over.

Replayable conflict log

Every merge decision is recorded with both inputs, so a bug report comes with its own reproduction.

Six themes

Token-driven, so bringing your own palette is a single object.

ESM and types

Ships module and CommonJS builds with hand-written type definitions and source maps.

Off the main thread

Heavy work moves to a worker automatically when one is available.

Accessible output

Every visual is paired with a text alternative that reflects the same data.

Get DataSync v4.0

6 files • .min.js 19kb • .zip 82kb • sha384 verified

Changelog

v4.0 Aug 8 2026 • latest
  • New three-way merge strategy
  • Sync resumes from partial batches
  • IndexedDB adapter rewritten for Safari 17
v3.9 May 13 2026
  • Fixed a memory leak on repeated teardown
  • Source maps now published with every build
v3.8.4 Apr 3 2026
  • Type definitions rewritten by hand
  • Dropped the last runtime dependency
View full archive →

// related

Related products

Sep 10 • v2.0

ChartForge

Canvas charts in twelve lines. Responsive, accessible and dark-mode ready, with no D3 learning curve.

View →
Aug 30 • v3.2.1

MotionEase

Physics-based micro-animations with a single call. Spring curves that feel right without a tuning session.

View →
Aug 19 • v1.9.4

FormFlow

Validation and multi-step logic that works the same in React, Vue and vanilla. Your markup stays yours.

View →

Ship the dashboard today.

MIT licensed. Commercial friendly. Five-minute setup.