All Projects → SyncProxy → sync-client

SyncProxy / sync-client

Licence: MIT license
SyncProxy javascript client with support for all major embedded databases (IndexedDB, SQLite, WebSQL, LokiJS...)

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to sync-client

Localforage
💾 Offline storage, improved. Wraps IndexedDB, WebSQL, or localStorage using a simple but powerful API.
Stars: ✭ 19,840 (+66033.33%)
Mutual labels:  offline, localstorage, indexeddb, websql
Nano Sql
Universal database layer for the client, server & mobile devices. It's like Lego for databases.
Stars: ✭ 717 (+2290%)
Mutual labels:  nosql, sqlite, localstorage, indexeddb
Remotestorage.js
⬡ JavaScript client library for integrating remoteStorage in apps
Stars: ✭ 2,155 (+7083.33%)
Mutual labels:  synchronization, localstorage, indexeddb
Typeorm
ORM for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
Stars: ✭ 26,559 (+88430%)
Mutual labels:  sqlite, websql, sqlserver
client-persist
Offline storage for your web client. Supports IndexedDB, WebSQL, localStorage and sessionStorage with an easy to crawl with API.
Stars: ✭ 14 (-53.33%)
Mutual labels:  localstorage, indexeddb, websql
Dotmim.sync
A brand new database synchronization framework, multi platform, multi databases, developed on top of .Net Standard 2.0. https://dotmimsync.readthedocs.io/
Stars: ✭ 406 (+1253.33%)
Mutual labels:  synchronization, sql-server, sqlite
python-lsm-db
Python bindings for the SQLite4 LSM database.
Stars: ✭ 115 (+283.33%)
Mutual labels:  nosql, sqlite, embedded-database
Angular Async Local Storage
Efficient local storage module for Angular apps and PWA: simple API + performance + Observables + validation
Stars: ✭ 539 (+1696.67%)
Mutual labels:  offline, localstorage, indexeddb
Prisma
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite & MongoDB (Preview)
Stars: ✭ 18,168 (+60460%)
Mutual labels:  sql-server, sqlite, sqlserver
Syncchanges
Synchronize/Replicate database changes using SQL Server Change Tracking
Stars: ✭ 66 (+120%)
Mutual labels:  synchronization, sql-server, sqlserver
localForage-cn
localForage中文仓库,localForage改进了离线存储,提供简洁健壮的API,包括 IndexedDB, WebSQL, 和 localStorage。
Stars: ✭ 201 (+570%)
Mutual labels:  offline, localstorage, indexeddb
acebase
A fast, low memory, transactional, index & query enabled NoSQL database engine and server for node.js and browser with realtime data change notifications
Stars: ✭ 288 (+860%)
Mutual labels:  nosql, indexeddb
upscheme
Database migrations and schema updates made easy
Stars: ✭ 737 (+2356.67%)
Mutual labels:  sql-server, sqlserver
browserStorage
浏览器本地存储封装
Stars: ✭ 30 (+0%)
Mutual labels:  localstorage, websql
tsql-scripts
Transact-SQL scripts and gists
Stars: ✭ 35 (+16.67%)
Mutual labels:  sql-server, sqlserver
AloeDB
Light, Embeddable, NoSQL database for Deno 🦕
Stars: ✭ 111 (+270%)
Mutual labels:  nosql, embedded-database
pypyodbc
pypyodbc is a pure Python cross platform ODBC interface module (pyodbc compatible as of 2017)
Stars: ✭ 39 (+30%)
Mutual labels:  sql-server, sqlserver
ionic-resource-generator
Painless, Offline First, No Dependency, Ionic resources generator
Stars: ✭ 31 (+3.33%)
Mutual labels:  ionic, offline
elearning
elearning linux/mac/db/cache/server/tools/人工智能
Stars: ✭ 72 (+140%)
Mutual labels:  ionic, nosql
dockage
embedded document/json store
Stars: ✭ 20 (-33.33%)
Mutual labels:  nosql, embedded-database

Introduction

