sapphiredb v3.0.0
sapphiredb - JS client 
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
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/Engine | Websocket | SSE | Polling |
---|---|---|---|
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
Documentation
Check out the documentation for more details: Documentation
Implementations/Packages
Server
SapphireDb - Server for Asp.Net Core
Client
sapphiredb - JS client (JS, NodeJs, React, Svelte, ...)
ng-sapphiredb - Angular client
Author
Licenses
SapphireDb - MIT License
sapphiredb-js - MIT License
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago