{"id":27434,"library":"syncly-engine","title":"Syncly Engine","description":"Syncly Engine is a local-first database synchronization engine for Expo/React Native apps, implementing the transactional outbox pattern to reliably sync data with cloud backends (initially Firestore). Current version 0.1.10 is under active development and not production-ready. It uses SQLite as the single source of truth, ULID keys for sortable IDs, soft deletes via deletedAt, and a provider abstraction for swappable cloud adapters. Key differentiators: offline-first, atomic writes of business data and sync payloads, conflict resolution tracking.","status":"active","version":"0.1.10","language":"javascript","source_language":"en","source_url":"https://github.com/reymondsiarot/syncly","tags":["javascript","react-native","expo","syncly","Syncly","typescript"],"install":[{"cmd":"npm install syncly-engine","lang":"bash","label":"npm"},{"cmd":"yarn add syncly-engine","lang":"bash","label":"yarn"},{"cmd":"pnpm add syncly-engine","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Requires Expo environment (managed or bare workflow)","package":"expo","optional":false},{"reason":"Peer dependency for React Native apps","package":"react","optional":false},{"reason":"Peer dependency for React Native runtime","package":"react-native","optional":false}],"imports":[{"note":"ESM-only; no CJS support","wrong":"const SynclyClient = require('syncly-engine')","symbol":"SynclyClient","correct":"import { SynclyClient } from 'syncly-engine'"},{"note":"Default export available but named export preferred","wrong":"const { default: SynclyClient } = require('syncly-engine')","symbol":"SynclyClient","correct":"import SynclyClient from 'syncly-engine'"},{"note":"Exact class name; no alias exists","wrong":"import { FirestoreProvider } from 'syncly-engine'","symbol":"FirestoreSyncAdapter","correct":"import { FirestoreSyncAdapter } from 'syncly-engine'"},{"note":"SyncConfig is a TypeScript type, use type import for tree-shaking","wrong":"import { SyncConfig } from 'syncly-engine'","symbol":"type SyncConfig","correct":"import type { SyncConfig } from 'syncly-engine'"}],"quickstart":{"code":"import { SynclyClient, FirestoreSyncAdapter } from 'syncly-engine';\n\n// Initialize the sync client\nconst client = new SynclyClient();\nawait client.initialize();\n\n// Configure a Firestore adapter (requires Firestore instance)\nconst firestore = getFirestore(); // from firebase/firestore\nconst adapter = new FirestoreSyncAdapter(firestore, {\n  collectionPrefix: 'syncly_'\n});\n\n// Start syncing periodically (every 30 seconds)\nclient.startSync(adapter, { intervalMs: 30000 });\n\n// Use repository to write data (local-first)\nconst entity = await client.repository.insert('tasks', {\n  title: 'Buy groceries',\n  completed: false\n});\n\n// Data is automatically queued for sync\n// Stop syncing when done\nclient.stopSync();","lang":"typescript","description":"Demonstrates initializing SynclyClient, attaching a Firestore adapter, starting periodic sync, inserting a record into the local repository (which automatically queues a sync payload), and stopping sync."},"warnings":[{"fix":"Pin to exact version and expect breakage on updates.","message":"Pre-1.0.0 API instability: APIs may change without notice until stable release.","severity":"gotcha","affected_versions":"<1.0.0"},{"fix":"Use Firestore or implement custom adapter.","message":"Firestore only: currently only FirestoreSyncAdapter is implemented; other providers not available.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use expo-dev-client or eject to bare workflow.","message":"Requires Expo: this library is designed for Expo managed/bare workflows; may not work in vanilla React Native without Expo modules.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use import syntax; for Jest, configure transformIgnorePatterns.","message":"No CJS support: package is ESM-only; cannot be required() in Node.js environments.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install with: npm install syncly-engine","cause":"Package not installed or incorrectly imported.","error":"Module not found: Can't resolve 'syncly-engine'"},{"fix":"Await client.initialize() before using client.repository.","cause":"Client not initialized before accessing repository.","error":"TypeError: Cannot read properties of undefined (reading 'repository')"},{"fix":"Call initializeApp() before getFirestore().","cause":"Firebase not initialized before creating FirestoreSyncAdapter.","error":"FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}