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
- 🔧 Dead simple configuration
- 📡 Broad technology support
- 💻 Self hosted
- 📱 Offline support
- 💾 Easy to use CRUD operations
- ⚡️ Model validation
- ✔️ Database support
- 📂 Supports joins/includes
- ➿ Complex server evaluated queries
- 🔌 Actions
- 🔑 Authorization included
- ✉️ Messaging
- 🌐 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 = ; var db = serverBaseUrl: 'localhost:5000' useSsl: false apiKey: 'webapp' apiSecret: 'pw1234'; db;
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 = ; var ws = ;WebSocket = ws; var db = serverBaseUrl: 'localhost:5000' useSsl: false apiKey: 'webapp' apiSecret: 'pw1234'; db;
Compatibility
Browser/Engine | Websocket | SSE | Polling |
---|---|---|---|
Chrome | ✔️ | ✔️ | ✔️ |
Firefox | ✔️ | ❌ | ✔️ |
Opera | ✔️ | ❌ | ✔️ |
Edge | ✔️ | ❌ | ✔️ |
Internet Explorer 11 | ✔️ | ❌ | ✔️ |
NodeJs | ✔️ | ❌ | ✔️ |
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