{"id":13445453,"url":"https://github.com/SapphireDb/SapphireDb","last_synced_at":"2025-03-20T21:30:36.845Z","repository":{"id":39614112,"uuid":"150752008","full_name":"SapphireDb/SapphireDb","owner":"SapphireDb","description":"SapphireDb Server, a self-hosted, easy to use realtime database for Asp.Net Core and EF Core","archived":false,"fork":false,"pushed_at":"2022-12-08T09:22:42.000Z","size":3119,"stargazers_count":402,"open_issues_count":12,"forks_count":39,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-10-01T20:15:55.592Z","etag":null,"topics":["aspnet","core","database","dbcontext","entity","entity-framework","entityframework","firebase","firestore","net","net-core","realtime","realtime-data-synchronization","realtime-database","sapphire-db","self-hosted","server-sent-events","signalr","sse","websockets"],"latest_commit_sha":null,"homepage":"https://sapphire-db.com/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SapphireDb.png","metadata":{"files":{"readme":"README-NUGET.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":"morrisjdev","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-09-28T14:24:39.000Z","updated_at":"2024-08-30T15:57:04.000Z","dependencies_parsed_at":"2023-01-25T09:45:50.241Z","dependency_job_id":null,"html_url":"https://github.com/SapphireDb/SapphireDb","commit_stats":null,"previous_names":["morrisjdev/realtimedatabase"],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SapphireDb%2FSapphireDb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SapphireDb%2FSapphireDb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SapphireDb%2FSapphireDb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SapphireDb%2FSapphireDb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SapphireDb","download_url":"https://codeload.github.com/SapphireDb/SapphireDb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221807686,"owners_count":16883632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aspnet","core","database","dbcontext","entity","entity-framework","entityframework","firebase","firestore","net","net-core","realtime","realtime-data-synchronization","realtime-database","sapphire-db","self-hosted","server-sent-events","signalr","sse","websockets"],"created_at":"2024-07-31T05:00:33.577Z","updated_at":"2025-03-20T21:30:36.838Z","avatar_url":"https://github.com/SapphireDb.png","language":"C#","readme":"# SapphireDb - Server for Asp.Net Core [![Build Status](https://travis-ci.org/morrisjdev/RealtimeDatabase.svg?branch=master)](https://travis-ci.org/morrisjdev/RealtimeDatabase)\n\nSapphireDb is a self-hosted, easy to use realtime database for Asp.Net Core and EF Core.\n\nIt creates a generic API you can easily use with different clients to effortlessly create applications with realtime data synchronization.\nSapphireDb should serve as a self hosted alternative to firebase realtime database and firestore on top of .Net.\n\nCheck out the documentation for more details: [Documentation](https://sapphire-db.com/)\n\n## Features\n\n- :wrench: Dead simple configuration\n- :satellite: Broad technology support\n- :computer: Self hosted\n- :iphone: Offline support\n- :floppy_disk: Easy to use CRUD operations\n- :zap: Model validation\n- :heavy_check_mark: Database support\n- :open_file_folder: Supports joins/includes\n- :loop: Complex server evaluated queries\n- :electric_plug: Actions\n- :key: Authorization included\n- :envelope: Messaging\n- :globe_with_meridians: Scalable\n\n[Learn more](https://sapphire-db.com/)\n\n\n## Installation\n\n### Install package\nTo install the package execute the following command in your package manager console\n\n````\nPM\u003e Install-Package SapphireDb\n````\n\nYou can also install the extension using Nuget package manager. The project can be found here: [https://www.nuget.org/packages/SapphireDb/](https://www.nuget.org/packages/SapphireDb/)\n\n### Configure DbContext\n\nYou now have to change your DbContext to derive from `SapphireDbContext`.\n\n````csharp\n// Change DbContext to SapphireDbContext\npublic class MyDbContext : SapphireDbContext\n{\n  public MyDbContext(DbContextOptions\u003cMyDbContext\u003e options) : base(options)\n  {\n\n  }\n\n  public DbSet\u003cUser\u003e Users { get; set; }\n\n  public DbSet\u003cTest\u003e Tests { get; set; }\n}\n````\n\n### Register services and update pipeline\n\nTo use the SapphireDb you also have to make some changes in your `Startup.cs`-File.\n\n````csharp\npublic class Startup\n{\n  public void ConfigureServices(IServiceCollection services)\n  {\n    //Register services\n    services.AddSapphireDb(...)\n      .AddContext\u003cMyDbContext\u003e(cfg =\u003e ...);\n  }\n\n  public void Configure(IApplicationBuilder app)\n  {\n    //Add Middleware\n    app.UseSapphireDb();\n  }\n}\n````\n\n## Examples\n\n### Server\n\n[AspNet Core Example](https://github.com/SapphireDb/Example-AspNetCore)\n\n### Client\n\n[React Example](https://github.com/SapphireDb/Example-React)\n\n[Svelte Example](https://github.com/SapphireDb/Example-Svelte)\n\n[NodeJs Example](https://github.com/SapphireDb/Example-NodeJs)\n\n[Angular Example](https://github.com/SapphireDb/Example-Angular)\n\n## Documentation\n\nCheck out the documentation for more details: [Documentation](https://sapphire-db.com/)\n\n## Implementations/Packages\n\n### Server\n\n[SapphireDb - Server for Asp.Net Core](https://github.com/morrisjdev/SapphireDb)\n\n[SapphireDb.RedisSync](https://github.com/SapphireDb/SapphireDb/tree/master/SapphireDb.RedisSync)\n\n[SapphireDb.HttpSync](https://github.com/SapphireDb/SapphireDb/tree/master/SapphireDb.HttpSync)\n\n### Client\n\n[sapphiredb - JS client (JS, NodeJs, React, Svelte, ...)](https://github.com/SapphireDb/sapphiredb-js/blob/master/projects/sapphiredb/README.md)\n\n[ng-sapphiredb - Angular client](https://github.com/SapphireDb/sapphiredb-js/blob/master/projects/ng-sapphiredb/README.md)\n\n## Author\n\n[Morris Janatzek](http://morrisj.net) ([morrisjdev](https://github.com/morrisjdev))\n\n## Licenses\n\nSapphireDb - [MIT License](https://github.com/SapphireDb/SapphireDb/blob/master/LICENSE)\n\nsapphiredb-js - [MIT License](https://github.com/SapphireDb/sapphiredb-js/blob/master/LICENSE)\n","funding_links":["https://patreon.com/morrisjdev"],"categories":["Frameworks, Libraries and Tools","C\\#","框架, 库和工具"],"sub_categories":["Database Tools and Utilities","数据库工具库"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSapphireDb%2FSapphireDb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSapphireDb%2FSapphireDb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSapphireDb%2FSapphireDb/lists"}