Skip to content

tgrytnes/MyLab-frontend

Repository files navigation

MyLab Frontend

Flutter app for the MyLab patient-results demo. This repo is optimized for a fast management demo: strong first-run polish, simple navigation, and Android-friendly CI/CD.

Current Demo Flow

  • Login screen with username/password profile auth
  • QR/deep-link claim flow using mylab://claim?code=... plus birth-date verification
  • After QR verification, users can sign in and attach the result, or create a profile and attach it
  • Results dashboard with status cards and New badges
  • Result detail view with range visualization, explanation, and suggested action
  • Android artifact builds through GitHub Actions

Quick Start

flutter pub get
flutter run

To test the QR access flow on an iPhone simulator after the app is running:

xcrun simctl openurl booted "mylab://claim?code=<claim-code>"

The claim code is shown in the backend admin console for the selected result, along with the generated QR image.

CI/CD

  • ci.yml runs format checks, static analysis, and widget tests
  • android-release.yml builds a release APK on tags and manual dispatch, then uploads the artifact
  • ios-testflight.yml builds and uploads an iOS IPA to TestFlight on iOS release tags (ios-v*) or manual dispatch

iOS TestFlight Workflow Setup (GitHub Secrets)

Configure these repository secrets before enabling ios-testflight.yml:

  • IOS_DIST_CERT_BASE64: Base64 of your Apple Distribution .p12 certificate
  • IOS_DIST_CERT_PASSWORD: Password for that .p12
  • IOS_PROVISIONING_PROFILE_BASE64: Base64 of the App Store provisioning profile (.mobileprovision)
  • APPSTORE_API_KEY_ID: App Store Connect API key ID
  • APPSTORE_API_ISSUER_ID: App Store Connect issuer ID
  • APPSTORE_API_PRIVATE_KEY: Full .p8 private key content (including BEGIN/END lines)

Helpful commands to create Base64 secrets locally:

base64 -i dist-cert.p12 | pbcopy
base64 -i MyLab_AppStore.mobileprovision | pbcopy

Automated setup (recommended):

chmod +x scripts/setup_testflight_secrets.sh
scripts/setup_testflight_secrets.sh

The script prompts for certificate/profile/API key paths and writes all required GitHub secrets in one run.

Trigger TestFlight release by tag:

git tag ios-v1.0.3
git push origin ios-v1.0.3

Notes

  • The app is configured for the live backend server by default.
  • QR claim verification requires birth date before a result can be attached to a profile.
  • iOS registers an APNs device token after login and sends it to backend /devices/register.
  • True screen-off push alerts require APNs backend credentials and iOS Push capability in signing/profile.
  • Custom alert tone is configured as duolongi.caf in backend payload. Add that file to the iOS app bundle to use a non-default sound.
  • If login fails with Email not verified yet..., the login screen now offers Resend verification email directly.

About

Flutter frontend for the MyLab weekend demo

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors