Search by

cboxdk / sync

cboxdk

Framework-independent sync engine with explicit field conflicts for offline-first applications

Package info

github.com/cboxdk/sync

pkg:composer/cboxdk/sync

Statistics

Installs: 108

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

v0.3.0 2026-09-16 19:05 UTC

This package is auto-updated.

Last update: 2026-09-16 21:06:55 UTC


README

A framework-independent PHP sync engine for offline-first applications with one authoritative server and many replicas.

It merges independent field edits with atomic application by default, preserves complete competing proposals with trusted provenance, and supports explicit versioned conflict resolution. It includes strict revision preconditions, whole-state validation and contextual view/bootstrap references. Mutation ordering, idempotency, domain state, conflict candidates, results and acknowledgements share one storage transaction.

composer install
composer simulate
composer qa

The simulator delivers 100 competing edits in deterministic random orders, loses responses, retries requests, resolves candidates, delivers a late proposal and paginates whole commits. It fails if any checked invariant breaks.

Start with the quickstart. See architecture, protocol guarantees, conflict rules, change feed, and extension contracts.

Requires PHP ^8.4 and ext-pdo; no third-party runtime dependencies or Laravel requirement. Development tooling is Pest, Pint and PHPStan at max level. Requirements are generated from Composer metadata. CI targets PHP 8.4 and 8.5.

The default preserves proposals, not order-independent canonical state. Storage is durable via PdoStore on SQLite, MySQL 8+ and PostgreSQL, and a space accepts one concurrent writer by design. HTTP, authentication, Laravel/Eloquent, NativePHP and restore are outside this package. Read the limitations before integrating.

MIT, copyright Cbox. See LICENSE, SECURITY.md, and BUILD-STATUS.md.