## Top Business Flows Highest-value business flows that should be published as first-class system entry points. This publication highlights the highest-value business flows selected from the ranked candidate set. Selected: 5. Rejected or deferred: 2. ### Selected Flows #### Ebook Ingest Flow - Rank: 1 - Score: 0.85 - Confidence: high - Reason: Selected because Ebook Ingest Flow ranked #1 with score 0.85 above the selection threshold 0.60. - Domains: account, ai tokens, ai tokens (aitokensused, aitokenlimit), aitokens / aitokenlimit, appdbcontext, auth, authentication, author, authorization requirement, command, ebook, ebook/library ingestion, embedding, externallogin (google), identity, jwt, knowledge/knowledgeservice, knowledgegraph, login, loginmodel / credentials, pro subscription, query, reader navigation / interaction, real time sync/broadcast, registration, result (operation outcome), result, secure storage, subscription/plan, subscriptionplan, sync, theme, token refresh, user, user / identity, user identity and profiles, userprofile - Entrypoints: NexusReader.Web/Program.cs, NexusReader.Application, NexusReader.Web.Client/Program.cs - Flow: Ebook Ingest Flow starts at NexusReader.Web/Program.cs and follows 12 grounded steps: Enter Program (top level) -> Falls back to alternate path -> Repeats work over a collection or condition -> Guards early exit or rejection path -> .... - Steps: 1. Enter Program (top level) | 2. Falls back to alternate path | 3. Repeats work over a collection or condition | 4. Guards early exit or rejection path | 5. Branches across multiple outcomes | 6. Evaluates branch condition | 7. Reads repository or persistence state | 8. Returns result | 9. Validates input or state | 10. Call Add Application | 11. Call Add Infrastructure | 12. Call Db Initializer #### Knowledge API group mappings - Rank: 2 - Score: 0.85 - Confidence: high - Reason: Selected because Knowledge API group mappings ranked #2 with score 0.85 above the selection threshold 0.60. - Domains: account, ai tokens, ai tokens (aitokensused, aitokenlimit), aitokens / aitokenlimit, appdbcontext, auth, authentication, author, authorization requirement, command, ebook, ebook/library ingestion, embedding, externallogin (google), identity, jwt, knowledge/knowledgeservice, knowledgegraph, login, loginmodel / credentials, pro subscription, query, reader navigation / interaction, real time sync/broadcast, registration, result (operation outcome), result, secure storage, subscription/plan, subscriptionplan, sync, theme, token refresh, user, user / identity, user identity and profiles, userprofile - Entrypoints: NexusReader.Web/Program.cs, NexusReader.Application, NexusReader.Web.Client/Program.cs - Flow: Knowledge API group mappings starts at NexusReader.Web/Program.cs and follows 12 grounded steps: Enter Program (top level) -> Falls back to alternate path -> Repeats work over a collection or condition -> Guards early exit or rejection path -> .... - Steps: 1. Enter Program (top level) | 2. Falls back to alternate path | 3. Repeats work over a collection or condition | 4. Guards early exit or rejection path | 5. Branches across multiple outcomes | 6. Evaluates branch condition | 7. Reads repository or persistence state | 8. Returns result | 9. Validates input or state | 10. Call Add Application | 11. Call Add Infrastructure | 12. Call Db Initializer #### Knowledge Query Flow - Rank: 3 - Score: 0.85 - Confidence: high - Reason: Selected because Knowledge Query Flow ranked #3 with score 0.85 above the selection threshold 0.60. - Domains: account, ai tokens, ai tokens (aitokensused, aitokenlimit), aitokens / aitokenlimit, appdbcontext, auth, authentication, author, authorization requirement, command, ebook, ebook/library ingestion, embedding, externallogin (google), identity, jwt, knowledge/knowledgeservice, knowledgegraph, login, loginmodel / credentials, pro subscription, query, reader navigation / interaction, real time sync/broadcast, registration, result (operation outcome), result, secure storage, subscription/plan, subscriptionplan, sync, theme, token refresh, user, user / identity, user identity and profiles, userprofile - Entrypoints: NexusReader.Web/Program.cs, NexusReader.Application, NexusReader.Web.Client/Program.cs - Flow: Knowledge Query Flow starts at NexusReader.Web/Program.cs and follows 12 grounded steps: Enter Program (top level) -> Falls back to alternate path -> Repeats work over a collection or condition -> Guards early exit or rejection path -> .... - Steps: 1. Enter Program (top level) | 2. Falls back to alternate path | 3. Repeats work over a collection or condition | 4. Guards early exit or rejection path | 5. Branches across multiple outcomes | 6. Evaluates branch condition | 7. Reads repository or persistence state | 8. Returns result | 9. Validates input or state | 10. Call Add Application | 11. Call Add Infrastructure | 12. Call Db Initializer #### Pro Authorization / AI Token Check Flow - Rank: 4 - Score: 0.85 - Confidence: high - Reason: Selected because Pro Authorization / AI Token Check Flow ranked #4 with score 0.85 above the selection threshold 0.60. - Domains: account, ai tokens, ai tokens (aitokensused, aitokenlimit), aitokens / aitokenlimit, appdbcontext, auth, authentication, author, authorization requirement, command, ebook, ebook/library ingestion, embedding, externallogin (google), identity, jwt, knowledge/knowledgeservice, knowledgegraph, login, loginmodel / credentials, pro subscription, query, reader navigation / interaction, real time sync/broadcast, registration, result (operation outcome), result, secure storage, subscription/plan, subscriptionplan, sync, theme, token refresh, user, user / identity, user identity and profiles, userprofile - Entrypoints: NexusReader.Web/Program.cs, NexusReader.Application, NexusReader.Web.Client/Program.cs - Flow: Pro Authorization / AI Token Check Flow starts at NexusReader.Web/Program.cs and follows 12 grounded steps: Enter Program (top level) -> Falls back to alternate path -> Repeats work over a collection or condition -> Guards early exit or rejection path -> .... - Steps: 1. Enter Program (top level) | 2. Falls back to alternate path | 3. Repeats work over a collection or condition | 4. Guards early exit or rejection path | 5. Branches across multiple outcomes | 6. Evaluates branch condition | 7. Reads repository or persistence state | 8. Returns result | 9. Validates input or state | 10. Call Add Application | 11. Call Add Infrastructure | 12. Call Db Initializer #### Program (top level) - Rank: 5 - Score: 0.85 - Confidence: high - Reason: Selected because Program (top level) ranked #5 with score 0.85 above the selection threshold 0.60. - Domains: account, ai tokens, ai tokens (aitokensused, aitokenlimit), aitokens / aitokenlimit, appdbcontext, auth, authentication, author, authorization requirement, command, ebook, ebook/library ingestion, embedding, externallogin (google), identity, jwt, knowledge/knowledgeservice, knowledgegraph, login, loginmodel / credentials, pro subscription, query, reader navigation / interaction, real time sync/broadcast, registration, result (operation outcome), result, secure storage, subscription/plan, subscriptionplan, sync, theme, token refresh, user, user / identity, user identity and profiles, userprofile - Entrypoints: NexusReader.Web/Program.cs, NexusReader.Application, NexusReader.Web.Client/Program.cs - Flow: Program (top level) starts at NexusReader.Web/Program.cs and follows 12 grounded steps: Enter Program (top level) -> Falls back to alternate path -> Repeats work over a collection or condition -> Guards early exit or rejection path -> .... - Steps: 1. Enter Program (top level) | 2. Falls back to alternate path | 3. Repeats work over a collection or condition | 4. Guards early exit or rejection path | 5. Branches across multiple outcomes | 6. Evaluates branch condition | 7. Reads repository or persistence state | 8. Returns result | 9. Validates input or state | 10. Call Add Application | 11. Call Add Infrastructure | 12. Call Db Initializer ### Diagrams These diagrams highlight the technical paths that anchor the highest-value business flows. #### Dependency and Model Map ```mermaid --- config: flowchart: defaultRenderer: "elk" --- flowchart TD flow_file_nexusreader_maui_mauiprogram_cs_file_1["MauiProgram"] flow_file_nexusreader_web_client_program_cs_file_1["Program.cs"] flow_type_nexusreader_maui_mauiprogram_cs_authorizationcore_35[/"AuthorizationCore"/] flow_type_nexusreader_maui_mauiprogram_cs_focusmodeservice_42[/"FocusModeService"/] flow_type_nexusreader_maui_mauiprogram_cs_httpclient_38[/"HttpClient"/] flow_type_nexusreader_maui_mauiprogram_cs_mauiplatformservice_28[/"MauiPlatformService"/] flow_type_nexusreader_maui_mauiprogram_cs_mauiprogram_10[/"MauiProgram"/] flow_type_nexusreader_maui_mauiprogram_cs_mauistorageservice_29[/"MauiStorageService"/] flow_type_nexusreader_maui_mauiprogram_cs_nexusauthenticationstateprovider_32[/"NexusAuthenticationStateProvider"/] flow_type_nexusreader_maui_mauiprogram_cs_nexusauthenticationstateprovider_resolved_33[/"NexusAuthenticationStateProvider (resolved)"/] flow_type_nexusreader_maui_mauiprogram_cs_quizstateservice_43[/"QuizStateService"/] flow_type_nexusreader_maui_mauiprogram_cs_readernavigationservice_44[/"ReaderNavigationService"/] flow_type_nexusreader_maui_mauiprogram_cs_themeservice_41[/"ThemeService"/] 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_webplatformservice_18[/"WebPlatformService"/] flow_type_nexusreader_web_client_program_cs_webstorageservice_19[/"WebStorageService"/] flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|Authorization| flow_type_nexusreader_maui_mauiprogram_cs_authorizationcore_35 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|IFocusModeService| flow_type_nexusreader_maui_mauiprogram_cs_focusmodeservice_42 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|HttpClient| flow_type_nexusreader_maui_mauiprogram_cs_httpclient_38 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|IPlatformService| flow_type_nexusreader_maui_mauiprogram_cs_mauiplatformservice_28 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|model MauiProgram| flow_type_nexusreader_maui_mauiprogram_cs_mauiprogram_10 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|INativeStorageService| flow_type_nexusreader_maui_mauiprogram_cs_mauistorageservice_29 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|NexusAuthenticationStateProvider| flow_type_nexusreader_maui_mauiprogram_cs_nexusauthenticationstateprovider_32 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|AuthenticationStateProvider| flow_type_nexusreader_maui_mauiprogram_cs_nexusauthenticationstateprovider_resolved_33 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|IQuizStateService| flow_type_nexusreader_maui_mauiprogram_cs_quizstateservice_43 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|IReaderNavigationService| flow_type_nexusreader_maui_mauiprogram_cs_readernavigationservice_44 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|IThemeService| flow_type_nexusreader_maui_mauiprogram_cs_themeservice_41 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 flow_file_nexusreader_web_client_program_cs_file_1 -->|IPlatformService| flow_type_nexusreader_web_client_program_cs_webplatformservice_18 flow_file_nexusreader_web_client_program_cs_file_1 -->|INativeStorageService| flow_type_nexusreader_web_client_program_cs_webstorageservice_19 click flow_file_nexusreader_maui_mauiprogram_cs_file_1 href "vscode://file/NexusReader.Maui/MauiProgram.cs:1:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_mauiprogram_10 href "vscode://file/NexusReader.Maui/MauiProgram.cs:10:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_mauiplatformservice_28 href "vscode://file/NexusReader.Maui/MauiProgram.cs:28:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_mauistorageservice_29 href "vscode://file/NexusReader.Maui/MauiProgram.cs:29:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_nexusauthenticationstateprovider_32 href "vscode://file/NexusReader.Maui/MauiProgram.cs:32:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_nexusauthenticationstateprovider_resolved_33 href "vscode://file/NexusReader.Maui/MauiProgram.cs:33:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_authorizationcore_35 href "vscode://file/NexusReader.Maui/MauiProgram.cs:35:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_httpclient_38 href "vscode://file/NexusReader.Maui/MauiProgram.cs:38:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_themeservice_41 href "vscode://file/NexusReader.Maui/MauiProgram.cs:41:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_focusmodeservice_42 href "vscode://file/NexusReader.Maui/MauiProgram.cs:42:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_quizstateservice_43 href "vscode://file/NexusReader.Maui/MauiProgram.cs:43:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_readernavigationservice_44 href "vscode://file/NexusReader.Maui/MauiProgram.cs:44: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" 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_webstorageservice_19 href "vscode://file/NexusReader.Web.Client/Program.cs:19:1" "Open source" ``` This dependency-map view is included as a grounded technical anchor for the published business interpretation. #### Startup and Service Registration Flow ```mermaid --- config: flowchart: defaultRenderer: "elk" --- flowchart TD subgraph flow_2_nexusreader_maui_mauiprogram_cs["MauiProgram"] end subgraph flow_1_nexusreader_web_client_program_cs["Program.cs"] end subgraph Node_xref_top_business_flows_md_knowledge_query_flow["Knowledge Query Flow"] end subgraph Node_xref_top_business_flows_md_ebook_ingest_flow["Ebook Ingest Flow"] end subgraph Node_xref_top_business_flows_md_user_authentication_sign_in_flow["User Authentication / Sign-in Flow"] end flow_file_nexusreader_maui_mauiprogram_cs_file_1["MauiProgram"] flow_file_nexusreader_web_client_program_cs_file_1["Program.cs"] flow_method_nexusreader_maui_mauiprogram_cs_createmauiapp_12["CreateMauiApp"] flow_type_nexusreader_maui_mauiprogram_cs_authorizationcore_35[/"AuthorizationCore"/] flow_type_nexusreader_maui_mauiprogram_cs_focusmodeservice_42[/"FocusModeService"/] flow_type_nexusreader_maui_mauiprogram_cs_httpclient_38[/"HttpClient"/] flow_type_nexusreader_maui_mauiprogram_cs_mauiplatformservice_28[/"MauiPlatformService"/] flow_type_nexusreader_maui_mauiprogram_cs_mauistorageservice_29[/"MauiStorageService"/] flow_type_nexusreader_maui_mauiprogram_cs_nexusauthenticationstateprovider_32[/"NexusAuthenticationStateProvider"/] flow_type_nexusreader_maui_mauiprogram_cs_nexusauthenticationstateprovider_resolved_33[/"NexusAuthenticationStateProvider (resolved)"/] flow_type_nexusreader_maui_mauiprogram_cs_quizstateservice_43[/"QuizStateService"/] flow_type_nexusreader_maui_mauiprogram_cs_readernavigationservice_44[/"ReaderNavigationService"/] flow_type_nexusreader_maui_mauiprogram_cs_themeservice_41[/"ThemeService"/] flow_type_nexusreader_web_client_program_cs_identityservice_32[/"IdentityService"/] flow_type_nexusreader_web_client_program_cs_nexusreader_web_client_handlers_authenticationheaderhandler_40[/"NexusReader.Web.Client.Handlers.AuthenticationHeaderHandler"/] flow_type_nexusreader_web_client_program_cs_webplatformservice_18[/"WebPlatformService"/] flow_type_nexusreader_web_client_program_cs_webstorageservice_19[/"WebStorageService"/] flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|unknown| flow_method_nexusreader_maui_mauiprogram_cs_createmauiapp_12 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|Authorization| flow_type_nexusreader_maui_mauiprogram_cs_authorizationcore_35 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|IFocusModeService| flow_type_nexusreader_maui_mauiprogram_cs_focusmodeservice_42 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|HttpClient| flow_type_nexusreader_maui_mauiprogram_cs_httpclient_38 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|IPlatformService| flow_type_nexusreader_maui_mauiprogram_cs_mauiplatformservice_28 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|INativeStorageService| flow_type_nexusreader_maui_mauiprogram_cs_mauistorageservice_29 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|NexusAuthenticationStateProvider| flow_type_nexusreader_maui_mauiprogram_cs_nexusauthenticationstateprovider_32 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|AuthenticationStateProvider| flow_type_nexusreader_maui_mauiprogram_cs_nexusauthenticationstateprovider_resolved_33 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|IQuizStateService| flow_type_nexusreader_maui_mauiprogram_cs_quizstateservice_43 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|IReaderNavigationService| flow_type_nexusreader_maui_mauiprogram_cs_readernavigationservice_44 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|IThemeService| flow_type_nexusreader_maui_mauiprogram_cs_themeservice_41 flow_file_nexusreader_web_client_program_cs_file_1 -->|IIdentityService| flow_type_nexusreader_web_client_program_cs_identityservice_32 flow_file_nexusreader_web_client_program_cs_file_1 -->|NexusReader.Web.Client.Handlers.AuthenticationHeaderHandler| flow_type_nexusreader_web_client_program_cs_nexusreader_web_client_handlers_authenticationheaderhandler_40 flow_file_nexusreader_web_client_program_cs_file_1 -->|IPlatformService| flow_type_nexusreader_web_client_program_cs_webplatformservice_18 flow_file_nexusreader_web_client_program_cs_file_1 -->|INativeStorageService| flow_type_nexusreader_web_client_program_cs_webstorageservice_19 click flow_file_nexusreader_maui_mauiprogram_cs_file_1 href "vscode://file/NexusReader.Maui/MauiProgram.cs:1:1" "Open source" click flow_method_nexusreader_maui_mauiprogram_cs_createmauiapp_12 href "vscode://file/NexusReader.Maui/MauiProgram.cs:12:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_mauiplatformservice_28 href "vscode://file/NexusReader.Maui/MauiProgram.cs:28:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_mauistorageservice_29 href "vscode://file/NexusReader.Maui/MauiProgram.cs:29:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_nexusauthenticationstateprovider_32 href "vscode://file/NexusReader.Maui/MauiProgram.cs:32:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_nexusauthenticationstateprovider_resolved_33 href "vscode://file/NexusReader.Maui/MauiProgram.cs:33:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_authorizationcore_35 href "vscode://file/NexusReader.Maui/MauiProgram.cs:35:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_httpclient_38 href "vscode://file/NexusReader.Maui/MauiProgram.cs:38:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_themeservice_41 href "vscode://file/NexusReader.Maui/MauiProgram.cs:41:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_focusmodeservice_42 href "vscode://file/NexusReader.Maui/MauiProgram.cs:42:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_quizstateservice_43 href "vscode://file/NexusReader.Maui/MauiProgram.cs:43:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_readernavigationservice_44 href "vscode://file/NexusReader.Maui/MauiProgram.cs:44: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_webplatformservice_18 href "vscode://file/NexusReader.Web.Client/Program.cs:18:1" "Open source" click flow_type_nexusreader_web_client_program_cs_webstorageservice_19 href "vscode://file/NexusReader.Web.Client/Program.cs:19:1" "Open source" click flow_type_nexusreader_web_client_program_cs_identityservice_32 href "vscode://file/NexusReader.Web.Client/Program.cs:32:1" "Open source" click flow_type_nexusreader_web_client_program_cs_nexusreader_web_client_handlers_authenticationheaderhandler_40 href "vscode://file/NexusReader.Web.Client/Program.cs:40:1" "Open source" ``` This primary-runtime view is included as a grounded technical anchor for the published business interpretation. #### MauiProgram Flow ```mermaid --- config: flowchart: defaultRenderer: "elk" --- flowchart TD subgraph flow_2_nexusreader_maui_mauiprogram_cs["MauiProgram"] end subgraph flow_0_nexusreader_web_program_cs["Program.cs"] end subgraph Node_xref_top_business_flows_md_knowledge_query_flow["Knowledge Query Flow"] end subgraph Node_xref_top_business_flows_md_ebook_ingest_flow["Ebook Ingest Flow"] end subgraph Node_xref_top_business_flows_md_user_authentication_sign_in_flow["User Authentication / Sign-in Flow"] end flow_file_nexusreader_maui_mauiprogram_cs_file_1["MauiProgram"] flow_file_nexusreader_web_program_cs_file_1["Program.cs"] flow_method_nexusreader_maui_mauiprogram_cs_createmauiapp_12["CreateMauiApp"] flow_method_nexusreader_web_program_cs_program_top_level_29["Program (top-level)"] flow_action_nexusreader_maui_mauiprogram_cs_createmauiapp_catch_59_59["Handles exception path"] flow_action_nexusreader_maui_mauiprogram_cs_createmauiapp_throw_63_63["Throws exception"] flow_action_nexusreader_maui_mauiprogram_cs_createmauiapp_try_14_14["Begins protected execution"] flow_action_nexusreader_web_program_cs_program_top_level_branch_62_62{"Evaluates branch condition"} flow_action_nexusreader_web_program_cs_program_top_level_fallback_66_66{"Falls back to alternate path"} flow_action_nexusreader_web_program_cs_program_top_level_repository_read_125_125["Reads repository or persistence state"] flow_action_nexusreader_web_program_cs_program_top_level_repository_read_126_126["Reads repository or persistence state"] flow_action_nexusreader_web_program_cs_program_top_level_repository_read_127_127["Reads repository or persistence state"] flow_type_nexusreader_maui_mauiprogram_cs_authorizationcore_35[/"AuthorizationCore"/] flow_type_nexusreader_maui_mauiprogram_cs_focusmodeservice_42[/"FocusModeService"/] flow_type_nexusreader_maui_mauiprogram_cs_httpclient_38[/"HttpClient"/] flow_type_nexusreader_maui_mauiprogram_cs_mauiplatformservice_28[/"MauiPlatformService"/] flow_type_nexusreader_maui_mauiprogram_cs_mauiprogram_10[/"MauiProgram"/] flow_type_nexusreader_maui_mauiprogram_cs_mauistorageservice_29[/"MauiStorageService"/] flow_type_nexusreader_maui_mauiprogram_cs_nexusauthenticationstateprovider_32[/"NexusAuthenticationStateProvider"/] flow_type_nexusreader_maui_mauiprogram_cs_nexusauthenticationstateprovider_resolved_33[/"NexusAuthenticationStateProvider (resolved)"/] flow_type_nexusreader_maui_mauiprogram_cs_quizstateservice_43[/"QuizStateService"/] flow_type_nexusreader_maui_mauiprogram_cs_readernavigationservice_44[/"ReaderNavigationService"/] flow_type_nexusreader_maui_mauiprogram_cs_themeservice_41[/"ThemeService"/] flow_action_nexusreader_maui_mauiprogram_cs_createmauiapp_return_57_57(["Build and return app"]) flow_action_nexusreader_maui_mauiprogram_cs_createmauiapp_catch_59_59 -->|Throws exception| flow_action_nexusreader_maui_mauiprogram_cs_createmauiapp_throw_63_63 flow_action_nexusreader_maui_mauiprogram_cs_createmauiapp_return_57_57 -->|handled exception| flow_action_nexusreader_maui_mauiprogram_cs_createmauiapp_catch_59_59 flow_action_nexusreader_maui_mauiprogram_cs_createmauiapp_return_57_57 -->|Returns result| flow_action_nexusreader_maui_mauiprogram_cs_createmauiapp_return_57_57 flow_action_nexusreader_maui_mauiprogram_cs_createmauiapp_try_14_14 -->|Build and return app| flow_action_nexusreader_maui_mauiprogram_cs_createmauiapp_return_57_57 flow_action_nexusreader_web_program_cs_program_top_level_branch_62_62 -->|fallback| flow_action_nexusreader_web_program_cs_program_top_level_fallback_66_66 flow_action_nexusreader_web_program_cs_program_top_level_fallback_66_66 -->|Reads repository or persistence state| flow_action_nexusreader_web_program_cs_program_top_level_repository_read_125_125 flow_action_nexusreader_web_program_cs_program_top_level_repository_read_125_125 -->|Reads repository or persistence state| flow_action_nexusreader_web_program_cs_program_top_level_repository_read_126_126 flow_action_nexusreader_web_program_cs_program_top_level_repository_read_126_126 -->|Reads repository or persistence state| flow_action_nexusreader_web_program_cs_program_top_level_repository_read_127_127 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|unknown| flow_method_nexusreader_maui_mauiprogram_cs_createmauiapp_12 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|CreateMauiApp| flow_method_nexusreader_maui_mauiprogram_cs_createmauiapp_12 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|Authorization| flow_type_nexusreader_maui_mauiprogram_cs_authorizationcore_35 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|IFocusModeService| flow_type_nexusreader_maui_mauiprogram_cs_focusmodeservice_42 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|HttpClient| flow_type_nexusreader_maui_mauiprogram_cs_httpclient_38 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|IPlatformService| flow_type_nexusreader_maui_mauiprogram_cs_mauiplatformservice_28 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|model MauiProgram| flow_type_nexusreader_maui_mauiprogram_cs_mauiprogram_10 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|INativeStorageService| flow_type_nexusreader_maui_mauiprogram_cs_mauistorageservice_29 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|NexusAuthenticationStateProvider| flow_type_nexusreader_maui_mauiprogram_cs_nexusauthenticationstateprovider_32 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|AuthenticationStateProvider| flow_type_nexusreader_maui_mauiprogram_cs_nexusauthenticationstateprovider_resolved_33 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|IQuizStateService| flow_type_nexusreader_maui_mauiprogram_cs_quizstateservice_43 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|IReaderNavigationService| flow_type_nexusreader_maui_mauiprogram_cs_readernavigationservice_44 flow_file_nexusreader_maui_mauiprogram_cs_file_1 -->|IThemeService| flow_type_nexusreader_maui_mauiprogram_cs_themeservice_41 flow_file_nexusreader_web_program_cs_file_1 -->|Program top-level| flow_method_nexusreader_web_program_cs_program_top_level_29 flow_method_nexusreader_maui_mauiprogram_cs_createmauiapp_12 -->|Begins protected execution| flow_action_nexusreader_maui_mauiprogram_cs_createmauiapp_try_14_14 flow_method_nexusreader_web_program_cs_program_top_level_29 -->|true / false| flow_action_nexusreader_web_program_cs_program_top_level_branch_62_62 click flow_file_nexusreader_maui_mauiprogram_cs_file_1 href "vscode://file/NexusReader.Maui/MauiProgram.cs:1:1" "Open source" click flow_method_nexusreader_maui_mauiprogram_cs_createmauiapp_12 href "vscode://file/NexusReader.Maui/MauiProgram.cs:12:1" "Open source" click flow_action_nexusreader_maui_mauiprogram_cs_createmauiapp_try_14_14 href "vscode://file/NexusReader.Maui/MauiProgram.cs:14:1" "Open source" click flow_action_nexusreader_maui_mauiprogram_cs_createmauiapp_return_57_57 href "vscode://file/NexusReader.Maui/MauiProgram.cs:57:1" "Open source" click flow_action_nexusreader_maui_mauiprogram_cs_createmauiapp_catch_59_59 href "vscode://file/NexusReader.Maui/MauiProgram.cs:59:1" "Open source" click flow_action_nexusreader_maui_mauiprogram_cs_createmauiapp_throw_63_63 href "vscode://file/NexusReader.Maui/MauiProgram.cs:63:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_mauiprogram_10 href "vscode://file/NexusReader.Maui/MauiProgram.cs:10:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_mauiplatformservice_28 href "vscode://file/NexusReader.Maui/MauiProgram.cs:28:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_mauistorageservice_29 href "vscode://file/NexusReader.Maui/MauiProgram.cs:29:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_nexusauthenticationstateprovider_32 href "vscode://file/NexusReader.Maui/MauiProgram.cs:32:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_nexusauthenticationstateprovider_resolved_33 href "vscode://file/NexusReader.Maui/MauiProgram.cs:33:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_authorizationcore_35 href "vscode://file/NexusReader.Maui/MauiProgram.cs:35:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_httpclient_38 href "vscode://file/NexusReader.Maui/MauiProgram.cs:38:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_themeservice_41 href "vscode://file/NexusReader.Maui/MauiProgram.cs:41:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_focusmodeservice_42 href "vscode://file/NexusReader.Maui/MauiProgram.cs:42:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_quizstateservice_43 href "vscode://file/NexusReader.Maui/MauiProgram.cs:43:1" "Open source" click flow_type_nexusreader_maui_mauiprogram_cs_readernavigationservice_44 href "vscode://file/NexusReader.Maui/MauiProgram.cs:44: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_method_nexusreader_web_program_cs_program_top_level_29 href "vscode://file/NexusReader.Web/Program.cs:29:1" "Open source" click flow_action_nexusreader_web_program_cs_program_top_level_branch_62_62 href "vscode://file/NexusReader.Web/Program.cs:62:1" "Open source" click flow_action_nexusreader_web_program_cs_program_top_level_fallback_66_66 href "vscode://file/NexusReader.Web/Program.cs:66:1" "Open source" click flow_action_nexusreader_web_program_cs_program_top_level_repository_read_125_125 href "vscode://file/NexusReader.Web/Program.cs:125:1" "Open source" click flow_action_nexusreader_web_program_cs_program_top_level_repository_read_126_126 href "vscode://file/NexusReader.Web/Program.cs:126:1" "Open source" click flow_action_nexusreader_web_program_cs_program_top_level_repository_read_127_127 href "vscode://file/NexusReader.Web/Program.cs:127:1" "Open source" ``` This primary-runtime view is included as a grounded technical anchor for the published business interpretation. ### Additional Ranked Candidates - **User Authentication / Sign-in Flow** (rank 6, score 0.85, rejected): Rejected because User Authentication / Sign-in Flow ranked #6, outside the top 5 publication slots. ### Key Files - NexusReader.Maui/MauiProgram.cs - NexusReader.Web.Client/Program.cs - NexusReader.Web/Program.cs - NexusReader.Application/DTOs/User/AuthorDto.cs - NexusReader.Application/Security/Authorization/ProUserHandler.cs - NexusReader.Application/Security/Authorization/ProUserRequirement.cs - NexusReader.Domain/Entities/Author.cs - NexusReader.UI.Shared/Layout/AuthLayout.razor --- ## See Also - [Business Overview](business-overview.md) - [Project Overview and High-level Architecture](../collections/overview.md) - [Application Layer: Commands, Queries, DTOs and Handlers](../domains/application-cqs-and-handlers.md) - [Web Client (WASM) and Shared UI Components](../domains/web-client-and-shared-ui.md) - [Mobile (MAUI) Application Integration](../runtime/mobile-maui.md) - [Authentication, Authorization and Account Flows](../flows/authentication-and-account.md) - [Infrastructure Services (AI, Epub, Storage, Billing)](../infrastructure/infrastructure-services.md) - [Real-time Synchronization and Sync Pipeline](../runtime/realtime-and-sync.md) - [AI Features, Knowledge Graph and UX Integration](../integrations/ai-and-knowledge-ux.md)