Skip to content

Add Blazor WebAssembly app and CI/CD workflow for HealthNerd#4

Open
jonfuller wants to merge 11 commits intomasterfrom
claude/web-app-wasm-excel-xqWVR
Open

Add Blazor WebAssembly app and CI/CD workflow for HealthNerd#4
jonfuller wants to merge 11 commits intomasterfrom
claude/web-app-wasm-excel-xqWVR

Conversation

@jonfuller
Copy link
Owner

This pull request introduces a new Blazor WebAssembly frontend for HealthNerd, enabling users to convert Apple Health exports to Excel directly in the browser. The implementation includes project setup, a user interface for file upload and settings, local storage for user preferences, and CI/CD automation for building and deploying the WASM app. Below are the most important changes:


Blazor WASM App Implementation:

  • Added the main Blazor WebAssembly project (HealthNerd.Wasm), including project file with necessary dependencies such as HealthKitData.Core, EPPlus, and NodaTime. (HealthNerd.Wasm.csproj)
  • Implemented the main application logic and UI in Home.razor, allowing users to upload Apple Health exports, configure export settings, and generate Excel files in-browser. (Pages/Home.razor)
  • Added WebSettings POCO and a settings mapper to convert UI settings to the format expected by the core export logic. (Models/WebSettings.cs, Services/SettingsMapper.cs) [1] [2]
  • Provided local storage support for persisting user settings across sessions. (Services/LocalStorageService.cs)
  • Set up application entry point and root component registration. (Program.cs, App.razor, _Imports.razor) [1] [2] [3]

CI/CD Automation:

  • Added a GitHub Actions workflow for CI to build and verify the WASM app on every push and PR. (.github/workflows/ci.yml)
  • Added a deployment workflow to publish the WASM output to the htmltools repository upon successful CI runs or manual trigger. (.github/workflows/deploy-wasm.yml)

claude and others added 11 commits March 2, 2026 02:23
Adds a new static-site Blazor WASM project that replaces the CLI
workflow with an in-browser experience:

- Upload Apple Health export.zip (and optional custom sheets .xlsx)
- All CLI/iOS settings exposed as form inputs (units, summaries,
  since-date, omit-empty flags, custom-sheet placement)
- Settings auto-saved to localStorage; restored on next visit
- Generates Excel report entirely in WASM, triggers browser download
- No server component; deployable to GitHub Pages, Netlify, etc.

Key files:
  HealthNerd.Wasm.csproj       – net8.0 BlazorWebAssembly, EPPlus 6+
  Program.cs                   – registers Encoding provider + EPPlus license
  Pages/Home.razor             – single-page UI + processing pipeline
  Models/WebSettings.cs        – settings POCO (localStorage key)
  Services/LocalStorageService – JS-interop read/write for localStorage
  Services/SettingsMapper      – WebSettings → HealthKitData.Core Settings
  wwwroot/js/app.js            – downloadFile + getBrowserTimeZone helpers

Note: Record.Start type in HealthKitData.Core should be verified at
first build; adjust date-filter comparison in Home.razor if needed.

https://claude.ai/code/session_01GwHuC47PH81Zw3EUfgkrYN
Automatically publishes HealthNerd.Wasm to jonfuller/htmltools at
/healthnerd/ on every push to master that touches the WASM project.

Setup required before merge:
  1. Create a GitHub PAT with repo scope on jonfuller/htmltools
  2. Add it as secret HTMLTOOLS_DEPLOY_TOKEN on jonfuller/HealthNerd
  3. Merge this PR — first deploy runs automatically

Also:
  - Sets <base href="/healthnerd/" /> in index.html for correct subpath
  - Adds .nojekyll so GitHub Pages serves _framework/ files correctly

Trigger manually via Actions → "Deploy HealthNerd WASM" → Run workflow

https://claude.ai/code/session_01GwHuC47PH81Zw3EUfgkrYN
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
CI (.github/workflows/ci.yml):
- Runs on every push / PR against master
- restore → build -c Release → publish → verify output exists

Deploy (.github/workflows/deploy-wasm.yml):
- Now triggers via workflow_run on CI success (master only)
- workflow_dispatch still available for manual runs
- Checks out the exact sha that passed CI before publishing

Bug fix (Home.razor):
- Record.StartDate (not Record.Start) — confirmed against
  HealthKitData.Core.dll string metadata
- Workout.Start unchanged (correct property name)

https://claude.ai/code/session_01GwHuC47PH81Zw3EUfgkrYN
- Record.StartDate is Instant (not LocalDate): compare against sinceInstant
- Workout has DateRange.Start (LocalDate), not .Start directly
- CustomSheetsPlacement.BeforeSummary does not exist in HealthKitData.Core 0.4.0;
  always use AfterSummary and remove the option from the UI

https://claude.ai/code/session_01GwHuC47PH81Zw3EUfgkrYN
- Install wasm-tools workload (required for .NET 8 Blazor WASM)
- Add -v normal to build for better error diagnostics

https://claude.ai/code/session_01GwHuC47PH81Zw3EUfgkrYN
… (Instant)

Both Record.StartDate and Workout.StartDate are NodaTime.Instant — confirmed
from HealthKitData source. Previous fix incorrectly used w.DateRange.Start
(DateRange property doesn't exist on Workout).

https://claude.ai/code/session_01GwHuC47PH81Zw3EUfgkrYN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants