3.0.0 • Published 4 years ago

sapphiredb v3.0.0

Weekly downloads
132
License
MIT
Repository
github
Last release
4 years ago

sapphiredb - JS client Build Status

SapphireDb is a self-hosted, easy to use realtime database for Asp.Net Core and EF Core.

It creates a generic API you can easily use with different clients to effortlessly create applications with realtime data synchronization. SapphireDb should serve as a self hosted alternative to firebase realtime database and firestore on top of .Net.

Check out the documentation for more details: Documentation

Features

  • :wrench: Dead simple configuration
  • :satellite: Broad technology support
  • :computer: Self hosted
  • :iphone: Offline support
  • :floppy_disk: Easy to use CRUD operations
  • :zap: Model validation
  • :heavy_check_mark: Database support
  • :open_file_folder: Supports joins/includes
  • :loop: Complex server evaluated queries
  • :electric_plug: Actions
  • :key: Authorization included
  • :envelope: Messaging
  • :globe_with_meridians: Scalable

Learn more

Installation

Install Package

To use sapphiredb you have to install the package using npm

In your app folder execute

npm install sapphiredb rxjs axios -S

Create SapphireDb instance

var sapphiredb = require('sapphiredb');

var db = new sapphiredb.SapphireDb({
    serverBaseUrl: 'localhost:5000',
    useSsl: false,
    apiKey: 'webapp',
    apiSecret: 'pw1234'
});

db.collection('demo.entries').values().subscribe(function (values) {
    console.log(values);
});

Use websockets on NodeJs

sapphiredb also works in a NodeJs application. It will use polling as communication strategy by default. If you want to use websockets you have to install an external library for that.

Example
npm install ws -S
var sapphiredb = require('sapphiredb');

var ws = require('ws');
WebSocket = ws;

var db = new sapphiredb.SapphireDb({
    serverBaseUrl: 'localhost:5000',
    useSsl: false,
    apiKey: 'webapp',
    apiSecret: 'pw1234'
});

db.collection('demo.entries').values().subscribe(function (values) {
    console.log(values);
});

Compatibility

Browser/EngineWebsocketSSEPolling
Chrome:heavy_check_mark::heavy_check_mark::heavy_check_mark:
Firefox:heavy_check_mark::x::heavy_check_mark:
Opera:heavy_check_mark::x::heavy_check_mark:
Edge:heavy_check_mark::x::heavy_check_mark:
Internet Explorer 11:heavy_check_mark::x::heavy_check_mark:
NodeJs:heavy_check_mark::x::heavy_check_mark:

Technology support

JS, NodeJs, React, Svelte ...

Examples

React Example

Svelte Example

NodeJs Example

Documentation

Check out the documentation for more details: Documentation

Implementations/Packages

Server

SapphireDb - Server for Asp.Net Core

SapphireDb.RedisSync

SapphireDb.HttpSync

Client

sapphiredb - JS client (JS, NodeJs, React, Svelte, ...)

ng-sapphiredb - Angular client

Author

Morris Janatzek (morrisjdev)

Licenses

SapphireDb - MIT License

sapphiredb-js - MIT License

3.1.8

4 years ago

3.1.3

4 years ago

3.1.2

4 years ago

3.1.1

4 years ago

3.1.4

4 years ago

3.1.0

5 years ago

3.0.0

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.3

5 years ago

2.1.2

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago