# Syncular

> Offline-first SQL sync library with local SQLite on every client, a server-authoritative commit log, and TypeScript and Rust cores for web, iOS, Android, Flutter, React Native, Tauri, and Rust.

Syncular is an open-source, offline-first SQL sync engine licensed under Apache-2.0. It gives every client a real local SQLite database — OPFS in the browser, native SQLite elsewhere — while a single ordered commit log on the server remains the authoritative source of truth. The project publishes TypeScript and Rust cores that implement one written protocol and pass the same conformance suite.

## What It Is

Syncular sits in the local-first / offline-first data sync category. Applications read and write against a local SQLite replica; mutations queue in an optimistic outbox and are pushed to the server commit log, which orders, validates, and fans changes back to exactly the clients authorized to see them. The result is instant local reads, conflict-safe writes, and real-time propagation without requiring a live network connection.

## Two Cores, One Protocol

The project enforces cross-platform parity through a spec-first approach:

- **TypeScript core** (`@syncular/client`): runs in a Web Worker on OPFS via `sqlite-wasm`, ships at 31.3 KB gzipped, and powers Web and React targets.
- **Rust core** (`syncular-client` + `syncular-ffi`): packaged as a C-ABI native library and consumed by Swift, Kotlin, Flutter, React Native, Tauri, and bare Rust bindings.

Both cores implement [`SPEC.md`](https://github.com/syncular/syncular/blob/main/docs/SPEC.md) and are held identical by golden byte-level vectors and 95 conformance scenarios run against both in CI. The homepage states bootstrap of 100,000 rows takes approximately 30 ms and realtime propagation p95 is 0.2 ms.

## Platform and Deployment Coverage

Syncular targets a wide surface area from a single protocol:

- **Client platforms**: Web (browser OPFS), React, Swift (iOS/macOS), Kotlin (Android/JVM), Flutter/Dart, React Native, Tauri, Rust
- **Server runtimes**: Bun/Node via Hono, Cloudflare Workers
- **Server storage**: SQLite, Postgres, Cloudflare D1
- **Blob/segment storage**: S3-compatible stores and Cloudflare R2

The scaffolder (`bun create syncular-app my-app`) generates a working project from `minimal`, `web`, or `tauri` templates.

## Key Capabilities

- **Scope-based authorization**: `resolveScopes(actor)` in the backend gates every read and write; no data escapes its scope.
- **Offline outbox**: writes queue while disconnected and replay in order on reconnect with idempotent retry.
- **Typed SQL / SYQL**: one checked query plan generates typed APIs for TypeScript, Swift, Kotlin, Dart, and Rust via the `@syncular/typegen` CLI.
- **CRDT columns**: collaborative text per column, byte-identical across both cores, powered by Yjs via `@syncular/crdt-yjs`.
- **Optional E2EE**: per-column AES-256-GCM keyrings with authorized local revocation via `@syncular/crypto`.
- **Windowed sync**: partial replicas with atomic eviction and a completeness oracle for large datasets.
- **Offline FTS5**: generated full-text projections maintained inside the local SQLite mirror.
- **Testkit**: `@syncular/testkit` provides an in-process server, fault injection, and a virtual clock for integration tests.
- **Multi-tab**: Web Locks leader election gives N browser tabs one core, one WebSocket, and one OPFS database; followers promote automatically.

## Update: v0.15.44

The homepage and docs reference the current published release as `v0.15.44`. The GitHub repository records a latest release of `v0.5.0` (published July 14, 2026), with the repository last pushed August 1, 2026. The project is under active development with a public ROADMAP.md, TODO.md, and a live conformance suite enforcing spec compliance across both cores.

## Features
- Offline-first local SQLite on every client
- Server-authoritative ordered commit log
- TypeScript core (Web Worker + OPFS sqlite-wasm)
- Rust core with C-ABI FFI for native platforms
- Scope-based authorization (resolveScopes)
- Optimistic offline outbox with idempotent replay
- Real-time delta push over WebSocket
- Fast bootstrap: 100k rows in ~30 ms
- Typed SQL / SYQL query generation for TypeScript, Swift, Kotlin, Dart, Rust
- CRDT columns (Yjs-based collaborative text)
- Optional per-column E2EE (AES-256-GCM)
- Windowed sync with partial replicas and completeness oracle
- Offline FTS5 full-text search
- Multi-tab Web Locks leader election
- Content-addressed blob storage (S3/R2)
- In-process testkit with fault injection
- 95 cross-core conformance scenarios in CI
- Cloudflare Workers server adapter
- Postgres, SQLite, and D1 server storage backends
- Scaffolder: bun create syncular-app

## Integrations
React, Swift (iOS/macOS), Kotlin (Android/JVM), Flutter/Dart, React Native, Tauri, Rust, Hono, Cloudflare Workers, Cloudflare D1, Cloudflare R2, PostgreSQL, SQLite, Amazon S3, Bun, Node.js, Yjs, sqlite-wasm (OPFS)

## Platforms
ANDROID, IOS, WEB, API, DEVELOPER_SDK, CLI

## Pricing
Open Source

## Version
v0.15.44

## Links
- Website: https://syncular.dev
- Documentation: https://syncular.dev/what-is/
- Repository: https://github.com/syncular/syncular
- EveryDev.ai: https://www.everydev.ai/tools/syncular
