Popularity
3.4
Growing
Activity
8.7
Declining
230
10
6

Description

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

Programming language: TypeScript
License: MIT License
Tags: API     ORM     Web     HTTP     Database     SQL     JSON     REST     Entityframework     Asp.net     Serializer     WebSocket     SignalR     Realtime     Application Frameworks     Dotnetcore     Frontend Development    
Latest version: v2.1.3

SapphireDb alternatives and similar packages

Based on the "API" category

Do you think we are missing an alternative of SapphireDb or a related project?

Add another 'API' Package

README

SapphireDb - Server for Asp.Net Core 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 install the package execute the following command in your package manager console

PM> Install-Package SapphireDb

You can also install the extension using Nuget package manager. The project can be found here: https://www.nuget.org/packages/SapphireDb/

Configure DbContext

You now have to change your DbContext to derive from SapphireDbContext. Also make sure to adjust the constructor parameters.

// Change DbContext to SapphireDbContext
public class MyDbContext : SapphireDbContext
{
  //Add SapphireDatabaseNotifier for DI
  public MyDbContext(DbContextOptions<MyDbContext> options, SapphireDatabaseNotifier notifier) : base(options, notifier)
  {

  }

  public DbSet<User> Users { get; set; }

  public DbSet<Test> Tests { get; set; }
}

Register services and update pipeline

To use the SapphireDb you also have to make some changes in your Startup.cs-File.

public class Startup
{
  public void ConfigureServices(IServiceCollection services)
  {
    //Register services
    services.AddSapphireDb(...)
      .AddContext<MyDbContext>(cfg => ...);
  }

  public void Configure(IApplicationBuilder app)
  {
    //Add Middleware
    app.UseSapphireDb();
  }
}

Examples

Server

AspNet Core Example

Client

React Example

Svelte Example

NodeJs Example

Angular Example

Documentation

Check out the documentation for more details: Documentation

Implementations

Server

SapphireDb - Server for Asp.Net Core

Client

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

ng-sapphiredb - Angular client

Author

Morris Janatzek (morrisjdev)

Licenses

SapphireDb - MIT License

sapphiredb-js - MIT License


*Note that all licence references and agreements mentioned in the SapphireDb README section above are relevant to that project's source code only.