Files
Nexus.Reader/src/.documentation/domains/infrastructure-services.md
T
2026-05-22 09:04:42 +02:00

116 KiB

Infrastructure Services: Knowledge, AI, Billing, Storage, Epub

Overview: Core infra services for semantic search, EPUB processing, storage, billing and platform integration. This document highlights interfaces, implementations, caching behavior and configuration (AiSettings, StripeSettings).

=== DIAGRAM 1: Dependency and Model Map (dependency-map) ===

---
config:
  flowchart:
    defaultRenderer: "elk"
---
flowchart TD
    flow_file_nexusreader_infrastructure_helpers_contenthasher_cs_file_1["ContentHasher"]
    flow_file_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_file_1["JsonRepairHelper"]
    flow_file_nexusreader_infrastructure_services_billingservice_cs_file_1["BillingService"]
    flow_file_nexusreader_infrastructure_services_bookstorageservice_cs_file_1["BookStorageService"]
    flow_file_nexusreader_infrastructure_services_epubreaderservice_cs_file_1["EpubReaderService"]
    flow_file_nexusreader_infrastructure_services_knowledgeservice_cs_file_1["KnowledgeService"]
    flow_file_nexusreader_web_client_program_cs_file_1["Program.cs"]
    flow_file_nexusreader_infrastructure_identity_tokenlimithandler_cs_file_1["TokenLimitHandler"]
    flow_file_nexusreader_infrastructure_identity_tokenlimitrequirement_cs_file_1["TokenLimitRequirement"]
    flow_file_nexusreader_infrastructure_persistence_ebookrepository_cs_file_1["EbookRepository"]
    flow_file_nexusreader_web_client_handlers_authenticationheaderhandler_cs_file_1["AuthenticationHeaderHandler"]
    flow_type_nexusreader_infrastructure_identity_tokenlimitrequirement_cs_tokenlimitrequirement_8[/"TokenLimitRequirement"/]
    flow_type_nexusreader_infrastructure_persistence_ebookrepository_cs_ebookrepository_12[/"EbookRepository"/]
    flow_type_nexusreader_infrastructure_services_bookstorageservice_cs_bookstorageservice_10[/"BookStorageService"/]
    flow_type_nexusreader_web_client_handlers_authenticationheaderhandler_cs_authenticationheaderhandler_14[/"AuthenticationHeaderHandler"/]
    flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74[/"ThrowingBookStorageService"/]
    flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61[/"ThrowingDbContextFactory"/]
    flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84[/"ThrowingEbookRepository"/]
    flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66[/"ThrowingEmbeddingGenerator"/]
    flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94[/"ThrowingSyncBroadcaster"/]
    flow_file_nexusreader_infrastructure_identity_tokenlimitrequirement_cs_file_1 -->|model TokenLimitRequirement| flow_type_nexusreader_infrastructure_identity_tokenlimitrequirement_cs_tokenlimitrequirement_8
    flow_file_nexusreader_infrastructure_persistence_ebookrepository_cs_file_1 -->|model EbookRepository| flow_type_nexusreader_infrastructure_persistence_ebookrepository_cs_ebookrepository_12
    flow_file_nexusreader_infrastructure_services_bookstorageservice_cs_file_1 -->|model BookStorageService| flow_type_nexusreader_infrastructure_services_bookstorageservice_cs_bookstorageservice_10
    flow_file_nexusreader_web_client_handlers_authenticationheaderhandler_cs_file_1 -->|model AuthenticationHeaderHandler| flow_type_nexusreader_web_client_handlers_authenticationheaderhandler_cs_authenticationheaderhandler_14
    flow_file_nexusreader_web_client_program_cs_file_1 -->|model ThrowingBookStorageService| flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74
    flow_file_nexusreader_web_client_program_cs_file_1 -->|model ThrowingDbContextFactory| flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61
    flow_file_nexusreader_web_client_program_cs_file_1 -->|model ThrowingEbookRepository| flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84
    flow_file_nexusreader_web_client_program_cs_file_1 -->|model ThrowingEmbeddingGenerator| flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66
    flow_file_nexusreader_web_client_program_cs_file_1 -->|model ThrowingSyncBroadcaster| flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94
    click flow_file_nexusreader_infrastructure_identity_tokenlimithandler_cs_file_1 href "vscode://file/NexusReader.Infrastructure/Identity/TokenLimitHandler.cs:1:1" "Open source"
    click flow_file_nexusreader_infrastructure_identity_tokenlimitrequirement_cs_file_1 href "vscode://file/NexusReader.Infrastructure/Identity/TokenLimitRequirement.cs:1:1" "Open source"
    click flow_type_nexusreader_infrastructure_identity_tokenlimitrequirement_cs_tokenlimitrequirement_8 href "vscode://file/NexusReader.Infrastructure/Identity/TokenLimitRequirement.cs:8:1" "Open source"
    click flow_file_nexusreader_infrastructure_persistence_ebookrepository_cs_file_1 href "vscode://file/NexusReader.Infrastructure/Persistence/EbookRepository.cs:1:1" "Open source"
    click flow_type_nexusreader_infrastructure_persistence_ebookrepository_cs_ebookrepository_12 href "vscode://file/NexusReader.Infrastructure/Persistence/EbookRepository.cs:12:1" "Open source"
    click flow_file_nexusreader_infrastructure_services_billingservice_cs_file_1 href "vscode://file/NexusReader.Infrastructure/Services/BillingService.cs:1:1" "Open source"
    click flow_file_nexusreader_infrastructure_services_bookstorageservice_cs_file_1 href "vscode://file/NexusReader.Infrastructure/Services/BookStorageService.cs:1:1" "Open source"
    click flow_type_nexusreader_infrastructure_services_bookstorageservice_cs_bookstorageservice_10 href "vscode://file/NexusReader.Infrastructure/Services/BookStorageService.cs:10:1" "Open source"
    click flow_file_nexusreader_infrastructure_services_epubreaderservice_cs_file_1 href "vscode://file/NexusReader.Infrastructure/Services/EpubReaderService.cs:1:1" "Open source"
    click flow_file_nexusreader_infrastructure_services_knowledgeservice_cs_file_1 href "vscode://file/NexusReader.Infrastructure/Services/KnowledgeService.cs:1:1" "Open source"
    click flow_file_nexusreader_infrastructure_helpers_contenthasher_cs_file_1 href "vscode://file/NexusReader.Infrastructure/Helpers/ContentHasher.cs:1:1" "Open source"
    click flow_file_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_file_1 href "vscode://file/NexusReader.Infrastructure/Helpers/JsonRepairHelper.cs:1:1" "Open source"
    click flow_file_nexusreader_web_client_handlers_authenticationheaderhandler_cs_file_1 href "vscode://file/NexusReader.Web.Client/Handlers/AuthenticationHeaderHandler.cs:1:1" "Open source"
    click flow_type_nexusreader_web_client_handlers_authenticationheaderhandler_cs_authenticationheaderhandler_14 href "vscode://file/NexusReader.Web.Client/Handlers/AuthenticationHeaderHandler.cs:14:1" "Open source"
    click flow_file_nexusreader_web_client_program_cs_file_1 href "vscode://file/NexusReader.Web.Client/Program.cs:1:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61 href "vscode://file/NexusReader.Web.Client/Program.cs:61:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66 href "vscode://file/NexusReader.Web.Client/Program.cs:66:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74 href "vscode://file/NexusReader.Web.Client/Program.cs:74:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84 href "vscode://file/NexusReader.Web.Client/Program.cs:84:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94 href "vscode://file/NexusReader.Web.Client/Program.cs:94:1" "Open source"

This shows file-level dependencies and models across Infrastructure and Web.Client, highlighting KnowledgeService, EpubReaderService, BookStorageService and BillingService. Clickable nodes reference source files for quick inspection.

=== DIAGRAM 2: Startup and Service Registration Flow (primary-runtime) ===

---
config:
  flowchart:
    defaultRenderer: "elk"
---
flowchart TD
    subgraph flow_1_nexusreader_web_client_program_cs["Program.cs"]
    end
    subgraph flow_0_nexusreader_web_program_cs["Program.cs"]
    end
    flow_file_nexusreader_web_client_program_cs_file_1["Program.cs"]
    flow_file_nexusreader_web_program_cs_file_1["Program.cs"]
    flow_method_nexusreader_web_client_program_cs_findauthorbynameasync_88["FindAuthorByNameAsync"]
    flow_method_nexusreader_web_client_program_cs_getservice_71["GetService"]
    flow_method_nexusreader_web_client_program_cs_program_top_level_startup_15["Program (top-level startup)"]
    flow_method_nexusreader_web_client_program_cs_run_wasm_host_59["Run WASM Host"]
    flow_action_nexusreader_web_client_program_cs_findauthorbynameasync_repository_read_88_88["Reads repository or persistence state"]
    flow_file_nexusreader_infrastructure_configuration_aisettings_cs_file_1["AiSettings"]
    flow_file_nexusreader_infrastructure_configuration_stripesettings_cs_file_1["StripeSettings"]
    flow_type_nexusreader_infrastructure_configuration_aisettings_cs_aisettings_3[/"AiSettings"/]
    flow_type_nexusreader_infrastructure_configuration_stripesettings_cs_stripesettings_3[/"StripeSettings"/]
    flow_type_nexusreader_web_client_program_cs_configured_httpclient_40[/"configured HttpClient"/]
    flow_type_nexusreader_web_client_program_cs_n_a_55[/"N/A"/]
    flow_type_nexusreader_web_client_program_cs_nexusauthenticationstateprovider_33[/"NexusAuthenticationStateProvider"/]
    flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74[/"ThrowingBookStorageService"/]
    flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61[/"ThrowingDbContextFactory"/]
    flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84[/"ThrowingEbookRepository"/]
    flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66[/"ThrowingEmbeddingGenerator"/]
    flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94[/"ThrowingSyncBroadcaster"/]
    flow_type_nexusreader_web_client_program_cs_wasmepubreader_56[/"WasmEpubReader"/]
    flow_type_nexusreader_web_client_program_cs_wasmknowledgeservice_38[/"WasmKnowledgeService"/]
    flow_type_nexusreader_web_client_program_cs_webplatformservice_18[/"WebPlatformService"/]
    flow_action_nexusreader_web_client_program_cs_getservice_return_71_71(["returns null"])
    flow_file_nexusreader_web_client_program_cs_file_1 -->|unknown| flow_method_nexusreader_web_client_program_cs_run_wasm_host_59
    flow_file_nexusreader_web_client_program_cs_file_1 -->|uses| flow_type_nexusreader_web_client_program_cs_configured_httpclient_40
    flow_file_nexusreader_web_client_program_cs_file_1 -->|application services via extension| flow_type_nexusreader_web_client_program_cs_n_a_55
    flow_file_nexusreader_web_client_program_cs_file_1 -->|NexusAuthenticationStateProvider| flow_type_nexusreader_web_client_program_cs_nexusauthenticationstateprovider_33
    flow_file_nexusreader_web_client_program_cs_file_1 -->|IDbContextFactory AppDbContext>| flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_49
    flow_file_nexusreader_web_client_program_cs_file_1 -->|IEpubReader| flow_type_nexusreader_web_client_program_cs_wasmepubreader_56
    flow_file_nexusreader_web_client_program_cs_file_1 -->|IKnowledgeService| flow_type_nexusreader_web_client_program_cs_wasmknowledgeservice_38
    flow_file_nexusreader_web_client_program_cs_file_1 -->|IPlatformService| flow_type_nexusreader_web_client_program_cs_webplatformservice_18
    click flow_file_nexusreader_web_client_program_cs_file_1 href "vscode://file/NexusReader.Web.Client/Program.cs:1:1" "Open source"
    click flow_method_nexusreader_web_client_program_cs_program_top_level_startup_15 href "vscode://file/NexusReader.Web.Client/Program.cs:15:1" "Open source"
    click flow_method_nexusreader_web_client_program_cs_getservice_71 href "vscode://file/NexusReader.Web.Client/Program.cs:71:1" "Open source"
    click flow_action_nexusreader_web_client_program_cs_getservice_return_71_71 href "vscode://file/NexusReader.Web.Client/Program.cs:71:1" "Open source"
    click flow_method_nexusreader_web_client_program_cs_findauthorbynameasync_88 href "vscode://file/NexusReader.Web.Client/Program.cs:88:1" "Open source"
    click flow_action_nexusreader_web_client_program_cs_findauthorbynameasync_repository_read_88_88 href "vscode://file/NexusReader.Web.Client/Program.cs:88:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61 href "vscode://file/NexusReader.Web.Client/Program.cs:61:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66 href "vscode://file/NexusReader.Web.Client/Program.cs:66:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74 href "vscode://file/NexusReader.Web.Client/Program.cs:74:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84 href "vscode://file/NexusReader.Web.Client/Program.cs:84:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94 href "vscode://file/NexusReader.Web.Client/Program.cs:94:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_webplatformservice_18 href "vscode://file/NexusReader.Web.Client/Program.cs:18:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_nexusauthenticationstateprovider_33 href "vscode://file/NexusReader.Web.Client/Program.cs:33:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_wasmknowledgeservice_38 href "vscode://file/NexusReader.Web.Client/Program.cs:38:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_configured_httpclient_40 href "vscode://file/NexusReader.Web.Client/Program.cs:40:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_49 href "vscode://file/NexusReader.Web.Client/Program.cs:49:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_n_a_55 href "vscode://file/NexusReader.Web.Client/Program.cs:55:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_wasmepubreader_56 href "vscode://file/NexusReader.Web.Client/Program.cs:56:1" "Open source"
    click flow_method_nexusreader_web_client_program_cs_run_wasm_host_59 href "vscode://file/NexusReader.Web.Client/Program.cs:59:1" "Open source"
    click flow_file_nexusreader_infrastructure_configuration_aisettings_cs_file_1 href "vscode://file/NexusReader.Infrastructure/Configuration/AiSettings.cs:1:1" "Open source"
    click flow_type_nexusreader_infrastructure_configuration_aisettings_cs_aisettings_3 href "vscode://file/NexusReader.Infrastructure/Configuration/AiSettings.cs:3:1" "Open source"
    click flow_file_nexusreader_infrastructure_configuration_stripesettings_cs_file_1 href "vscode://file/NexusReader.Infrastructure/Configuration/StripeSettings.cs:1:1" "Open source"
    click flow_type_nexusreader_infrastructure_configuration_stripesettings_cs_stripesettings_3 href "vscode://file/NexusReader.Infrastructure/Configuration/StripeSettings.cs:3:1" "Open source"
    click flow_file_nexusreader_web_program_cs_file_1 href "vscode://file/NexusReader.Web/Program.cs:1:1" "Open source"

This diagram emphasizes startup wiring: AiSettings/StripeSettings are loaded and WASM client services (WasmEpubReader, WasmKnowledgeService) are registered. It maps DI tokens (IEpubReader, IKnowledgeService, IPlatformService) to concrete platform implementations.

=== DIAGRAM 3: Program.cs Flow (primary-runtime) ===

---
config:
  flowchart:
    defaultRenderer: "elk"
---
flowchart TD
    subgraph flow_1_nexusreader_web_client_program_cs["Program.cs"]
    end
    subgraph flow_0_nexusreader_web_program_cs["Program.cs"]
    end
    flow_file_nexusreader_web_client_program_cs_file_1["Program.cs"]
    flow_file_nexusreader_web_program_cs_file_1["Program.cs"]
    flow_method_nexusreader_web_client_program_cs_findauthorbynameasync_88["FindAuthorByNameAsync"]
    flow_method_nexusreader_web_client_program_cs_getservice_71["GetService"]
    flow_method_nexusreader_web_client_program_cs_program_top_level_startup_15["Program (top-level startup)"]
    flow_method_nexusreader_web_client_program_cs_run_wasm_host_59["Run WASM Host"]
    flow_action_nexusreader_web_client_program_cs_findauthorbynameasync_repository_read_88_88["Reads repository or persistence state"]
    flow_file_nexusreader_infrastructure_configuration_aisettings_cs_file_1["AiSettings"]
    flow_file_nexusreader_infrastructure_configuration_stripesettings_cs_file_1["StripeSettings"]
    flow_type_nexusreader_infrastructure_configuration_aisettings_cs_aisettings_3[/"AiSettings"/]
    flow_type_nexusreader_infrastructure_configuration_stripesettings_cs_stripesettings_3[/"StripeSettings"/]
    flow_type_nexusreader_web_client_program_cs_configured_httpclient_40[/"configured HttpClient"/]
    flow_type_nexusreader_web_client_program_cs_n_a_55[/"N/A"/]
    flow_type_nexusreader_web_client_program_cs_nexusauthenticationstateprovider_33[/"NexusAuthenticationStateProvider"/]
    flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74[/"ThrowingBookStorageService"/]
    flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61[/"ThrowingDbContextFactory"/]
    flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61[/"ThrowingDbContextFactory"/]
    flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84[/"ThrowingEbookRepository"/]
    flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66[/"ThrowingEmbeddingGenerator"/]
    flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94[/"ThrowingSyncBroadcaster"/]
    flow_type_nexusreader_web_client_program_cs_wasmepubreader_56[/"WasmEpubReader"/]
    flow_type_nexusreader_web_client_program_cs_wasmknowledgeservice_38[/"WasmKnowledgeService"/]
    flow_type_nexusreader_web_client_program_cs_webplatformservice_18[/"WebPlatformService"/]
    flow_action_nexusreader_web_client_program_cs_getservice_return_71_71(["returns null"])
    flow_file_nexusreader_infrastructure_configuration_aisettings_cs_file_1 -->|dto AiSettings| flow_type_nexusreader_infrastructure_configuration_aisettings_cs_aisettings_3
    flow_file_nexusreader_infrastructure_configuration_stripesettings_cs_file_1 -->|dto StripeSettings| flow_type_nexusreader_infrastructure_configuration_stripesettings_cs_stripesettings_3
    flow_file_nexusreader_web_client_program_cs_file_1 -->|FindAuthorByNameAsync| flow_method_nexusreader_web_client_program_cs_findauthorbynameasync_88
    flow_file_nexusreader_web_client_program_cs_file_1 -->|GetService| flow_method_nexusreader_web_client_program_cs_getservice_71
    flow_file_nexusreader_web_client_program_cs_file_1 -->|Program top-level startup| flow_method_nexusreader_web_client_program_cs_program_top_level_startup_15
    flow_file_nexusreader_web_client_program_cs_file_1 -->|unknown| flow_method_nexusreader_web_client_program_cs_run_wasm_host_59
    flow_file_nexusreader_web_client_program_cs_file_1 -->|uses| flow_type_nexusreader_web_client_program_cs_configured_httpclient_40
    flow_file_nexusreader_web_client_program_cs_file_1 -->|application services via extension| flow_type_nexusreader_web_client_program_cs_n_a_55
    flow_file_nexusreader_web_client_program_cs_file_1 -->|NexusAuthenticationStateProvider| flow_type_nexusreader_web_client_program_cs_nexusauthenticationstateprovider_33
    flow_file_nexusreader_web_client_program_cs_file_1 -->|model ThrowingBookStorageService| flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74
    flow_file_nexusreader_web_client_program_cs_file_1 -->|IDbContextFactory AppDbContext>| flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_49
    flow_file_nexusreader_web_client_program_cs_file_1 -->|model ThrowingDbContextFactory| flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61
    flow_file_nexusreader_web_client_program_cs_file_1 -->|model ThrowingEbookRepository| flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84
    flow_file_nexusreader_web_client_program_cs_file_1 -->|model ThrowingEmbeddingGenerator| flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66
    flow_file_nexusreader_web_client_program_cs_file_1 -->|model ThrowingSyncBroadcaster| flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94
    flow_file_nexusreader_web_client_program_cs_file_1 -->|IEpubReader| flow_type_nexusreader_web_client_program_cs_wasmepubreader_56
    flow_file_nexusreader_web_client_program_cs_file_1 -->|IKnowledgeService| flow_type_nexusreader_web_client_program_cs_wasmknowledgeservice_38
    flow_file_nexusreader_web_client_program_cs_file_1 -->|IPlatformService| flow_type_nexusreader_web_client_program_cs_webplatformservice_18
    flow_method_nexusreader_web_client_program_cs_findauthorbynameasync_88 -->|Reads repository or persistence state| flow_action_nexusreader_web_client_program_cs_findauthorbynameasync_repository_read_88_88
    flow_method_nexusreader_web_client_program_cs_getservice_71 -->|returns null| flow_action_nexusreader_web_client_program_cs_getservice_return_71_71
    click flow_file_nexusreader_web_client_program_cs_file_1 href "vscode://file/NexusReader.Web.Client/Program.cs:1:1" "Open source"
    click flow_method_nexusreader_web_client_program_cs_program_top_level_startup_15 href "vscode://file/NexusReader.Web.Client/Program.cs:15:1" "Open source"
    click flow_method_nexusreader_web_client_program_cs_getservice_71 href "vscode://file/NexusReader.Web.Client/Program.cs:71:1" "Open source"
    click flow_action_nexusreader_web_client_program_cs_getservice_return_71_71 href "vscode://file/NexusReader.Web.Client/Program.cs:71:1" "Open source"
    click flow_method_nexusreader_web_client_program_cs_findauthorbynameasync_88 href "vscode://file/NexusReader.Web.Client/Program.cs:88:1" "Open source"
    click flow_action_nexusreader_web_client_program_cs_findauthorbynameasync_repository_read_88_88 href "vscode://file/NexusReader.Web.Client/Program.cs:88:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61 href "vscode://file/NexusReader.Web.Client/Program.cs:61:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66 href "vscode://file/NexusReader.Web.Client/Program.cs:66:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74 href "vscode://file/NexusReader.Web.Client/Program.cs:74:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84 href "vscode://file/NexusReader.Web.Client/Program.cs:84:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94 href "vscode://file/NexusReader.Web.Client/Program.cs:94:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_webplatformservice_18 href "vscode://file/NexusReader.Web.Client/Program.cs:18:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_nexusauthenticationstateprovider_33 href "vscode://file/NexusReader.Web.Client/Program.cs:33:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_wasmknowledgeservice_38 href "vscode://file/NexusReader.Web.Client/Program.cs:38:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_configured_httpclient_40 href "vscode://file/NexusReader.Web.Client/Program.cs:40:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_49 href "vscode://file/NexusReader.Web.Client/Program.cs:49:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_n_a_55 href "vscode://file/NexusReader.Web.Client/Program.cs:55:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_wasmepubreader_56 href "vscode://file/NexusReader.Web.Client/Program.cs:56:1" "Open source"
    click flow_method_nexusreader_web_client_program_cs_run_wasm_host_59 href "vscode://file/NexusReader.Web.Client/Program.cs:59:1" "Open source"
    click flow_file_nexusreader_infrastructure_configuration_aisettings_cs_file_1 href "vscode://file/NexusReader.Infrastructure/Configuration/AiSettings.cs:1:1" "Open source"
    click flow_type_nexusreader_infrastructure_configuration_aisettings_cs_aisettings_3 href "vscode://file/NexusReader.Infrastructure/Configuration/AiSettings.cs:3:1" "Open source"
    click flow_file_nexusreader_infrastructure_configuration_stripesettings_cs_file_1 href "vscode://file/NexusReader.Infrastructure/Configuration/StripeSettings.cs:1:1" "Open source"
    click flow_type_nexusreader_infrastructure_configuration_stripesettings_cs_stripesettings_3 href "vscode://file/NexusReader.Infrastructure/Configuration/StripeSettings.cs:3:1" "Open source"
    click flow_file_nexusreader_web_program_cs_file_1 href "vscode://file/NexusReader.Web/Program.cs:1:1" "Open source"

This flow maps startup functions and method interactions (FindAuthorByNameAsync, GetService) to repository reads and DI results. It underlines where AiSettings/StripeSettings are consumed.

=== DIAGRAM 4: Program.cs Execution Control Flow (control-flow) ===

flowchart TD
    subgraph NexusReader_Web_Client_Program["Program"]
    end
    flow_file_nexusreader_web_client_program_cs_file_1["Program.cs"]
    flow_file_nexusreader_web_program_cs_file_1["Program.cs"]
    flow_method_nexusreader_web_client_program_cs_findauthorbynameasync_88["FindAuthorByNameAsync"]
    flow_method_nexusreader_web_client_program_cs_getservice_71["GetService"]
    flow_method_nexusreader_web_client_program_cs_program_top_level_startup_15["Program (top-level startup)"]
    flow_method_nexusreader_web_client_program_cs_run_wasm_host_59["Run WASM Host"]
    flow_action_nexusreader_web_client_program_cs_findauthorbynameasync_repository_read_88_88["Reads repository or persistence state"]
    flow_action_nexusreader_web_client_program_cs_getservice_return_71_71(["returns null"])
    flow_method_nexusreader_web_client_program_cs_findauthorbynameasync_88 -->|Reads repository or persistence state| flow_action_nexusreader_web_client_program_cs_findauthorbynameasync_repository_read_88_88
    flow_method_nexusreader_web_client_program_cs_getservice_71 -->|returns null| flow_action_nexusreader_web_client_program_cs_getservice_return_71_71
    click flow_file_nexusreader_web_client_program_cs_file_1 href "vscode://file/NexusReader.Web.Client/Program.cs:1:1" "Open source"
    click flow_method_nexusreader_web_client_program_cs_program_top_level_startup_15 href "vscode://file/NexusReader.Web.Client/Program.cs:15:1" "Open source"
    click flow_method_nexusreader_web_client_program_cs_getservice_71 href "vscode://file/NexusReader.Web.Client/Program.cs:71:1" "Open source"
    click flow_action_nexusreader_web_client_program_cs_getservice_return_71_71 href "vscode://file/NexusReader.Web.Client/Program.cs:71:1" "Open source"
    click flow_method_nexusreader_web_client_program_cs_findauthorbynameasync_88 href "vscode://file/NexusReader.Web.Client/Program.cs:88:1" "Open source"
    click flow_action_nexusreader_web_client_program_cs_findauthorbynameasync_repository_read_88_88 href "vscode://file/NexusReader.Web.Client/Program.cs:88:1" "Open source"
    click flow_method_nexusreader_web_client_program_cs_run_wasm_host_59 href "vscode://file/NexusReader.Web.Client/Program.cs:59:1" "Open source"
    click flow_file_nexusreader_web_program_cs_file_1 href "vscode://file/NexusReader.Web/Program.cs:1:1" "Open source"

Control-flow view highlights runtime branches and repository read points for tracing execution during startup and WASM host runs.

=== DIAGRAM 5: Program.cs Contracts and Entities (class-diagram) ===

classDiagram
    class flow_file_nexusreader_web_client_program_cs_file_1["Program.cs"]
    class flow_file_nexusreader_web_program_cs_file_1["Program.cs"]
    class flow_file_nexusreader_infrastructure_configuration_aisettings_cs_file_1["AiSettings"]
    class flow_file_nexusreader_infrastructure_configuration_stripesettings_cs_file_1["StripeSettings"]
    class flow_type_nexusreader_infrastructure_configuration_aisettings_cs_aisettings_3["AiSettings"]
    class flow_type_nexusreader_infrastructure_configuration_stripesettings_cs_stripesettings_3["StripeSettings"]
    class flow_type_nexusreader_web_client_program_cs_configured_httpclient_40["configured HttpClient"]
    class flow_type_nexusreader_web_client_program_cs_n_a_55["N/A"]
    class flow_type_nexusreader_web_client_program_cs_nexusauthenticationstateprovider_33["NexusAuthenticationStateProvider"]
    class flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74["ThrowingBookStorageService"]
    class flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_49["ThrowingDbContextFactory"]
    class flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61["ThrowingDbContextFactory"]
    class flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84["ThrowingEbookRepository"]
    class flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66["ThrowingEmbeddingGenerator"]
    class flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94["ThrowingSyncBroadcaster"]
    class flow_type_nexusreader_web_client_program_cs_wasmepubreader_56["WasmEpubReader"]
    class flow_type_nexusreader_web_client_program_cs_wasmknowledgeservice_38["WasmKnowledgeService"]
    class flow_type_nexusreader_web_client_program_cs_webplatformservice_18["WebPlatformService"]
    class flow_type_nexusreader_web_program_cs_groundednessrequest_567["GroundednessRequest"]
    class flow_type_nexusreader_web_program_cs_knowledgerequest_566["KnowledgeRequest"]
    flow_file_nexusreader_infrastructure_configuration_aisettings_cs_file_1 --> flow_type_nexusreader_infrastructure_configuration_aisettings_cs_aisettings_3 : dto AiSettings
    flow_file_nexusreader_infrastructure_configuration_stripesettings_cs_file_1 --> flow_type_nexusreader_infrastructure_configuration_stripesettings_cs_stripesettings_3 : dto StripeSettings
    flow_file_nexusreader_web_client_program_cs_file_1 --> flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74 : model ThrowingBookStorageService
    flow_file_nexusreader_web_client_program_cs_file_1 --> flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61 : model ThrowingDbContextFactory
    flow_file_nexusreader_web_client_program_cs_file_1 --> flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84 : model ThrowingEbookRepository
    flow_file_nexusreader_web_client_program_cs_file_1 --> flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66 : model ThrowingEmbeddingGenerator
    flow_file_nexusreader_web_client_program_cs_file_1 --> flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94 : model ThrowingSyncBroadcaster
    flow_file_nexusreader_web_program_cs_file_1 --> flow_type_nexusreader_web_program_cs_groundednessrequest_567 : dto GroundednessRequest
    flow_file_nexusreader_web_program_cs_file_1 --> flow_type_nexusreader_web_program_cs_knowledgerequest_566 : dto KnowledgeRequest
    click flow_file_nexusreader_web_client_program_cs_file_1 href "vscode://file/NexusReader.Web.Client/Program.cs:1:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61 href "vscode://file/NexusReader.Web.Client/Program.cs:61:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66 href "vscode://file/NexusReader.Web.Client/Program.cs:66:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74 href "vscode://file/NexusReader.Web.Client/Program.cs:74:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84 href "vscode://file/NexusReader.Web.Client/Program.cs:84:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94 href "vscode://file/NexusReader.Web.Client/Program.cs:94:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_webplatformservice_18 href "vscode://file/NexusReader.Web.Client/Program.cs:18:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_nexusauthenticationstateprovider_33 href "vscode://file/NexusReader.Web.Client/Program.cs:33:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_wasmknowledgeservice_38 href "vscode://file/NexusReader.Web.Client/Program.cs:38:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_configured_httpclient_40 href "vscode://file/NexusReader.Web.Client/Program.cs:40:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_49 href "vscode://file/NexusReader.Web.Client/Program.cs:49:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_n_a_55 href "vscode://file/NexusReader.Web.Client/Program.cs:55:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_wasmepubreader_56 href "vscode://file/NexusReader.Web.Client/Program.cs:56:1" "Open source"
    click flow_file_nexusreader_infrastructure_configuration_aisettings_cs_file_1 href "vscode://file/NexusReader.Infrastructure/Configuration/AiSettings.cs:1:1" "Open source"
    click flow_type_nexusreader_infrastructure_configuration_aisettings_cs_aisettings_3 href "vscode://file/NexusReader.Infrastructure/Configuration/AiSettings.cs:3:1" "Open source"
    click flow_file_nexusreader_infrastructure_configuration_stripesettings_cs_file_1 href "vscode://file/NexusReader.Infrastructure/Configuration/StripeSettings.cs:1:1" "Open source"
    click flow_type_nexusreader_infrastructure_configuration_stripesettings_cs_stripesettings_3 href "vscode://file/NexusReader.Infrastructure/Configuration/StripeSettings.cs:3:1" "Open source"
    click flow_file_nexusreader_web_program_cs_file_1 href "vscode://file/NexusReader.Web/Program.cs:1:1" "Open source"
    click flow_type_nexusreader_web_program_cs_knowledgerequest_566 href "vscode://file/NexusReader.Web/Program.cs:566:1" "Open source"
    click flow_type_nexusreader_web_program_cs_groundednessrequest_567 href "vscode://file/NexusReader.Web/Program.cs:567:1" "Open source"

Class view shows DTOs (AiSettings, StripeSettings), client-side stubs and concrete Wasm implementations, clarifying contract-to-implementation mapping in startup.

=== DIAGRAM 6: Program.cs Layer View (dependency-map) ===

---
config:
  flowchart:
    defaultRenderer: "elk"
---
flowchart LR
    subgraph layer_frontend["frontend"]
        flow_file_nexusreader_web_client_program_cs_file_1["Program.cs"]
        flow_action_nexusreader_web_client_program_cs_findauthorbynameasync_repository_read_88_88["Reads repository or persistence state"]
        flow_type_nexusreader_web_client_program_cs_configured_httpclient_40[/"configured HttpClient"/]
        flow_type_nexusreader_web_client_program_cs_n_a_55[/"N/A"/]
        flow_type_nexusreader_web_client_program_cs_nexusauthenticationstateprovider_33[/"NexusAuthenticationStateProvider"/]
        flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74[/"ThrowingBookStorageService"/]
        flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_49[/"ThrowingDbContextFactory"/]
        flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61[/"ThrowingDbContextFactory"/]
        flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84[/"ThrowingEbookRepository"/]
        flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66[/"ThrowingEmbeddingGenerator"/]
        flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94[/"ThrowingSyncBroadcaster"/]
        flow_type_nexusreader_web_client_program_cs_wasmepubreader_56[/"WasmEpubReader"/]
        flow_type_nexusreader_web_client_program_cs_wasmknowledgeservice_38[/"WasmKnowledgeService"/]
        flow_type_nexusreader_web_client_program_cs_webplatformservice_18[/"WebPlatformService"/]
        flow_action_nexusreader_web_client_program_cs_getservice_return_71_71(["returns null"])
        flow_file_nexusreader_web_client_program_cs_file_1 -->|uses| flow_type_nexusreader_web_client_program_cs_configured_httpclient_40
        flow_file_nexusreader_web_client_program_cs_file_1 -->|application services via extension| flow_type_nexusreader_web_client_program_cs_n_a_55
        flow_file_nexusreader_web_client_program_cs_file_1 -->|NexusAuthenticationStateProvider| flow_type_nexusreader_web_client_program_cs_nexusauthenticationstateprovider_33
        flow_file_nexusreader_web_client_program_cs_file_1 -->|model ThrowingBookStorageService| flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74
        flow_file_nexusreader_web_client_program_cs_file_1 -->|IDbContextFactory AppDbContext>| flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_49
        flow_file_nexusreader_web_client_program_cs_file_1 -->|model ThrowingDbContextFactory| flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61
        flow_file_nexusreader_web_client_program_cs_file_1 -->|model ThrowingEbookRepository| flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84
        flow_file_nexusreader_web_client_program_cs_file_1 -->|model ThrowingEmbeddingGenerator| flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66
        flow_file_nexusreader_web_client_program_cs_file_1 -->|model ThrowingSyncBroadcaster| flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94
        flow_file_nexusreader_web_client_program_cs_file_1 -->|IEpubReader| flow_type_nexusreader_web_client_program_cs_wasmepubreader_56
        flow_file_nexusreader_web_client_program_cs_file_1 -->|IKnowledgeService| flow_type_nexusreader_web_client_program_cs_wasmknowledgeservice_38
        flow_file_nexusreader_web_client_program_cs_file_1 -->|IPlatformService| flow_type_nexusreader_web_client_program_cs_webplatformservice_18
    end
    subgraph layer_infrastructure["infrastructure"]
        flow_file_nexusreader_infrastructure_configuration_aisettings_cs_file_1["AiSettings"]
        flow_file_nexusreader_infrastructure_configuration_stripesettings_cs_file_1["StripeSettings"]
        flow_type_nexusreader_infrastructure_configuration_aisettings_cs_aisettings_3[/"AiSettings"/]
        flow_file_nexusreader_infrastructure_configuration_aisettings_cs_file_1 -->|dto AiSettings| flow_type_nexusreader_infrastructure_configuration_aisettings_cs_aisettings_3
    end
    subgraph layer_application["application"]
    end
    click flow_file_nexusreader_web_client_program_cs_file_1 href "vscode://file/NexusReader.Web.Client/Program.cs:1:1" "Open source"
    click flow_action_nexusreader_web_client_program_cs_getservice_return_71_71 href "vscode://file/NexusReader.Web.Client/Program.cs:71:1" "Open source"
    click flow_action_nexusreader_web_client_program_cs_findauthorbynameasync_repository_read_88_88 href "vscode://file/NexusReader.Web.Client/Program.cs:88:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61 href "vscode://file/NexusReader.Web.Client/Program.cs:61:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66 href "vscode://file/NexusReader.Web.Client/Program.cs:66:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74 href "vscode://file/NexusReader.Web.Client/Program.cs:74:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84 href "vscode://file/NexusReader.Web.Client/Program.cs:84:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94 href "vscode://file/NexusReader.Web.Client/Program.cs:94:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_webplatformservice_18 href "vscode://file/NexusReader.Web.Client/Program.cs:18:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_nexusauthenticationstateprovider_33 href "vscode://file/NexusReader.Web.Client/Program.cs:33:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_wasmknowledgeservice_38 href "vscode://file/NexusReader.Web.Client/Program.cs:38:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_configured_httpclient_40 href "vscode://file/NexusReader.Web.Client/Program.cs:40:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_49 href "vscode://file/NexusReader.Web.Client/Program.cs:49:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_n_a_55 href "vscode://file/NexusReader.Web.Client/Program.cs:55:1" "Open source"
    click flow_type_nexusreader_web_client_program_cs_wasmepubreader_56 href "vscode://file/NexusReader.Web.Client/Program.cs:56:1" "Open source"
    click flow_file_nexusreader_infrastructure_configuration_aisettings_cs_file_1 href "vscode://file/NexusReader.Infrastructure/Configuration/AiSettings.cs:1:1" "Open source"
    click flow_type_nexusreader_infrastructure_configuration_aisettings_cs_aisettings_3 href "vscode://file/NexusReader.Infrastructure/Configuration/AiSettings.cs:3:1" "Open source"
    click flow_file_nexusreader_infrastructure_configuration_stripesettings_cs_file_1 href "vscode://file/NexusReader.Infrastructure/Configuration/StripeSettings.cs:1:1" "Open source"

