Add Blazor WebAssembly app and CI/CD workflow for HealthNerd#4
Open
Add Blazor WebAssembly app and CI/CD workflow for HealthNerd#4
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
HealthNerd.Wasm), including project file with necessary dependencies such as HealthKitData.Core, EPPlus, and NodaTime. (HealthNerd.Wasm.csproj)Home.razor, allowing users to upload Apple Health exports, configure export settings, and generate Excel files in-browser. (Pages/Home.razor)WebSettingsPOCO 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]Services/LocalStorageService.cs)Program.cs,App.razor,_Imports.razor) [1] [2] [3]CI/CD Automation:
.github/workflows/ci.yml)htmltoolsrepository upon successful CI runs or manual trigger. (.github/workflows/deploy-wasm.yml)