feat(backend): integrate SurrealDB storage with embedded RocksDB

Add StorageService backed by SurrealDB using the embedded RocksDB provider that persists to ./data (never in memory). Support an optional remote server via SurrealDb:RemoteUrl for frontend sync. Expose readiness and storage probe endpoints under /api/system and add a helper script to start a local SurrealDB server.

Set the backend version to 0.0.1.
This commit is contained in:
Rafał Tyński
2026-10-03 20:23:11 +02:00
parent ac9ce68fbe
commit e8e1658b3a
10 changed files with 265 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
namespace TarninaHub.Settings;
public sealed class SurrealDbSettings
{
public string Namespace { get; set; } = "hubmi";
public string Database { get; set; } = "hubmi";
public string DataDirectory { get; set; } = "data";
/// <summary>
/// When set (e.g. ws://127.0.0.1:8010/rpc), the backend connects to a
/// dedicated SurrealDB server instead of the embedded RocksDB engine.
/// The server must persist to ./data, not to memory.
/// </summary>
public string? RemoteUrl { get; set; }
public string? Username { get; set; }
public string? Password { get; set; }
}