npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

realm-sync-js

v0.0.0-c

Published

Offline first syncing library for realm-js

Downloads

5

Readme

KiteSync

About KiteSync

KiteSync Enables Developers to Sync Offline-First Applications Using Realm

We believe that offline-first applications make for the best user experience:

  • Applications should work offline as seamlessly as possible with little or no disruption to the user.
  • Once a user is authenticated and online, his/her data should be synchronized and persistent on the device.
  • Apps should provide syncronization across multiple devices.

Products like Evernote, Google Keep, and Kindle have syncing solutions that highlight the merits of ensuring user data is available across devices and have thus raised users' expectations of how they interact with their mobile apps. Syncing is a challenging technical problem and many businesses have developed proprietary syncing technology that can be used as a competitive advantage. KiteSync’s goal is to make syncing an easy experience both for developers and users alike.

Realm provides an exciting mobile database with a low memory and space footprint. We built an API wrapper over Realm to give full remote syncing functionality for react-native apps.

What is KiteSync?

KiteSync is an open-source solution to syncing realm.io react-native databases by using an external remote service. This library empowers developers to focus on offline first functionality in their mobile apps.

KiteSync is built on top of Realm.io and consists of two components:

  • KiteSync Api -- a JavaScript library that allows syncing by using create, delete, update, and delete methods. Syncing is initiated via the sync method coordinating synchronization with the remote service.
  • KiteSync Remote-Service -- a cloud-based solution for adding applications.

KiteSync provides the following service to developers:

  • Full Sync -- provides a full synchronization of user data from mobile device to mobile device.
  • Auth -- an authentication API that connects to common auth providers (Facebook).
  • Incremental Sync -- only synchronizes changes since the users last sync reducing the amount of data transferred.
  • Conflict Management -- resolves conflicts between identical objects on the client's device.
  • Testing -- automated testing suite and sample test app to interface with the both databases.
  • Proof-of-Concept Application -- a production notes application that leverages the node module.

KiteSync was first built by Alamu Palaniappan, Colin Goltra, David Ogor, and Mike Jonas

Getting Started

###Requirements

  • realm
  • react-native

###Installation

$ npm install realm-sync-js

###API Documentation You can use KiteSync methods in a similar manner to how you would use realm CRUD methods.

new RealmSync(schema[, path])

Instantiate an instance of realm and realm sync.

.create(type, properties[, update])

Create an object that can be synchronized.

.delete(realmObject)

Delete an object from the local realm storage database.

.getRealmInstance()

Provides an instantiated instance of the Realm library.

.sync(callback [,serviceWinsPolicy])

Synchronizes changes with remote service based on . Node style callback that return true for success.

##Example

const Realm = require('realm');
const RealmSync = require('kitesync');
// Create your schema
var PersonSchema = {}
PersonSchema.schema = {
  name: 'Person',
  properties: {
    name: String,
    address: String
  }
}
// Instantiate KiteSync

const realmSync = RealmSync([PersonSchema]);
const realm = realmSync.getRealmInstance();

// Function used to create a person in realm
realm.write(() => {
  realmSync.create('Person', {
    name: 'Brian Smith',
    address: '123 Main St'
  });
});

realmSync.sync(function(error, success) {
  if (error) throw new Error(error);
  console.log(success);
});

Development & Contributing

Get Involved

This library was made possible by the creative efforts of developers like you and we would be happy to have you contribute to KiteSync's future success. If you'd like to be a contributor, check out our Contributing guide.

Also, checkout out KiteSync.io periodically for updates.

Git Workflow

Testing

Style Guide

Roadmap & Wishlist

  • Public/Private Routing -- allows developers to choose which data is privately synced per user and data synced to all mobile users.
  • Event Notification -- provides notification when syncing is initialized, in progress, and completed.
  • Backend Expansion -- an API/protocol to create custom backend solution.

Additional

External Resources

Community

Founding Team

License

MIT License

Copyright (c) 2016 KiteSync Team (Alamu Palaniappan, Colin Goltra, David Ogor, Mike Jonas)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


___  __    ___  _________  _______           ________       ___    ___ ________   ________     
|\  \|\  \ |\  \|\___   ___\\  ___ \         |\   ____\     |\  \  /  /|\   ___  \|\   ____\    
\ \  \/  /|\ \  \|___ \  \_\ \   __/|        \ \  \___|_    \ \  \/  / | \  \\ \  \ \  \___|    
\ \   ___  \ \  \   \ \  \ \ \  \_|/__       \ \_____  \    \ \    / / \ \  \\ \  \ \  \       
 \ \  \\ \  \ \  \   \ \  \ \ \  \_|\ \       \|____|\  \    \/  /  /   \ \  \\ \  \ \  \____  
  \ \__\\ \__\ \__\   \ \__\ \ \_______\        ____\_\  \ __/  / /      \ \__\\ \__\ \_______\
   \|__| \|__|\|__|    \|__|  \|_______|       |\_________\\___/ /        \|__| \|__|\|_______|
                                               \|_________\|___|/