Giter Club home page Giter Club logo

SapphireDb - Server for Asp.Net Core Build Status

FOSSA Status

SapphireDb logo

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

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.

// Change DbContext to SapphireDbContext
public class MyDbContext : SapphireDbContext
{
  public MyDbContext(DbContextOptions<MyDbContext> options) : base(options)
  {

  }

  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/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

FOSSA Status

SapphireDb's Projects

sapphiredb icon sapphiredb

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

sapphiredb-js icon sapphiredb-js

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.