Closes the remaining store-compliance gaps before App Store / Play
submission:
- Account deletion (App Store guideline 5.1.1): DELETE /me removes the
user row (usage cascades). The app exposes it through one quiet
'Account' caption link under the chat, visible only when signed in,
driving two native dialogs (Sign out / Delete account with a
destructive confirm) — no new views, no menus, minimalism intact.
Deletion signs out and resets the app; copy notes that store
subscriptions are cancelled in App Store / Play settings.
- docs/store/privacy-policy.md: the complete data inventory (matching
the actual schema), transient OpenAI processing with no training, no
profiling or ads, GDPR legal bases and rights, in-app erasure.
- docs/store/terms-of-service.md: not-therapy positioning with crisis
guidance, AI-generated-content caveat, 18+ eligibility,
auto-renewal/cancellation terms, liability, Swedish governing law.
- docs/store/listing.md: App Store and Play copy written to the
honest-claims rule (subtitle 'Think Beyond Thought', keywords,
descriptions), plus App Privacy and Data safety questionnaire
mappings.
- LAUNCH.md updated: host the policy/terms, set store URLs, use the
prepared listing copy.
- Tests: 30 passing (adds DELETE /me coverage).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0118DaxZR36RpnY524vRqx3z
Takes V1 from code-complete toward the closed beta:
- Tests: the suite grows from 5 to 29. handler.test.ts covers route
dispatch, guest device-id validation and user creation, JWT provider
derivation, the paywall flag pass-through, free/premium mode
selection, the assistant-final transcript rule (post-unlock delivery),
the 402 abuse cap and its premium exemption, and purchase-verify
validation. chat.test.ts covers structured-output parsing, premium
masking of analysis_ready, the exact Responses API payload (knowledge
base + strict JSON schema + the no-manufactured-suspense rule) and
error handling. subscription.test.ts covers the Apple adapter
(active/expired/wrong-product/sandbox retry on 21007) and the Google
adapter (real RS256 JWT signing against a generated key, token
exchange, expiry, 410-gone), with fetch and secrets mocked.
- EAS: apps/mobile/eas.json with development/preview/production
profiles for TestFlight and Play internal-testing builds.
- LAUNCH.md: step-by-step path to 20-50 beta users — AWS deploy and
secrets, migration, sign-in providers, store products at
$5.99/$49.99, EAS builds, CI role, and the beta measurement plan
(retention, dialogue depth, upgrade timing, tester interviews).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0118DaxZR36RpnY524vRqx3z
Ersätter den tidigare webappen på denna branch med ett fokuserat monorepo:
- apps/mobile: Expo/React Native med tre vyer (Welcome, Chat, Paywall),
Cognito hosted UI-inloggning (Apple/Google/e-post) och In-App
Purchase/Play Billing via en gemensam purchases-modul.
- services/api: en enda Lambda-backend — OpenAI Responses API med
Markdown-kunskapsbas som systeminstruktioner, free tier-gräns i
PostgreSQL (HTTP 402 -> paywall) och kvittoverifiering bakom ett
delat PaymentProvider-interface (Apple/Google, Stripe kan läggas
till för webb senare).
- infra: AWS CDK-stack med API Gateway (JWT-authorizer), Lambda,
Cognito, Aurora Serverless v2 och Secrets Manager.
- db/migrations: minimal datamodell (users + usage), inga
konversationer sparas.
- GitHub Actions: CI (lint, typecheck, test) och deploy från main.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0118DaxZR36RpnY524vRqx3z