Layered diagram separates frontend WASM clients from infrastructure config; useful for seeing platform-specific implementations and where Ai/Stripe configs are loaded.

=== DIAGRAM 7: Method Flow Details (method-flow) ===

flowchart TD
    subgraph NexusReader_Infrastructure_Helpers_ContentHasher["ContentHasher"]
    end
    subgraph NexusReader_Infrastructure_Helpers_JsonRepairHelper["JsonRepairHelper"]
    end
    subgraph NexusReader_Infrastructure_RealTime_SyncHub["SyncHub"]
    end
    flow_file_nexusreader_infrastructure_helpers_contenthasher_cs_file_1["ContentHasher"]
    flow_file_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_file_1["JsonRepairHelper"]
    flow_method_nexusreader_infrastructure_helpers_contenthasher_cs_computehash_9["ComputeHash"]
    flow_method_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_repair_8["Repair"]
    flow_method_nexusreader_infrastructure_realtime_synchub_cs_onconnectedasync_28["OnConnectedAsync"]
    flow_method_nexusreader_infrastructure_realtime_synchub_cs_ondisconnectedasync_38["OnDisconnectedAsync"]
    flow_method_nexusreader_infrastructure_realtime_synchub_cs_synchub_14["SyncHub"]
    flow_method_nexusreader_infrastructure_realtime_synchub_cs_updateprogress_19["UpdateProgress"]
    flow_action_nexusreader_infrastructure_helpers_contenthasher_cs_computehash_branch_11_11{"Evaluates branch condition"}
    flow_action_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_repair_guard_clause_10_10{"Guards early exit or rejection path"}
    flow_action_nexusreader_infrastructure_realtime_synchub_cs_onconnectedasync_repository_read_30_30["Reads repository or persistence state"]
    flow_action_nexusreader_infrastructure_realtime_synchub_cs_ondisconnectedasync_repository_read_40_40["Reads repository or persistence state"]
    flow_action_nexusreader_infrastructure_realtime_synchub_cs_updateprogress_repository_read_21_21["Reads repository or persistence state"]
    flow_action_nexusreader_infrastructure_services_knowledgeservice_cs_askquestionasync_repository_read_717_717["Reads repository or persistence state"]
    flow_action_nexusreader_infrastructure_services_knowledgeservice_cs_executeairequestandcacheasync_guard_clause_167_167{"Guards early exit or rejection path"}
    flow_action_nexusreader_infrastructure_services_knowledgeservice_cs_getknowledgeinternalasync_guard_clause_83_83{"Guards early exit or rejection path"}
    flow_action_nexusreader_web_program_cs_program_top_level_branch_237_237{"Evaluates branch condition"}
    flow_file_nexusreader_infrastructure_realtime_synchub_cs_file_1["SyncHub"]
    flow_action_nexusreader_infrastructure_services_knowledgeservice_cs_askquestionasync_repository_read_717_717 -->|JsonRepairHelper.Repair| flow_method_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_repair_8
    flow_action_nexusreader_infrastructure_services_knowledgeservice_cs_executeairequestandcacheasync_guard_clause_167_167 -->|JsonRepairHelper.Repair| flow_method_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_repair_8
    flow_action_nexusreader_infrastructure_services_knowledgeservice_cs_getknowledgeinternalasync_guard_clause_83_83 -->|ContentHasher.ComputeHash| flow_method_nexusreader_infrastructure_helpers_contenthasher_cs_computehash_9
    flow_action_nexusreader_web_program_cs_program_top_level_branch_237_237 -->|SyncHub| flow_method_nexusreader_infrastructure_realtime_synchub_cs_synchub_14
    flow_file_nexusreader_infrastructure_helpers_contenthasher_cs_file_1 -->|ComputeHash| flow_method_nexusreader_infrastructure_helpers_contenthasher_cs_computehash_9
    flow_file_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_file_1 -->|Repair| flow_method_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_repair_8
    flow_file_nexusreader_infrastructure_realtime_synchub_cs_file_1 -->|OnConnectedAsync| flow_method_nexusreader_infrastructure_realtime_synchub_cs_onconnectedasync_28
    flow_file_nexusreader_infrastructure_realtime_synchub_cs_file_1 -->|OnDisconnectedAsync| flow_method_nexusreader_infrastructure_realtime_synchub_cs_ondisconnectedasync_38
    flow_file_nexusreader_infrastructure_realtime_synchub_cs_file_1 -->|UpdateProgress| flow_method_nexusreader_infrastructure_realtime_synchub_cs_updateprogress_19
    flow_method_nexusreader_infrastructure_helpers_contenthasher_cs_computehash_9 -->|true / false| flow_action_nexusreader_infrastructure_helpers_contenthasher_cs_computehash_branch_11_11
    flow_method_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_repair_8 -->|exit / continue| flow_action_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_repair_guard_clause_10_10
    flow_method_nexusreader_infrastructure_realtime_synchub_cs_onconnectedasync_28 -->|Reads repository or persistence state| flow_action_nexusreader_infrastructure_realtime_synchub_cs_onconnectedasync_repository_read_30_30
    flow_method_nexusreader_infrastructure_realtime_synchub_cs_ondisconnectedasync_38 -->|Reads repository or persistence state| flow_action_nexusreader_infrastructure_realtime_synchub_cs_ondisconnectedasync_repository_read_40_40
    flow_method_nexusreader_infrastructure_realtime_synchub_cs_updateprogress_19 -->|Reads repository or persistence state| flow_action_nexusreader_infrastructure_realtime_synchub_cs_updateprogress_repository_read_21_21
    click flow_action_nexusreader_infrastructure_services_knowledgeservice_cs_getknowledgeinternalasync_guard_clause_83_83 href "vscode://file/NexusReader.Infrastructure/Services/KnowledgeService.cs:83:1" "Open source"
    click flow_file_nexusreader_infrastructure_helpers_contenthasher_cs_file_1 href "vscode://file/NexusReader.Infrastructure/Helpers/ContentHasher.cs:1:1" "Open source"
    click flow_method_nexusreader_infrastructure_helpers_contenthasher_cs_computehash_9 href "vscode://file/NexusReader.Infrastructure/Helpers/ContentHasher.cs:9:1" "Open source"
    click flow_action_nexusreader_infrastructure_services_knowledgeservice_cs_executeairequestandcacheasync_guard_clause_167_167 href "vscode://file/NexusReader.Infrastructure/Services/KnowledgeService.cs:167:1" "Open source"
    click flow_file_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_file_1 href "vscode://file/NexusReader.Infrastructure/Helpers/JsonRepairHelper.cs:1:1" "Open source"
    click flow_method_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_repair_8 href "vscode://file/NexusReader.Infrastructure/Helpers/JsonRepairHelper.cs:8:1" "Open source"
    click flow_action_nexusreader_infrastructure_services_knowledgeservice_cs_askquestionasync_repository_read_717_717 href "vscode://file/NexusReader.Infrastructure/Services/KnowledgeService.cs:717:1" "Open source"
    click flow_action_nexusreader_infrastructure_helpers_contenthasher_cs_computehash_branch_11_11 href "vscode://file/NexusReader.Infrastructure/Helpers/ContentHasher.cs:11:1" "Open source"
    click flow_action_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_repair_guard_clause_10_10 href "vscode://file/NexusReader.Infrastructure/Helpers/JsonRepairHelper.cs:10:1" "Open source"
    click flow_action_nexusreader_web_program_cs_program_top_level_branch_237_237 href "vscode://file/NexusReader.Web/Program.cs:237:1" "Open source"
    click flow_file_nexusreader_infrastructure_realtime_synchub_cs_file_1 href "vscode://file/NexusReader.Infrastructure/RealTime/SyncHub.cs:1:1" "Open source"
    click flow_method_nexusreader_infrastructure_realtime_synchub_cs_synchub_14 href "vscode://file/NexusReader.Infrastructure/RealTime/SyncHub.cs:14:1" "Open source"
    click flow_method_nexusreader_infrastructure_realtime_synchub_cs_updateprogress_19 href "vscode://file/NexusReader.Infrastructure/RealTime/SyncHub.cs:19:1" "Open source"
    click flow_action_nexusreader_infrastructure_realtime_synchub_cs_updateprogress_repository_read_21_21 href "vscode://file/NexusReader.Infrastructure/RealTime/SyncHub.cs:21:1" "Open source"
    click flow_method_nexusreader_infrastructure_realtime_synchub_cs_onconnectedasync_28 href "vscode://file/NexusReader.Infrastructure/RealTime/SyncHub.cs:28:1" "Open source"
    flow_action

... (truncated from 56815 chars)

This connects KnowledgeService logic to helpers: ContentHasher computes hashes used to key KnowledgePacket caching, and JsonRepairHelper guards AI response parsing. It also shows repository reads and guard clauses; diagram output is truncated—see source files for full method flows.

Key Files

  • NexusReader.Infrastructure/Services/KnowledgeService.cs
  • NexusReader.Infrastructure/Services/EpubReaderService.cs
  • NexusReader.Infrastructure/Services/BookStorageService.cs
  • NexusReader.Infrastructure/Services/BillingService.cs
  • NexusReader.Infrastructure/Configuration/AiSettings.cs
  • NexusReader.Infrastructure/Configuration/StripeSettings.cs
  • NexusReader.Infrastructure/Helpers/ContentHasher.cs
  • NexusReader.Infrastructure/Helpers/JsonRepairHelper.cs
  • NexusReader.Infrastructure/Persistence/EbookRepository.cs
  • NexusReader.Web.Client/Program.cs
  • NexusReader.Web.Client/Handlers/AuthenticationHeaderHandler.cs
<script type="application/json" data-ai-mermaid-metadata="0" data-ai-mermaid-diagram-id="dependency_map_graph">{"edges":[{"id":"edge_flow_file_nexusreader_infrastructure_identity_tokenlimitrequirement_cs_file_1_flow_type_nexusreader_infrastructure_identity_tokenlimitrequirement_cs_tokenlimitrequirement_8_defines_type_8","from":"flow_file_nexusreader_infrastructure_identity_tokenlimitrequirement_cs_file_1","to":"flow_type_nexusreader_infrastructure_identity_tokenlimitrequirement_cs_tokenlimitrequirement_8","relation":"transforms","semanticLabel":"model TokenLimitRequirement","payload":{"outputSummary":"Marker authorization requirement indicating a check for a user's AI token usage/limit.","expandedLabel":"defines-type"}},{"id":"edge_flow_file_nexusreader_infrastructure_persistence_ebookrepository_cs_file_1_flow_type_nexusreader_infrastructure_persistence_ebookrepository_cs_ebookrepository_12_defines_type_12","from":"flow_file_nexusreader_infrastructure_persistence_ebookrepository_cs_file_1","to":"flow_type_nexusreader_infrastructure_persistence_ebookrepository_cs_ebookrepository_12","relation":"transforms","semanticLabel":"model EbookRepository","payload":{"outputSummary":"Concrete EF Core repository implementing IEbookRepository to manage Author and Ebook entities via AppDbContext.","expandedLabel":"defines-type"}},{"id":"edge_flow_file_nexusreader_infrastructure_services_bookstorageservice_cs_file_1_flow_type_nexusreader_infrastructure_services_bookstorageservice_cs_bookstorageservice_10_defines_type_10","from":"flow_file_nexusreader_infrastructure_services_bookstorageservice_cs_file_1","to":"flow_type_nexusreader_infrastructure_services_bookstorageservice_cs_bookstorageservice_10","relation":"transforms","semanticLabel":"model BookStorageService","payload":{"outputSummary":"Concrete infrastructure implementation of IBookStorageService that persists ebook and cover bytes to filesystem under the web root.","expandedLabel":"defines-type"}},{"id":"edge_flow_file_nexusreader_web_client_handlers_authenticationheaderhandler_cs_file_1_flow_type_nexusreader_web_client_handlers_authenticationheaderhandler_cs_authenticationheaderhandler_14_defines_type_14","from":"flow_file_nexusreader_web_client_handlers_authenticationheaderhandler_cs_file_1","to":"flow_type_nexusreader_web_client_handlers_authenticationheaderhandler_cs_authenticationheaderhandler_14","relation":"transforms","semanticLabel":"model AuthenticationHeaderHandler","payload":{"outputSummary":"DelegatingHandler that attaches JWTs to trusted requests and orchestrates token refresh and retry behavior.","expandedLabel":"defines-type"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61_defines_type_61","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61","relation":"transforms","semanticLabel":"model ThrowingDbContextFactory","payload":{"outputSummary":"IDbContextFactory implementation that prevents use of EF DbContext in WASM by throwing on creation.","expandedLabel":"defines-type"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66_defines_type_66","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66","relation":"transforms","semanticLabel":"model ThrowingEmbeddingGenerator","payload":{"outputSummary":"IEmbeddingGenerator implementation that disables local embedding generation in WASM (throws on GenerateAsync).","expandedLabel":"defines-type"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74_defines_type_74","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74","relation":"transforms","semanticLabel":"model ThrowingBookStorageService","payload":{"outputSummary":"IBookStorageService implementation that throws for all file storage operations in WASM.","expandedLabel":"defines-type"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84_defines_type_84","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84","relation":"transforms","semanticLabel":"model ThrowingEbookRepository","payload":{"outputSummary":"IEbookRepository implementation that throws for all repository operations in WASM.","expandedLabel":"defines-type"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94_defines_type_94","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94","relation":"transforms","semanticLabel":"model ThrowingSyncBroadcaster","payload":{"outputSummary":"ISyncBroadcaster implementation that throws because real-time broadcasting must run on the server.","expandedLabel":"defines-type"}}],"nodes":[{"id":"flow_file_nexusreader_infrastructure_identity_tokenlimithandler_cs_file_1","kind":"dependency","label":"TokenLimitHandler","sourcePath":"NexusReader.Infrastructure/Identity/TokenLimitHandler.cs","sourceLine":1},{"id":"flow_file_nexusreader_infrastructure_identity_tokenlimitrequirement_cs_file_1","kind":"dependency","label":"TokenLimitRequirement","sourcePath":"NexusReader.Infrastructure/Identity/TokenLimitRequirement.cs","sourceLine":1},{"id":"flow_type_nexusreader_infrastructure_identity_tokenlimitrequirement_cs_tokenlimitrequirement_8","kind":"dependency","label":"TokenLimitRequirement","sourcePath":"NexusReader.Infrastructure/Identity/TokenLimitRequirement.cs","sourceLine":8},{"id":"flow_file_nexusreader_infrastructure_persistence_ebookrepository_cs_file_1","kind":"dependency","label":"EbookRepository","sourcePath":"NexusReader.Infrastructure/Persistence/EbookRepository.cs","sourceLine":1},{"id":"flow_type_nexusreader_infrastructure_persistence_ebookrepository_cs_ebookrepository_12","kind":"dependency","label":"EbookRepository","sourcePath":"NexusReader.Infrastructure/Persistence/EbookRepository.cs","sourceLine":12},{"id":"flow_file_nexusreader_infrastructure_services_billingservice_cs_file_1","kind":"service","label":"BillingService","sourcePath":"NexusReader.Infrastructure/Services/BillingService.cs","sourceLine":1},{"id":"flow_file_nexusreader_infrastructure_services_bookstorageservice_cs_file_1","kind":"service","label":"BookStorageService","sourcePath":"NexusReader.Infrastructure/Services/BookStorageService.cs","sourceLine":1},{"id":"flow_type_nexusreader_infrastructure_services_bookstorageservice_cs_bookstorageservice_10","kind":"dependency","label":"BookStorageService","sourcePath":"NexusReader.Infrastructure/Services/BookStorageService.cs","sourceLine":10},{"id":"flow_file_nexusreader_infrastructure_services_epubreaderservice_cs_file_1","kind":"service","label":"EpubReaderService","sourcePath":"NexusReader.Infrastructure/Services/EpubReaderService.cs","sourceLine":1},{"id":"flow_file_nexusreader_infrastructure_services_knowledgeservice_cs_file_1","kind":"service","label":"KnowledgeService","sourcePath":"NexusReader.Infrastructure/Services/KnowledgeService.cs","sourceLine":1},{"id":"flow_file_nexusreader_infrastructure_helpers_contenthasher_cs_file_1","kind":"service","label":"ContentHasher","sourcePath":"NexusReader.Infrastructure/Helpers/ContentHasher.cs","sourceLine":1},{"id":"flow_file_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_file_1","kind":"service","label":"JsonRepairHelper","sourcePath":"NexusReader.Infrastructure/Helpers/JsonRepairHelper.cs","sourceLine":1},{"id":"flow_file_nexusreader_web_client_handlers_authenticationheaderhandler_cs_file_1","kind":"dependency","label":"AuthenticationHeaderHandler","sourcePath":"NexusReader.Web.Client/Handlers/AuthenticationHeaderHandler.cs","sourceLine":1},{"id":"flow_type_nexusreader_web_client_handlers_authenticationheaderhandler_cs_authenticationheaderhandler_14","kind":"dependency","label":"AuthenticationHeaderHandler","sourcePath":"NexusReader.Web.Client/Handlers/AuthenticationHeaderHandler.cs","sourceLine":14},{"id":"flow_file_nexusreader_web_client_program_cs_file_1","kind":"service","label":"Program.cs","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":1},{"id":"flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61","kind":"dependency","label":"ThrowingDbContextFactory","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":61},{"id":"flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66","kind":"dependency","label":"ThrowingEmbeddingGenerator","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":66},{"id":"flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74","kind":"dependency","label":"ThrowingBookStorageService","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":74},{"id":"flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84","kind":"dependency","label":"ThrowingEbookRepository","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":84},{"id":"flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94","kind":"dependency","label":"ThrowingSyncBroadcaster","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":94}]}</script> <script type="application/json" data-ai-mermaid-metadata="1" data-ai-mermaid-diagram-id="startup_runtime_graph">{"edges":[{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_webplatformservice_18_registers_service_18","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_webplatformservice_18","relation":"uses","semanticLabel":"IPlatformService","payload":{"outputSummary":"Registers platform abstraction for browser.","expandedLabel":"registers-service"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_nexusauthenticationstateprovider_33_registers_service_33","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_nexusauthenticationstateprovider_33","relation":"uses","semanticLabel":"NexusAuthenticationStateProvider","payload":{"outputSummary":"Authentication state provider and wiring to AuthenticationStateProvider.","expandedLabel":"registers-service"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_wasmknowledgeservice_38_registers_service_38","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_wasmknowledgeservice_38","relation":"uses","semanticLabel":"IKnowledgeService","payload":{"outputSummary":"Registers a WASM-specific knowledge service implementation.","expandedLabel":"registers-service"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_configured_httpclient_40_registers_service_40","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_configured_httpclient_40","relation":"uses","semanticLabel":"HttpClient (named 'NexusAPI')","payload":{"outputSummary":"Adds named HTTP client with base address and authentication header handler.","expandedLabel":"registers-service"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_49_registers_service_49","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_49","relation":"uses","semanticLabel":"IDbContextFactory","payload":{"outputSummary":"Registers throw-only stub to avoid using DbContext in WASM.","expandedLabel":"registers-service"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_n_a_55_registers_service_55","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_n_a_55","relation":"uses","semanticLabel":"application services (via extension)","payload":{"outputSummary":"Calls AddApplication() to register application-layer services.","expandedLabel":"registers-service"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_wasmepubreader_56_registers_service_56","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_wasmepubreader_56","relation":"uses","semanticLabel":"IEpubReader","payload":{"outputSummary":"Registers WASM epub reader implementation.","expandedLabel":"registers-service"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_method_nexusreader_web_client_program_cs_run_wasm_host_59_configures_pipeline_59","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_method_nexusreader_web_client_program_cs_run_wasm_host_59","relation":"calls","semanticLabel":"unknown","payload":{"outputSummary":"unknown","expandedLabel":"configures-pipeline"}}],"nodes":[{"id":"flow_file_nexusreader_web_client_program_cs_file_1","kind":"service","label":"Program.cs","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":1},{"id":"flow_method_nexusreader_web_client_program_cs_program_top_level_startup_15","kind":"method","label":"Program (top-level startup)","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":15},{"id":"flow_method_nexusreader_web_client_program_cs_getservice_71","kind":"method","label":"GetService","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":71},{"id":"flow_action_nexusreader_web_client_program_cs_getservice_return_71_71","kind":"return","label":"returns null","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":71},{"id":"flow_method_nexusreader_web_client_program_cs_findauthorbynameasync_88","kind":"method","label":"FindAuthorByNameAsync","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":88},{"id":"flow_action_nexusreader_web_client_program_cs_findauthorbynameasync_repository_read_88_88","kind":"step","label":"Reads repository or persistence state","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":88},{"id":"flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61","kind":"dependency","label":"ThrowingDbContextFactory","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":61},{"id":"flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66","kind":"dependency","label":"ThrowingEmbeddingGenerator","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":66},{"id":"flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74","kind":"dependency","label":"ThrowingBookStorageService","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":74},{"id":"flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84","kind":"dependency","label":"ThrowingEbookRepository","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":84},{"id":"flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94","kind":"dependency","label":"ThrowingSyncBroadcaster","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":94},{"id":"flow_type_nexusreader_web_client_program_cs_webplatformservice_18","kind":"dependency","label":"WebPlatformService","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":18},{"id":"flow_type_nexusreader_web_client_program_cs_nexusauthenticationstateprovider_33","kind":"dependency","label":"NexusAuthenticationStateProvider","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":33},{"id":"flow_type_nexusreader_web_client_program_cs_wasmknowledgeservice_38","kind":"dependency","label":"WasmKnowledgeService","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":38},{"id":"flow_type_nexusreader_web_client_program_cs_configured_httpclient_40","kind":"dependency","label":"configured HttpClient","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":40},{"id":"flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_49","kind":"dependency","label":"ThrowingDbContextFactory","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":49},{"id":"flow_type_nexusreader_web_client_program_cs_n_a_55","kind":"dependency","label":"N/A","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":55},{"id":"flow_type_nexusreader_web_client_program_cs_wasmepubreader_56","kind":"dependency","label":"WasmEpubReader","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":56},{"id":"flow_method_nexusreader_web_client_program_cs_run_wasm_host_59","kind":"method","label":"Run WASM Host","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":59},{"id":"flow_file_nexusreader_infrastructure_configuration_aisettings_cs_file_1","kind":"dependency","label":"AiSettings","sourcePath":"NexusReader.Infrastructure/Configuration/AiSettings.cs","sourceLine":1},{"id":"flow_type_nexusreader_infrastructure_configuration_aisettings_cs_aisettings_3","kind":"dependency","label":"AiSettings","sourcePath":"NexusReader.Infrastructure/Configuration/AiSettings.cs","sourceLine":3},{"id":"flow_file_nexusreader_infrastructure_configuration_stripesettings_cs_file_1","kind":"dependency","label":"StripeSettings","sourcePath":"NexusReader.Infrastructure/Configuration/StripeSettings.cs","sourceLine":1},{"id":"flow_type_nexusreader_infrastructure_configuration_stripesettings_cs_stripesettings_3","kind":"dependency","label":"StripeSettings","sourcePath":"NexusReader.Infrastructure/Configuration/StripeSettings.cs","sourceLine":3},{"id":"flow_file_nexusreader_web_program_cs_file_1","kind":"service","label":"Program.cs","sourcePath":"NexusReader.Web/Program.cs","sourceLine":1}]}</script> <script type="application/json" data-ai-mermaid-metadata="2" data-ai-mermaid-diagram-id="primary_runtime_flow_1_nexusreader_web_client_program_cs">{"edges":[{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_method_nexusreader_web_client_program_cs_program_top_level_startup_15_invokes_15","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_method_nexusreader_web_client_program_cs_program_top_level_startup_15","relation":"calls","semanticLabel":"Program (top-level startup)","payload":{"outputSummary":"Create the WebAssemblyHostBuilder, register application and platform services, add HTTP client and dummy server-only stubs, then build and run the WASM host.","expandedLabel":"handles-route"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_method_nexusreader_web_client_program_cs_getservice_71_invokes_71","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_method_nexusreader_web_client_program_cs_getservice_71","relation":"calls","semanticLabel":"GetService","payload":{"outputSummary":"Fallback service resolver stub that always returns null.","expandedLabel":"handles-route"}},{"id":"edge_flow_method_nexusreader_web_client_program_cs_getservice_71_flow_action_nexusreader_web_client_program_cs_getservice_return_71_71_returns_71","from":"flow_method_nexusreader_web_client_program_cs_getservice_71","to":"flow_action_nexusreader_web_client_program_cs_getservice_return_71_71","relation":"returns","semanticLabel":"returns null","payload":{"outputSummary":"public object? GetService(...) => null","expandedLabel":"returns"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_method_nexusreader_web_client_program_cs_findauthorbynameasync_88_invokes_88","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_method_nexusreader_web_client_program_cs_findauthorbynameasync_88","relation":"calls","semanticLabel":"FindAuthorByNameAsync","payload":{"outputSummary":"Repository lookup stub that throws because repository access is unsupported in WASM.","expandedLabel":"handles-route"}},{"id":"edge_flow_method_nexusreader_web_client_program_cs_findauthorbynameasync_88_flow_action_nexusreader_web_client_program_cs_findauthorbynameasync_repository_read_88_88_invokes_88","from":"flow_method_nexusreader_web_client_program_cs_findauthorbynameasync_88","to":"flow_action_nexusreader_web_client_program_cs_findauthorbynameasync_repository_read_88_88","relation":"calls","semanticLabel":"Reads repository or persistence state","payload":{"outputSummary":"public Task FindAuthorByNameAsync(string name, CancellationToken cancellationToken = default) => throw new NotSupportedException(ErrorMessage);","expandedLabel":"invokes"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61_defines_type_61","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61","relation":"transforms","semanticLabel":"model ThrowingDbContextFactory","payload":{"outputSummary":"IDbContextFactory implementation that prevents use of EF DbContext in WASM by throwing on creation.","expandedLabel":"defines-type"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66_defines_type_66","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66","relation":"transforms","semanticLabel":"model ThrowingEmbeddingGenerator","payload":{"outputSummary":"IEmbeddingGenerator implementation that disables local embedding generation in WASM (throws on GenerateAsync).","expandedLabel":"defines-type"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74_defines_type_74","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74","relation":"transforms","semanticLabel":"model ThrowingBookStorageService","payload":{"outputSummary":"IBookStorageService implementation that throws for all file storage operations in WASM.","expandedLabel":"defines-type"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84_defines_type_84","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84","relation":"transforms","semanticLabel":"model ThrowingEbookRepository","payload":{"outputSummary":"IEbookRepository implementation that throws for all repository operations in WASM.","expandedLabel":"defines-type"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94_defines_type_94","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94","relation":"transforms","semanticLabel":"model ThrowingSyncBroadcaster","payload":{"outputSummary":"ISyncBroadcaster implementation that throws because real-time broadcasting must run on the server.","expandedLabel":"defines-type"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_webplatformservice_18_registers_service_18","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_webplatformservice_18","relation":"uses","semanticLabel":"IPlatformService","payload":{"outputSummary":"Registers platform abstraction for browser.","expandedLabel":"registers-service"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_nexusauthenticationstateprovider_33_registers_service_33","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_nexusauthenticationstateprovider_33","relation":"uses","semanticLabel":"NexusAuthenticationStateProvider","payload":{"outputSummary":"Authentication state provider and wiring to AuthenticationStateProvider.","expandedLabel":"registers-service"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_wasmknowledgeservice_38_registers_service_38","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_wasmknowledgeservice_38","relation":"uses","semanticLabel":"IKnowledgeService","payload":{"outputSummary":"Registers a WASM-specific knowledge service implementation.","expandedLabel":"registers-service"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_configured_httpclient_40_registers_service_40","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_configured_httpclient_40","relation":"uses","semanticLabel":"HttpClient (named 'NexusAPI')","payload":{"outputSummary":"Adds named HTTP client with base address and authentication header handler.","expandedLabel":"registers-service"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_49_registers_service_49","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_49","relation":"uses","semanticLabel":"IDbContextFactory","payload":{"outputSummary":"Registers throw-only stub to avoid using DbContext in WASM.","expandedLabel":"registers-service"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_n_a_55_registers_service_55","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_n_a_55","relation":"uses","semanticLabel":"application services (via extension)","payload":{"outputSummary":"Calls AddApplication() to register application-layer services.","expandedLabel":"registers-service"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_wasmepubreader_56_registers_service_56","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_wasmepubreader_56","relation":"uses","semanticLabel":"IEpubReader","payload":{"outputSummary":"Registers WASM epub reader implementation.","expandedLabel":"registers-service"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_method_nexusreader_web_client_program_cs_run_wasm_host_59_configures_pipeline_59","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_method_nexusreader_web_client_program_cs_run_wasm_host_59","relation":"calls","semanticLabel":"unknown","payload":{"outputSummary":"unknown","expandedLabel":"configures-pipeline"}},{"id":"edge_flow_file_nexusreader_infrastructure_configuration_aisettings_cs_file_1_flow_type_nexusreader_infrastructure_configuration_aisettings_cs_aisettings_3_maps_dto_3","from":"flow_file_nexusreader_infrastructure_configuration_aisettings_cs_file_1","to":"flow_type_nexusreader_infrastructure_configuration_aisettings_cs_aisettings_3","relation":"transforms","semanticLabel":"dto AiSettings","payload":{"outputSummary":"Holds AI/Google-related configuration for the application (model names, keys, token limits, retry and temperature settings).","expandedLabel":"maps-dto"}},{"id":"edge_flow_file_nexusreader_infrastructure_configuration_stripesettings_cs_file_1_flow_type_nexusreader_infrastructure_configuration_stripesettings_cs_stripesettings_3_maps_dto_3","from":"flow_file_nexusreader_infrastructure_configuration_stripesettings_cs_file_1","to":"flow_type_nexusreader_infrastructure_configuration_stripesettings_cs_stripesettings_3","relation":"transforms","semanticLabel":"dto StripeSettings","payload":{"outputSummary":"Configuration DTO that holds Stripe product identifiers and the configuration section key.","expandedLabel":"maps-dto"}}],"nodes":[{"id":"flow_file_nexusreader_web_client_program_cs_file_1","kind":"service","label":"Program.cs","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":1},{"id":"flow_method_nexusreader_web_client_program_cs_program_top_level_startup_15","kind":"method","label":"Program (top-level startup)","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":15},{"id":"flow_method_nexusreader_web_client_program_cs_getservice_71","kind":"method","label":"GetService","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":71},{"id":"flow_action_nexusreader_web_client_program_cs_getservice_return_71_71","kind":"return","label":"returns null","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":71},{"id":"flow_method_nexusreader_web_client_program_cs_findauthorbynameasync_88","kind":"method","label":"FindAuthorByNameAsync","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":88},{"id":"flow_action_nexusreader_web_client_program_cs_findauthorbynameasync_repository_read_88_88","kind":"step","label":"Reads repository or persistence state","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":88},{"id":"flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61","kind":"dependency","label":"ThrowingDbContextFactory","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":61},{"id":"flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66","kind":"dependency","label":"ThrowingEmbeddingGenerator","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":66},{"id":"flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74","kind":"dependency","label":"ThrowingBookStorageService","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":74},{"id":"flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84","kind":"dependency","label":"ThrowingEbookRepository","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":84},{"id":"flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94","kind":"dependency","label":"ThrowingSyncBroadcaster","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":94},{"id":"flow_type_nexusreader_web_client_program_cs_webplatformservice_18","kind":"dependency","label":"WebPlatformService","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":18},{"id":"flow_type_nexusreader_web_client_program_cs_nexusauthenticationstateprovider_33","kind":"dependency","label":"NexusAuthenticationStateProvider","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":33},{"id":"flow_type_nexusreader_web_client_program_cs_wasmknowledgeservice_38","kind":"dependency","label":"WasmKnowledgeService","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":38},{"id":"flow_type_nexusreader_web_client_program_cs_configured_httpclient_40","kind":"dependency","label":"configured HttpClient","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":40},{"id":"flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_49","kind":"dependency","label":"ThrowingDbContextFactory","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":49},{"id":"flow_type_nexusreader_web_client_program_cs_n_a_55","kind":"dependency","label":"N/A","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":55},{"id":"flow_type_nexusreader_web_client_program_cs_wasmepubreader_56","kind":"dependency","label":"WasmEpubReader","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":56},{"id":"flow_method_nexusreader_web_client_program_cs_run_wasm_host_59","kind":"method","label":"Run WASM Host","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":59},{"id":"flow_file_nexusreader_infrastructure_configuration_aisettings_cs_file_1","kind":"dependency","label":"AiSettings","sourcePath":"NexusReader.Infrastructure/Configuration/AiSettings.cs","sourceLine":1},{"id":"flow_type_nexusreader_infrastructure_configuration_aisettings_cs_aisettings_3","kind":"dependency","label":"AiSettings","sourcePath":"NexusReader.Infrastructure/Configuration/AiSettings.cs","sourceLine":3},{"id":"flow_file_nexusreader_infrastructure_configuration_stripesettings_cs_file_1","kind":"dependency","label":"StripeSettings","sourcePath":"NexusReader.Infrastructure/Configuration/StripeSettings.cs","sourceLine":1},{"id":"flow_type_nexusreader_infrastructure_configuration_stripesettings_cs_stripesettings_3","kind":"dependency","label":"StripeSettings","sourcePath":"NexusReader.Infrastructure/Configuration/StripeSettings.cs","sourceLine":3},{"id":"flow_file_nexusreader_web_program_cs_file_1","kind":"service","label":"Program.cs","sourcePath":"NexusReader.Web/Program.cs","sourceLine":1}]}</script> <script type="application/json" data-ai-mermaid-metadata="3" data-ai-mermaid-diagram-id="control_flow_flow_1_nexusreader_web_client_program_cs">{"edges":[{"id":"edge_flow_method_nexusreader_web_client_program_cs_getservice_71_flow_action_nexusreader_web_client_program_cs_getservice_return_71_71_returns_71","from":"flow_method_nexusreader_web_client_program_cs_getservice_71","to":"flow_action_nexusreader_web_client_program_cs_getservice_return_71_71","relation":"returns","semanticLabel":"returns null","payload":{"outputSummary":"public object? GetService(...) => null","expandedLabel":"returns"}},{"id":"edge_flow_method_nexusreader_web_client_program_cs_findauthorbynameasync_88_flow_action_nexusreader_web_client_program_cs_findauthorbynameasync_repository_read_88_88_invokes_88","from":"flow_method_nexusreader_web_client_program_cs_findauthorbynameasync_88","to":"flow_action_nexusreader_web_client_program_cs_findauthorbynameasync_repository_read_88_88","relation":"calls","semanticLabel":"Reads repository or persistence state","payload":{"outputSummary":"public Task FindAuthorByNameAsync(string name, CancellationToken cancellationToken = default) => throw new NotSupportedException(ErrorMessage);","expandedLabel":"invokes"}}],"nodes":[{"id":"flow_file_nexusreader_web_client_program_cs_file_1","kind":"service","label":"Program.cs","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":1},{"id":"flow_method_nexusreader_web_client_program_cs_program_top_level_startup_15","kind":"method","label":"Program (top-level startup)","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":15},{"id":"flow_method_nexusreader_web_client_program_cs_getservice_71","kind":"method","label":"GetService","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":71},{"id":"flow_action_nexusreader_web_client_program_cs_getservice_return_71_71","kind":"return","label":"returns null","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":71},{"id":"flow_method_nexusreader_web_client_program_cs_findauthorbynameasync_88","kind":"method","label":"FindAuthorByNameAsync","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":88},{"id":"flow_action_nexusreader_web_client_program_cs_findauthorbynameasync_repository_read_88_88","kind":"step","label":"Reads repository or persistence state","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":88},{"id":"flow_method_nexusreader_web_client_program_cs_run_wasm_host_59","kind":"method","label":"Run WASM Host","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":59},{"id":"flow_file_nexusreader_web_program_cs_file_1","kind":"service","label":"Program.cs","sourcePath":"NexusReader.Web/Program.cs","sourceLine":1}]}</script> <script type="application/json" data-ai-mermaid-metadata="4" data-ai-mermaid-diagram-id="contracts_flow_1_nexusreader_web_client_program_cs">{"edges":[{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61_defines_type_61","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61","relation":"transforms","semanticLabel":"model ThrowingDbContextFactory","payload":{"outputSummary":"IDbContextFactory implementation that prevents use of EF DbContext in WASM by throwing on creation.","expandedLabel":"defines-type"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66_defines_type_66","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66","relation":"transforms","semanticLabel":"model ThrowingEmbeddingGenerator","payload":{"outputSummary":"IEmbeddingGenerator implementation that disables local embedding generation in WASM (throws on GenerateAsync).","expandedLabel":"defines-type"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74_defines_type_74","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74","relation":"transforms","semanticLabel":"model ThrowingBookStorageService","payload":{"outputSummary":"IBookStorageService implementation that throws for all file storage operations in WASM.","expandedLabel":"defines-type"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84_defines_type_84","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84","relation":"transforms","semanticLabel":"model ThrowingEbookRepository","payload":{"outputSummary":"IEbookRepository implementation that throws for all repository operations in WASM.","expandedLabel":"defines-type"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94_defines_type_94","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94","relation":"transforms","semanticLabel":"model ThrowingSyncBroadcaster","payload":{"outputSummary":"ISyncBroadcaster implementation that throws because real-time broadcasting must run on the server.","expandedLabel":"defines-type"}},{"id":"edge_flow_file_nexusreader_infrastructure_configuration_aisettings_cs_file_1_flow_type_nexusreader_infrastructure_configuration_aisettings_cs_aisettings_3_maps_dto_3","from":"flow_file_nexusreader_infrastructure_configuration_aisettings_cs_file_1","to":"flow_type_nexusreader_infrastructure_configuration_aisettings_cs_aisettings_3","relation":"transforms","semanticLabel":"dto AiSettings","payload":{"outputSummary":"Holds AI/Google-related configuration for the application (model names, keys, token limits, retry and temperature settings).","expandedLabel":"maps-dto"}},{"id":"edge_flow_file_nexusreader_infrastructure_configuration_stripesettings_cs_file_1_flow_type_nexusreader_infrastructure_configuration_stripesettings_cs_stripesettings_3_maps_dto_3","from":"flow_file_nexusreader_infrastructure_configuration_stripesettings_cs_file_1","to":"flow_type_nexusreader_infrastructure_configuration_stripesettings_cs_stripesettings_3","relation":"transforms","semanticLabel":"dto StripeSettings","payload":{"outputSummary":"Configuration DTO that holds Stripe product identifiers and the configuration section key.","expandedLabel":"maps-dto"}},{"id":"edge_flow_file_nexusreader_web_program_cs_file_1_flow_type_nexusreader_web_program_cs_knowledgerequest_566_maps_dto_566","from":"flow_file_nexusreader_web_program_cs_file_1","to":"flow_type_nexusreader_web_program_cs_knowledgerequest_566","relation":"transforms","semanticLabel":"dto KnowledgeRequest","payload":{"outputSummary":"Request DTO carrying free-text input and optional ebook context for knowledge APIs.","expandedLabel":"maps-dto"}},{"id":"edge_flow_file_nexusreader_web_program_cs_file_1_flow_type_nexusreader_web_program_cs_groundednessrequest_567_maps_dto_567","from":"flow_file_nexusreader_web_program_cs_file_1","to":"flow_type_nexusreader_web_program_cs_groundednessrequest_567","relation":"transforms","semanticLabel":"dto GroundednessRequest","payload":{"outputSummary":"Request DTO for verifying answer groundedness in a context.","expandedLabel":"maps-dto"}}],"nodes":[{"id":"flow_file_nexusreader_web_client_program_cs_file_1","kind":"service","label":"Program.cs","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":1},{"id":"flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61","kind":"dependency","label":"ThrowingDbContextFactory","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":61},{"id":"flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66","kind":"dependency","label":"ThrowingEmbeddingGenerator","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":66},{"id":"flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74","kind":"dependency","label":"ThrowingBookStorageService","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":74},{"id":"flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84","kind":"dependency","label":"ThrowingEbookRepository","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":84},{"id":"flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94","kind":"dependency","label":"ThrowingSyncBroadcaster","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":94},{"id":"flow_type_nexusreader_web_client_program_cs_webplatformservice_18","kind":"dependency","label":"WebPlatformService","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":18},{"id":"flow_type_nexusreader_web_client_program_cs_nexusauthenticationstateprovider_33","kind":"dependency","label":"NexusAuthenticationStateProvider","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":33},{"id":"flow_type_nexusreader_web_client_program_cs_wasmknowledgeservice_38","kind":"dependency","label":"WasmKnowledgeService","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":38},{"id":"flow_type_nexusreader_web_client_program_cs_configured_httpclient_40","kind":"dependency","label":"configured HttpClient","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":40},{"id":"flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_49","kind":"dependency","label":"ThrowingDbContextFactory","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":49},{"id":"flow_type_nexusreader_web_client_program_cs_n_a_55","kind":"dependency","label":"N/A","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":55},{"id":"flow_type_nexusreader_web_client_program_cs_wasmepubreader_56","kind":"dependency","label":"WasmEpubReader","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":56},{"id":"flow_file_nexusreader_infrastructure_configuration_aisettings_cs_file_1","kind":"dependency","label":"AiSettings","sourcePath":"NexusReader.Infrastructure/Configuration/AiSettings.cs","sourceLine":1},{"id":"flow_type_nexusreader_infrastructure_configuration_aisettings_cs_aisettings_3","kind":"dependency","label":"AiSettings","sourcePath":"NexusReader.Infrastructure/Configuration/AiSettings.cs","sourceLine":3},{"id":"flow_file_nexusreader_infrastructure_configuration_stripesettings_cs_file_1","kind":"dependency","label":"StripeSettings","sourcePath":"NexusReader.Infrastructure/Configuration/StripeSettings.cs","sourceLine":1},{"id":"flow_type_nexusreader_infrastructure_configuration_stripesettings_cs_stripesettings_3","kind":"dependency","label":"StripeSettings","sourcePath":"NexusReader.Infrastructure/Configuration/StripeSettings.cs","sourceLine":3},{"id":"flow_file_nexusreader_web_program_cs_file_1","kind":"service","label":"Program.cs","sourcePath":"NexusReader.Web/Program.cs","sourceLine":1},{"id":"flow_type_nexusreader_web_program_cs_knowledgerequest_566","kind":"dependency","label":"KnowledgeRequest","sourcePath":"NexusReader.Web/Program.cs","sourceLine":566},{"id":"flow_type_nexusreader_web_program_cs_groundednessrequest_567","kind":"dependency","label":"GroundednessRequest","sourcePath":"NexusReader.Web/Program.cs","sourceLine":567}]}</script> <script type="application/json" data-ai-mermaid-metadata="5" data-ai-mermaid-diagram-id="layer_flow_1_nexusreader_web_client_program_cs">{"edges":[{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61_defines_type_61","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61","relation":"transforms","semanticLabel":"model ThrowingDbContextFactory","payload":{"outputSummary":"IDbContextFactory implementation that prevents use of EF DbContext in WASM by throwing on creation.","expandedLabel":"defines-type"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66_defines_type_66","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66","relation":"transforms","semanticLabel":"model ThrowingEmbeddingGenerator","payload":{"outputSummary":"IEmbeddingGenerator implementation that disables local embedding generation in WASM (throws on GenerateAsync).","expandedLabel":"defines-type"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74_defines_type_74","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74","relation":"transforms","semanticLabel":"model ThrowingBookStorageService","payload":{"outputSummary":"IBookStorageService implementation that throws for all file storage operations in WASM.","expandedLabel":"defines-type"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84_defines_type_84","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84","relation":"transforms","semanticLabel":"model ThrowingEbookRepository","payload":{"outputSummary":"IEbookRepository implementation that throws for all repository operations in WASM.","expandedLabel":"defines-type"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94_defines_type_94","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94","relation":"transforms","semanticLabel":"model ThrowingSyncBroadcaster","payload":{"outputSummary":"ISyncBroadcaster implementation that throws because real-time broadcasting must run on the server.","expandedLabel":"defines-type"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_webplatformservice_18_registers_service_18","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_webplatformservice_18","relation":"uses","semanticLabel":"IPlatformService","payload":{"outputSummary":"Registers platform abstraction for browser.","expandedLabel":"registers-service"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_nexusauthenticationstateprovider_33_registers_service_33","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_nexusauthenticationstateprovider_33","relation":"uses","semanticLabel":"NexusAuthenticationStateProvider","payload":{"outputSummary":"Authentication state provider and wiring to AuthenticationStateProvider.","expandedLabel":"registers-service"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_wasmknowledgeservice_38_registers_service_38","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_wasmknowledgeservice_38","relation":"uses","semanticLabel":"IKnowledgeService","payload":{"outputSummary":"Registers a WASM-specific knowledge service implementation.","expandedLabel":"registers-service"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_configured_httpclient_40_registers_service_40","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_configured_httpclient_40","relation":"uses","semanticLabel":"HttpClient (named 'NexusAPI')","payload":{"outputSummary":"Adds named HTTP client with base address and authentication header handler.","expandedLabel":"registers-service"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_49_registers_service_49","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_49","relation":"uses","semanticLabel":"IDbContextFactory","payload":{"outputSummary":"Registers throw-only stub to avoid using DbContext in WASM.","expandedLabel":"registers-service"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_n_a_55_registers_service_55","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_n_a_55","relation":"uses","semanticLabel":"application services (via extension)","payload":{"outputSummary":"Calls AddApplication() to register application-layer services.","expandedLabel":"registers-service"}},{"id":"edge_flow_file_nexusreader_web_client_program_cs_file_1_flow_type_nexusreader_web_client_program_cs_wasmepubreader_56_registers_service_56","from":"flow_file_nexusreader_web_client_program_cs_file_1","to":"flow_type_nexusreader_web_client_program_cs_wasmepubreader_56","relation":"uses","semanticLabel":"IEpubReader","payload":{"outputSummary":"Registers WASM epub reader implementation.","expandedLabel":"registers-service"}},{"id":"edge_flow_file_nexusreader_infrastructure_configuration_aisettings_cs_file_1_flow_type_nexusreader_infrastructure_configuration_aisettings_cs_aisettings_3_maps_dto_3","from":"flow_file_nexusreader_infrastructure_configuration_aisettings_cs_file_1","to":"flow_type_nexusreader_infrastructure_configuration_aisettings_cs_aisettings_3","relation":"transforms","semanticLabel":"dto AiSettings","payload":{"outputSummary":"Holds AI/Google-related configuration for the application (model names, keys, token limits, retry and temperature settings).","expandedLabel":"maps-dto"}}],"nodes":[{"id":"flow_file_nexusreader_web_client_program_cs_file_1","kind":"service","label":"Program.cs","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":1},{"id":"flow_action_nexusreader_web_client_program_cs_getservice_return_71_71","kind":"return","label":"returns null","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":71},{"id":"flow_action_nexusreader_web_client_program_cs_findauthorbynameasync_repository_read_88_88","kind":"step","label":"Reads repository or persistence state","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":88},{"id":"flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_61","kind":"dependency","label":"ThrowingDbContextFactory","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":61},{"id":"flow_type_nexusreader_web_client_program_cs_throwingembeddinggenerator_66","kind":"dependency","label":"ThrowingEmbeddingGenerator","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":66},{"id":"flow_type_nexusreader_web_client_program_cs_throwingbookstorageservice_74","kind":"dependency","label":"ThrowingBookStorageService","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":74},{"id":"flow_type_nexusreader_web_client_program_cs_throwingebookrepository_84","kind":"dependency","label":"ThrowingEbookRepository","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":84},{"id":"flow_type_nexusreader_web_client_program_cs_throwingsyncbroadcaster_94","kind":"dependency","label":"ThrowingSyncBroadcaster","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":94},{"id":"flow_type_nexusreader_web_client_program_cs_webplatformservice_18","kind":"dependency","label":"WebPlatformService","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":18},{"id":"flow_type_nexusreader_web_client_program_cs_nexusauthenticationstateprovider_33","kind":"dependency","label":"NexusAuthenticationStateProvider","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":33},{"id":"flow_type_nexusreader_web_client_program_cs_wasmknowledgeservice_38","kind":"dependency","label":"WasmKnowledgeService","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":38},{"id":"flow_type_nexusreader_web_client_program_cs_configured_httpclient_40","kind":"dependency","label":"configured HttpClient","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":40},{"id":"flow_type_nexusreader_web_client_program_cs_throwingdbcontextfactory_49","kind":"dependency","label":"ThrowingDbContextFactory","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":49},{"id":"flow_type_nexusreader_web_client_program_cs_n_a_55","kind":"dependency","label":"N/A","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":55},{"id":"flow_type_nexusreader_web_client_program_cs_wasmepubreader_56","kind":"dependency","label":"WasmEpubReader","sourcePath":"NexusReader.Web.Client/Program.cs","sourceLine":56},{"id":"flow_file_nexusreader_infrastructure_configuration_aisettings_cs_file_1","kind":"dependency","label":"AiSettings","sourcePath":"NexusReader.Infrastructure/Configuration/AiSettings.cs","sourceLine":1},{"id":"flow_type_nexusreader_infrastructure_configuration_aisettings_cs_aisettings_3","kind":"dependency","label":"AiSettings","sourcePath":"NexusReader.Infrastructure/Configuration/AiSettings.cs","sourceLine":3},{"id":"flow_file_nexusreader_infrastructure_configuration_stripesettings_cs_file_1","kind":"dependency","label":"StripeSettings","sourcePath":"NexusReader.Infrastructure/Configuration/StripeSettings.cs","sourceLine":1}]}</script> <script type="application/json" data-ai-mermaid-metadata="6" data-ai-mermaid-diagram-id="method_flows_graph">{"edges":[{"id":"edge_flow_action_nexusreader_infrastructure_services_knowledgeservice_cs_getknowledgeinternalasync_guard_clause_83_83_flow_method_nexusreader_infrastructure_helpers_contenthasher_cs_computehash_9_uses_service_87","from":"flow_action_nexusreader_infrastructure_services_knowledgeservice_cs_getknowledgeinternalasync_guard_clause_83_83","to":"flow_method_nexusreader_infrastructure_helpers_contenthasher_cs_computehash_9","relation":"uses","semanticLabel":"ContentHasher.ComputeHash","payload":{"outputSummary":"normalizedText","expandedLabel":"uses-service"}},{"id":"edge_flow_action_nexusreader_infrastructure_services_knowledgeservice_cs_executeairequestandcacheasync_guard_clause_167_167_flow_method_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_repair_8_uses_service_171","from":"flow_action_nexusreader_infrastructure_services_knowledgeservice_cs_executeairequestandcacheasync_guard_clause_167_167","to":"flow_method_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_repair_8","relation":"uses","semanticLabel":"JsonRepairHelper.Repair","payload":{"outputSummary":"jsonResponse","expandedLabel":"uses-service"}},{"id":"edge_flow_action_nexusreader_infrastructure_services_knowledgeservice_cs_askquestionasync_repository_read_717_717_flow_method_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_repair_8_uses_service_749","from":"flow_action_nexusreader_infrastructure_services_knowledgeservice_cs_askquestionasync_repository_read_717_717","to":"flow_method_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_repair_8","relation":"uses","semanticLabel":"JsonRepairHelper.Repair","payload":{"outputSummary":"rawJson","expandedLabel":"uses-service"}},{"id":"edge_flow_file_nexusreader_infrastructure_helpers_contenthasher_cs_file_1_flow_method_nexusreader_infrastructure_helpers_contenthasher_cs_computehash_9_invokes_9","from":"flow_file_nexusreader_infrastructure_helpers_contenthasher_cs_file_1","to":"flow_method_nexusreader_infrastructure_helpers_contenthasher_cs_computehash_9","relation":"calls","semanticLabel":"ComputeHash","payload":{"outputSummary":"Normalizes input text, computes a SHA-256 hash of the UTF-8 bytes, and returns the lowercase hex string.","expandedLabel":"invokes"}},{"id":"edge_flow_method_nexusreader_infrastructure_helpers_contenthasher_cs_computehash_9_flow_action_nexusreader_infrastructure_helpers_contenthasher_cs_computehash_branch_11_11_evaluates_condition_11","from":"flow_method_nexusreader_infrastructure_helpers_contenthasher_cs_computehash_9","to":"flow_action_nexusreader_infrastructure_helpers_contenthasher_cs_computehash_branch_11_11","relation":"calls","semanticLabel":"true / false","payload":{"outputSummary":"if (string.IsNullOrWhiteSpace(input))","expandedLabel":"evaluates-condition"}},{"id":"edge_flow_file_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_file_1_flow_method_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_repair_8_invokes_8","from":"flow_file_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_file_1","to":"flow_method_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_repair_8","relation":"calls","semanticLabel":"Repair","payload":{"outputSummary":"Detects truncated/garbled JSON, prunes trailing garbage, and auto-closes open strings/brackets/braces to return a best-effort valid JSON string.","expandedLabel":"invokes"}},{"id":"edge_flow_method_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_repair_8_flow_action_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_repair_guard_clause_10_10_evaluates_condition_10","from":"flow_method_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_repair_8","to":"flow_action_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_repair_guard_clause_10_10","relation":"calls","semanticLabel":"exit / continue","payload":{"outputSummary":"if (string.IsNullOrWhiteSpace(json)) return json;","expandedLabel":"evaluates-condition"}},{"id":"edge_flow_action_nexusreader_web_program_cs_program_top_level_branch_237_237_flow_method_nexusreader_infrastructure_realtime_synchub_cs_synchub_14_uses_service_247","from":"flow_action_nexusreader_web_program_cs_program_top_level_branch_237_237","to":"flow_method_nexusreader_infrastructure_realtime_synchub_cs_synchub_14","relation":"uses","semanticLabel":"SyncHub","payload":{"outputSummary":"Hub mapping for realtime sync","expandedLabel":"uses-service"}},{"id":"edge_flow_file_nexusreader_infrastructure_realtime_synchub_cs_file_1_flow_method_nexusreader_infrastructure_realtime_synchub_cs_updateprogress_19_invokes_19","from":"flow_file_nexusreader_infrastructure_realtime_synchub_cs_file_1","to":"flow_method_nexusreader_infrastructure_realtime_synchub_cs_updateprogress_19","relation":"calls","semanticLabel":"UpdateProgress","payload":{"outputSummary":"Receives client progress updates, obtains the calling user id and forwards an UpdateReadingProgressCommand via MediatR when user is present.","expandedLabel":"handles-route"}},{"id":"edge_flow_method_nexusreader_infrastructure_realtime_synchub_cs_updateprogress_19_flow_action_nexusreader_infrastructure_realtime_synchub_cs_updateprogress_repository_read_21_21_invokes_21","from":"flow_method_nexusreader_infrastructure_realtime_synchub_cs_updateprogress_19","to":"flow_action_nexusreader_infrastructure_realtime_synchub_cs_updateprogress_repository_read_21_21","relation":"calls","semanticLabel":"Reads repository or persistence state","payload":{"outputSummary":"var userId = Context.User?.FindFirst(ClaimTypes.NameIdentifier)?.Value;","expandedLabel":"invokes"}},{"id":"edge_flow_file_nexusreader_infrastructure_realtime_synchub_cs_file_1_flow_method_nexusreader_infrastructure_realtime_synchub_cs_onconnectedasync_28_invokes_28","from":"flow_file_nexusreader_infrastructure_realtime_synchub_cs_file_1","to":"flow_method_nexusreader_infrastructure_realtime_synchub_cs_onconnectedasync_28","relation":"calls","semanticLabel":"OnConnectedAsync","payload":{"outputSummary":"When a client connects, adds their connection to a per-user SignalR group (User_{userId}) and calls base connection logic.","expandedLabel":"handles-route"}},{"id":"edge_flow_method_nexusreader_infrastructure_realtime_synchub_cs_onconnectedasync_28_flow_action_nexusreader_infrastructure_realtime_synchub_cs_onconnectedasync_repository_read_30_30_invokes_30","from":"flow_method_nexusreader_infrastructure_realtime_synchub_cs_onconnectedasync_28","to":"flow_action_nexusreader_infrastructure_realtime_synchub_cs_onconnectedasync_repository_read_30_30","relation":"calls","semanticLabel":"Reads repository or persistence state","payload":{"outputSummary":"var userId = Context.UserIdentifier;","expandedLabel":"invokes"}},{"id":"edge_flow_file_nexusreader_infrastructure_realtime_synchub_cs_file_1_flow_method_nexusreader_infrastructure_realtime_synchub_cs_ondisconnectedasync_38_invokes_38","from":"flow_file_nexusreader_infrastructure_realtime_synchub_cs_file_1","to":"flow_method_nexusreader_infrastructure_realtime_synchub_cs_ondisconnectedasync_38","relation":"calls","semanticLabel":"OnDisconnectedAsync","payload":{"outputSummary":"When a client disconnects, removes their connection from the per-user SignalR group and invokes base disconnect logic.","expandedLabel":"handles-route"}},{"id":"edge_flow_method_nexusreader_infrastructure_realtime_synchub_cs_ondisconnectedasync_38_flow_action_nexusreader_infrastructure_realtime_synchub_cs_ondisconnectedasync_repository_read_40_40_invokes_40","from":"flow_method_nexusreader_infrastructure_realtime_synchub_cs_ondisconnectedasync_38","to":"flow_action_nexusreader_infrastructure_realtime_synchub_cs_ondisconnectedasync_repository_read_40_40","relation":"calls","semanticLabel":"Reads repository or persistence state","payload":{"outputSummary":"var userId = Context.UserIdentifier;","expandedLabel":"invokes"}}],"nodes":[{"id":"flow_action_nexusreader_infrastructure_services_knowledgeservice_cs_getknowledgeinternalasync_guard_clause_83_83","kind":"step","label":"Guards early exit or rejection path","sourcePath":"NexusReader.Infrastructure/Services/KnowledgeService.cs","sourceLine":83},{"id":"flow_file_nexusreader_infrastructure_helpers_contenthasher_cs_file_1","kind":"service","label":"ContentHasher","sourcePath":"NexusReader.Infrastructure/Helpers/ContentHasher.cs","sourceLine":1},{"id":"flow_method_nexusreader_infrastructure_helpers_contenthasher_cs_computehash_9","kind":"method","label":"ComputeHash","sourcePath":"NexusReader.Infrastructure/Helpers/ContentHasher.cs","sourceLine":9},{"id":"flow_action_nexusreader_infrastructure_services_knowledgeservice_cs_executeairequestandcacheasync_guard_clause_167_167","kind":"step","label":"Guards early exit or rejection path","sourcePath":"NexusReader.Infrastructure/Services/KnowledgeService.cs","sourceLine":167},{"id":"flow_file_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_file_1","kind":"service","label":"JsonRepairHelper","sourcePath":"NexusReader.Infrastructure/Helpers/JsonRepairHelper.cs","sourceLine":1},{"id":"flow_method_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_repair_8","kind":"method","label":"Repair","sourcePath":"NexusReader.Infrastructure/Helpers/JsonRepairHelper.cs","sourceLine":8},{"id":"flow_action_nexusreader_infrastructure_services_knowledgeservice_cs_askquestionasync_repository_read_717_717","kind":"step","label":"Reads repository or persistence state","sourcePath":"NexusReader.Infrastructure/Services/KnowledgeService.cs","sourceLine":717},{"id":"flow_action_nexusreader_infrastructure_helpers_contenthasher_cs_computehash_branch_11_11","kind":"step","label":"Evaluates branch condition","sourcePath":"NexusReader.Infrastructure/Helpers/ContentHasher.cs","sourceLine":11},{"id":"flow_action_nexusreader_infrastructure_helpers_jsonrepairhelper_cs_repair_guard_clause_10_10","kind":"step","label":"Guards early exit or rejection path","sourcePath":"NexusReader.Infrastructure/Helpers/JsonRepairHelper.cs","sourceLine":10},{"id":"flow_action_nexusreader_web_program_cs_program_top_level_branch_237_237","kind":"step","label":"Evaluates branch condition","sourcePath":"NexusReader.Web/Program.cs","sourceLine":237},{"id":"flow_file_nexusreader_infrastructure_realtime_synchub_cs_file_1","kind":"dependency","label":"SyncHub","sourcePath":"NexusReader.Infrastructure/RealTime/SyncHub.cs","sourceLine":1},{"id":"flow_method_nexusreader_infrastructure_realtime_synchub_cs_synchub_14","kind":"method","label":"SyncHub","sourcePath":"NexusReader.Infrastructure/RealTime/SyncHub.cs","sourceLine":14},{"id":"flow_method_nexusreader_infrastructure_realtime_synchub_cs_updateprogress_19","kind":"method","label":"UpdateProgress","sourcePath":"NexusReader.Infrastructure/RealTime/SyncHub.cs","sourceLine":19},{"id":"flow_action_nexusreader_infrastructure_realtime_synchub_cs_updateprogress_repository_read_21_21","kind":"step","label":"Reads repository or persistence state","sourcePath":"NexusReader.Infrastructure/RealTime/SyncHub.cs","sourceLine":21},{"id":"flow_method_nexusreader_infrastructure_realtime_synchub_cs_onconnectedasync_28","kind":"method","label":"OnConnectedAsync","sourcePath":"NexusReader.Infrastructure/RealTime/SyncHub.cs","sourceLine":28},{"id":"flow_action_nexusreader_infrastructure_realtime_synchub_cs_onconnectedasync_repository_read_30_30","kind":"step","label":"Reads repository or persistence state","sourcePath":"NexusReader.Infrastructure/RealTime/SyncHub.cs","sourceLine":30},{"id":"flow_method_nexusreader_infrastructure_realtime_synchub_cs_ondisconnectedasync_38","kind":"method","label":"OnDisconnectedAsync","sourcePath":"NexusReader.Infrastructure/RealTime/SyncHub.cs","sourceLine":38},{"id":"flow_action_nexusreader_infrastructure_realtime_synchub_cs_ondisconnectedasync_repository_read_40_40","kind":"step","label":"Reads repository or persistence state","sourcePath":"NexusReader.Infrastructure/RealTime/SyncHub.cs","sourceLine":40}]}</script>

See Also