SyncProxy-client is a javascript client for SyncProxy that enables one-single line of code implementation of synchronization for javascript offline applications using embedded database (IndexedDB, SQLite, SQLJS, WebSQL, LokiJS...). Used with the SyncProxy server (https://www.syncproxy.com) to access the backend database (MySQL, SQL Server, MongoDB...), this is the shortest way to make mobile offline applications synchronize bi-directionally in realtime using reactive sync technology.

Installation

$ git clone https://github.com/syncproxy/sync-client

Example

Simply copy the library, then load the SyncProxy client script from within your main index.html page:

<script src="sync-client/sync-client.js" proxyID="<proxy Id>" connectorType="IndexedDB / WebSQL / SQLite / SQLJS / IonicStorage" dbName="your client db name"></script> 

(the script params can also be retrieved directly from https://my.syncproxy.com when creating a sync proxy)

Custom params

Sync client script can be invoked with custom params that are inserted as attributes of the <script> tag:

src (mandatory)
path to the client sync script (recommended: "client-sync/client-sync.js")

proxyID (mandatory)
Id attributed by SyncProxy to your proxy on creation

connectorType
values: "IndexedDB", "WebSQL", "SQLite", "SQLJS", "LocalStorage", "IonicStorage", "LokiJS" default: "IndexedDB"

dbName
Name of your embedded database in mobile app.
default: "SyncProxy"

protocol
values: "ws" (websocket) or "wss" (secured websoket)
default: "wss"

serverUrl
Url of the server hosting SyncProxy
default: "my.syncproxy.com"

serverPort
Port listened on by SyncProxy server
default value: 4501

autoUpgradeDB
values: "true", "false" If true, the embedded database's structure will be automatically upgraded (if this is relevant to the type of database) during sync after a database schema update. Set to false if application creates and upgrades database schema by itself.
default: "true"

physicalSchemaReadDelay
Delay after which, if no sync schema was found, the sync client will try to read the schema from the physical data store (if this is relevant to the type of database). If set to "0", the schema is not read from the physical data store.
default: "5000"

autoInit
values: "true", "false" If true, sync client will be started automatically. If false, sync client should be created by calling SyncClient.initClient(params)
default: "true"

reactiveSync
values: "true", "false" If true, enables reactive sync. Reactivity for each table + direction (server->client and client->server) is configured on server side
default: "true

syncButton
values: "true", "fixed", "false" If true, a draggable popup sync button is displayed. If fixed, button's position is fixed. If false, application must take care to launch sync by itself
default: "true"

tablesToSync
When using Auto Backendless database or NoSQL database without server database schema, you have the ability to discover schema from client's data. In that case, attribute tablesToSync must be set with the list of tables to sync from client to server. default: ""

customCredentials
If set, defines a custom credential function. Typically returns a {login, password} object which will be sent as-is to the server. If left blank, the credentials are managed by sync client using a login prompt.
default: ""

loginSource
If set, defines a user login source object within the application, for instance: "document.getElementById('inputLogin').value"
default: ""

passwordSource
If set, defines a user password source object within the application, for instance: "document.getElementById('inputPassword').value"
default: ""

zipData
values: "true", "false" If true, server will be requested to send data changes as zipped JSON, otherwise plain JSON.
default: "true"

welcomeMessage
Message that will popup in the app before the first synchronization.
default: "To begin, please press Sync button"

utcDates values: "true", "false"
If true (default), all datetimes will be stored as ISO-8601 strings, otherwise as "YYYY-MM-DD HH:MI:SS" (without timezone information).
default: "true"

onServerChanges(data)
Optional handler function called each time a chunk of data is received from server. Received data are passed as a parameter.

onSyncEnd
Optional handler function called each time synchronization ends

useSessionStorage
values: "true", "false"
If true, use the sessionStorage in replacement of the localStorage (for testing purposes)
Default: "false"

Testing

Like us, test your mobile and progressive web apps with

Documentation

Read our tutorial on how to setup SyncProxy client with an Ionic hybrid mobile application https://github.com/syncproxy/syncproxy-quickstart-ionic

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].