5a2223a4c8
This PR stabilizes the Nexus Ingestion Engine by implementing functional service proxies for the Blazor WASM client and refining the backend infrastructure for real-time progress tracking and database compatibility. ### Key Changes - **Infrastructure Stabilization**: - Implemented production-grade `EbookRepository` with PostgreSQL `EF.Functions.ILike` support. - Enforced `IsReadyForReading = false` state for newly added ebooks (resolves #35). - Updated `SignalRSyncBroadcaster` to support targeted user messaging and ingestion-specific progress updates (resolves #37). - **WASM Client Functional Proxies**: - Replaced "Throwing" dummy services with `WasmEbookRepository`, `WasmSyncBroadcaster`, `WasmBookStorageService`, and `WasmEmbeddingGenerator`. - These services proxy requests to the backend via a new set of Minimal API endpoints in `NexusReader.Web`. - **Domain Refinement**: - Added `IsReadyForReading` flag to the `Ebook` entity to manage background AI processing states. ### Related Issues - Fixes #35 - Fixes #36 - Fixes #37 --------- Co-authored-by: Marek Jasiński <jasins.marek@gmail.com> Reviewed-on: #42 Co-authored-by: Antigravity <antigravity@google.com> Co-committed-by: Antigravity <antigravity@google.com>
31 lines
976 B
C#
31 lines
976 B
C#
using NexusReader.Domain.Entities;
|
|
|
|
namespace NexusReader.Application.Abstractions.Persistence;
|
|
|
|
/// <summary>
|
|
/// Abstraction for Ebook and Author persistence operations.
|
|
/// Defined in the Application layer to avoid a direct dependency on EF Core.
|
|
/// </summary>
|
|
public interface IEbookRepository
|
|
{
|
|
/// <summary>
|
|
/// Finds an author by name using a case-insensitive comparison.
|
|
/// </summary>
|
|
Task<Author?> FindAuthorByNameAsync(string name, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// Adds a new author to the repository (staged, not yet persisted).
|
|
/// </summary>
|
|
void AddAuthor(Author author);
|
|
|
|
/// <summary>
|
|
/// Adds a new ebook to the repository (staged, not yet persisted).
|
|
/// </summary>
|
|
void AddEbook(Ebook ebook);
|
|
|
|
/// <summary>
|
|
/// Persists all staged changes to the underlying store.
|
|
/// </summary>
|
|
Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
|
|
}
|