Skip to content

Native store clients — architecture & commerce design

Version: 1.0
Last Updated: 2026-08-06 13:33:14
Status: Approved commercial posture (product owner direction 2026-08-06); engineering Deferred until roadmap trigger
Canonical REQs: 02-REQUIREMENTS.md §7.36 REQ-NATIVE-01…12
Architecture: 01-ARCHITECTURE.md — Native app strategy
Roadmap: 04-ROADMAP.md §13
Regulatory: 26-REGULATORY §2 App Store / Play


LynCareOS is a multi-tenant family support care SaaS delivered today as a React PWA at app.lyncareos.com, with Stripe Checkout / Customer Portal as the commerce path. Product wants Google Play first, then Apple App Store, plus a Windows client option — without rewriting the SPA, without paying store commissions on the primary subscription, and without failing store payments policy review.

Gaps in prior docs (before this design):

  • REQ-NATIVE covered Capacitor/push/HealthKit but not the commercial / payments-policy posture.
  • Roadmap listed Capacitor as Deferred with no phased Play → Apple → optional store billing sequence.
  • Auth (HttpOnly cookies vs Capacitor origin) and “free download without subscription” onboarding were underspecified.

GoalSuccess
Store presenceFree LynCareOS clients on Google Play (first) and Apple App Store (second); Windows installer from website
Commerce SoTAll subscribe / upgrade / Care Profile purchase / billing portal stay on website + Stripe; tenant module flags unlock for the whole care circle
Play complianceAndroid binary is consumption-only — no Stripe Checkout / payment portal deep links from the store build
No rewriteCapacitor wraps existing React/Vite SPA; FastAPI API unchanged
OnboardingFree store download always installs; free account or login works; paid modules gated by existing entitlements
Preserve pathOptional later Play Billing / StoreKit dual-rail only with explicit product-owner sign-off
  • React Native rewrite (REQ-NATIVE-07 gate only).
  • Implementing Capacitor in this change set (docs alignment only).
  • GetQwikShop / shopping-standalone store billing (separate product; may use StoreKit/Play Billing — not this posture).
  • HealthKit / Health Connect (post native shell; REQ-NATIVE-05).

Section titled “A — Consumption-only store clients + website Stripe (recommended)”

Free store listings; app = login + use; buy on lyncareos.com.

Pros: Highest Play approval odds; 0% Google/Apple cut on web subscriptions; reuses existing entitlement model; Apple phase 1 can mirror.
Cons: In-app upgrade conversion lower; upgrade copy must avoid payment deep links in store builds.

B — Play Billing / StoreKit for tiers (dual entitlement)

Section titled “B — Play Billing / StoreKit for tiers (dual entitlement)”

In-app buy via store rails; sync SKUs to tenant modules; keep Stripe for web.

Pros: In-app conversion.
Cons: ~15% Play effective fee on subscriptions (service + billing fee where published); dual entitlement complexity; not needed for first launch.

Section titled “C — Billing Choice / external link programs (Stripe in-app with Google fee)”

Enroll in Google programs; user chooses Play or Stripe; report transactions.

Pros: Keep Stripe UX in some flows.
Cons: Still pay Google service fees; API/UX complexity; overkill for v1.

Decision: A for Play v1 and Apple v1. B/C only if measured conversion loss justifies them (REQ-NATIVE-12).


Clients - consume entitlements

PostgreSQL

Website commerce - SoT

lyncareos.com / app web

Stripe Checkout + Portal

Stripe webhooks

Tenant tier + module entitlements

PWA / browser

Android Capacitor - Play free

iOS Capacitor - App Store free

Windows installer - website

SurfaceMay initiate payment?Entitlement source
Marketing + app in browserYes — StripeWebhooks → DB
Android / iOS store binaryNo — consumption-onlyRead API / module gates
Windows installerPrefer website for pay; no Play/Apple feeSame DB
Email / listing / help centreYes — may link to website checkoutSame

Tenant rule (unchanged): Administrator purchases on the website → flags/modules on the tenant → all members with appropriate roles see unlocked modules. No per-device licence.


ClientDistributionBinary priceBilling UI
Web / PWAapp.lyncareos.comN/AFull Stripe
AndroidGoogle Play (free)FreeHidden / informational only
iOSApple App Store (free)FreeHidden / informational only
WindowsDirect download from website (MS Store optional later)Free downloadWebsite

Post-purchase “Get the apps” page (website): after signup or subscribe, offer Windows installer, Play Store link, App Store link, and “Continue in browser.” iOS cannot be a public .ipa hosted on the site — App Store link only.


Detect Capacitor / store build (Capacitor.isNativePlatform() or build flag).

AllowedForbidden in store binary
Login, register free account, use entitled modulesStripe Checkout Session open / redirect
Read-only plan status (“You’re on Complete”)Customer Portal link that accepts payment
Informational copy without checkout URL: e.g. “Go to lyncareos.com to upgrade” (Play FAQ pattern)“Upgrade now” → payment URL / WebView checkout
ModuleGate locked empty statesCare Profile “Buy once” in-app
Privacy policy / help (non-payment)Any CTA that leads to an alternate payment method

Free download without subscription: app installs and opens → sign in or create free account → free/starter surface + locked paid modules → website upgrade path (informational). Never require prior purchase to install.

Reviewer access: Play/App Store demo credentials with a seeded tenant.


Capacitor wraps Vite dist/ → Android .aab / iOS .ipa (REQ-NATIVE-02). Backend unchanged. Preserve REQ-NATIVE-06 rules ongoing.

Refresh tokens are HttpOnly cookies scoped to the web origin. Capacitor bundled origins (capacitor:// / https://localhost) do not share those cookies.

Target approaches (choose at implementation plan):

  1. Preferred for v1 simplicity: Capacitor server.url / live-load against https://app.lyncareos.com so cookie domain matches production (wrapper around live SPA), or
  2. Bundled assets + API: extend tokenStore / session so native builds use a Capacitor-safe secure store for refresh (Keychain/Keystore via Preferences or dedicated plugin) and Bearer access tokens — still no PHI in logs.

Google OAuth: do not rely on in-WebView OAuth alone; use system browser / Capacitor Browser / ASWebAuthenticationSession pattern (existing GoogleSignInButton already notes WebView isolation).

PhaseCapability
Play v1Shell, auth, consumption-only commerce gating, camera for script capture if needed
Play v1.1Optional APNs/FCM mirror of care_alerts (REQ-NATIVE-03)
Apple v1Same as Play v1 posture
LaterHealthKit / Health Connect (REQ-NATIVE-05); store billing dual-rail (REQ-NATIVE-12)

Native builds must not fight Capacitor with the web SW cache strategy; disable or no-op SW registration when Capacitor.isNativePlatform().


  • Category: Health & Fitness / family support — not a medical app (REQ-NATIVE-04, doc 26).
  • Privacy policy URL required; Data Safety / App Privacy nutrition labels when submitting.
  • No diagnose / treat / cure claims in listing or store UI.

9. Roadmap phases (authoritative sequencing in 04 §13)

Section titled “9. Roadmap phases (authoritative sequencing in 04 §13)”
PhaseIDDeliverableStatus
N0DocsThis design + REQ-NATIVE-08…12 + architecture/roadmap alignmentThis change
N1Play v1Capacitor Android, consumption-only, free listing, reviewer loginDeferred
N2WebsitePost-purchase / account “Get the apps” chooser (Win / Android / iOS / web)Deferred (can ship web page before native)
N3PushOptional native push mirrorDeferred
N4Apple v1Capacitor iOS, same commerce postureDeferred after Play stable
N5OptionalPlay Billing / StoreKit dual-rail — PO sign-off onlyDeferred

Trigger to start N1 remains REQ-NATIVE-01 (or earlier PO override).


10. Fee reference (context, not a commitment to use)

Section titled “10. Fee reference (context, not a commitment to use)”

Using Google Play Billing for auto-renewing subscriptions: ~10% service + 5% billing fee ≈ 15% in US/UK/EEA under the 2026 fee model (Play Console — lower service fees). Website Stripe path under consumption-only: 0% Google/Apple cut on that revenue.


11. Open implementation decisions (for the future plan, not blockers for this design)

Section titled “11. Open implementation decisions (for the future plan, not blockers for this design)”
  1. Live-load vs bundled assets for Capacitor auth.
  2. Exact feature-flag API for “store build hides billing routes.”
  3. Whether free-tier signup is in-app vs website-first (both policy-safe; product preference).
  4. Windows packaging technology (MSI/MSIX/Electron/PWA wrapper) — out of Capacitor scope.

CheckResult
Placeholders / TBDOpen items listed in §11 only; commerce decision closed
ConsistencyMatches REQ-NATIVE-08…12 and architecture § Native
ScopeDocs + REQ alignment; no Capacitor scaffold in this change
Ambiguity“Upgrade reference” = informational copy, not payment deep link

DocRole
02-REQUIREMENTS §7.36REQ-NATIVE-*
01-ARCHITECTURE native sectionTechnical target
04-ROADMAP §13Phase status
31 reconciliation NATIVEDelivery register
05 billing indexCommerce pointer
26 regulatoryStore listing candidate