Skip to content

Blazor port — Phase 5: MAUI BlazorWebView host (reuse web UI in mobile/desktop) #9

@StepKie

Description

@StepKie

Phase 5 of the Blazor port. Depends on #7. Begin only after the web version is live and stable.

Goal

Stand up a MAUI app that hosts the same Razor components from FantasyFootball.Shared via BlazorWebView. Goal: one UI codebase, two hosts. Run alongside the existing MAUI XAML app until proven, then retire the XAML app.

Approach

Following the .NET 10 maui-blazor-web template structure:

  • New project src/FantasyFootball.UI.Hybrid/ — MAUI app, thin MainPage.xaml hosting <BlazorWebView> rooted at Shared.Routes.
  • DI: registers MAUI-flavored implementations of any Shared platform-abstraction interfaces (e.g., file picker, secure storage).
  • SQLite Repository continues to be the MAUI-side persistence (Blazor Shared components use whichever IRepository is registered).

Tasks

  • Create src/FantasyFootball.UI.Hybrid/FantasyFootball.UI.Hybrid.csproj from dotnet new maui-blazor template
  • Reference FantasyFootball.Shared and FantasyFootball core
  • Strip generated example pages (Counter.razor, Weather.razor) — we use Shared's routes
  • MauiProgram.cs: register MAUI-side service implementations, including SQLite Repository for IRepository
  • Verify all targets build (net10.0-android, net10.0-windows10.0.19041.0, ideally net10.0-ios)
  • Smoke test on Windows: app launches, navigation works, simulation runs, data persists via SQLite
  • Smoke test on Android emulator
  • Decision point: retire src/FantasyFootball.UI/ (XAML) — separate follow-up issue

Out of scope

Removing the existing XAML FantasyFootball.UI project (deferred to a follow-up once Hybrid is proven on all targets).

Acceptance

  • Hybrid app launches on Windows and Android.
  • All pages from the web build render identically inside BlazorWebView.
  • Persistence uses SQLite (not LocalStorage) — data shared with the existing XAML app if both run on the same device.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blazor-portBlazor WASM web + MAUI BlazorWebView hybrid portenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions