Commit Graph

508 Commits

Author SHA1 Message Date
Claude 6b7f0263e4 Add chat-first onboarding and intelligent context-based paywall
Replaces the hardcoded message limit with a model-driven paywall and
removes registration before the first question:

- Onboarding: the app opens directly into the chat. Dynamic conversation
  starters are served by GET /suggestions (services/api/suggestions.json),
  updatable with a deploy — no app release needed. Guests chat via
  POST /guest/chat, identified by an app-generated device id; sign-in
  moves to the paywall, where a purchase must attach to an account.
- Free experience: the model runs in discovery mode — follow-up
  questions, pattern identification, visible understanding — building an
  analysis without delivering the full solution.
- Intelligent paywall: the model returns structured output (reply +
  analysis_ready). Only when the problem is described, the information is
  sufficient and an action plan is ready does it write a calm transition
  and pause the conversation. Manufactured urgency, emotional pressure,
  fake readiness and mid-answer stops are explicitly forbidden.
- Premium: on unlock the app resends the transcript and the backend
  immediately delivers the full analysis, strategies and exercises, then
  the dialogue continues without restriction.
- The old FREE_MESSAGE_LIMIT becomes MESSAGE_CAP (default 200/30 days),
  kept purely as an abuse backstop — it is not the paywall.
- WelcomeScreen removed; the app is now two views (Chat, Paywall).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0118DaxZR36RpnY524vRqx3z
2026-08-03 14:42:44 +00:00
Claude 07fbeea09b Bygg NeuroSemantics AI: minimal mobilapp, en backend, IaC och CI/CD
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
2026-08-03 14:35:48 +00:00
gpt-engineer-app[bot] 508cb534b0 Uppdaterade order-status
X-Lovable-Edit-ID: edt-eb47df22-3107-45d6-81eb-de95c11d6f9b
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 14:23:45 +00:00
gpt-engineer-app[bot] 4555906c2d Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 14:23:39 +00:00
gpt-engineer-app[bot] ef1d3e5728 La till lösenordsval vid checkout
X-Lovable-Edit-ID: edt-622ecb9c-6ab7-49a8-b6fc-d6cb1506675b
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 14:03:42 +00:00
gpt-engineer-app[bot] 807c208226 Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 14:03:32 +00:00
gpt-engineer-app[bot] 77aa579ee4 Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 14:03:15 +00:00
gpt-engineer-app[bot] 5df1ce68fa Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 14:03:04 +00:00
gpt-engineer-app[bot] 0d67ea8124 Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 14:02:56 +00:00
gpt-engineer-app[bot] b917df93ff Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 14:02:50 +00:00
gpt-engineer-app[bot] d7c9e0b2c0 Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 14:02:46 +00:00
gpt-engineer-app[bot] 7062fb583c Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 14:02:41 +00:00
gpt-engineer-app[bot] b89c272cee Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 14:02:37 +00:00
gpt-engineer-app[bot] be8c0f4c9f Fixade stad-autofyll i checkout
X-Lovable-Edit-ID: edt-695a1837-e5d9-4420-92e0-742460dc36e1
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 13:54:07 +00:00
gpt-engineer-app[bot] 3035cb95c1 Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 13:53:40 +00:00
gpt-engineer-app[bot] 2cc1700cd9 Auto-fyllde stad vid postnr
X-Lovable-Edit-ID: edt-9b11a679-1a4f-4597-8bc1-924eec53b945
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 13:44:36 +00:00
gpt-engineer-app[bot] f0d90cccb4 Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 13:44:30 +00:00
gpt-engineer-app[bot] 288e363f5b Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 13:44:23 +00:00
gpt-engineer-app[bot] 3d7305d25a La till sökbar stad-dropdown
X-Lovable-Edit-ID: edt-17622425-5ba6-4d22-98bc-e2f167699ddc
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 13:43:29 +00:00
gpt-engineer-app[bot] 90fd9c9c2b Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 13:43:24 +00:00
gpt-engineer-app[bot] e2358e8e62 Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 13:43:13 +00:00
gpt-engineer-app[bot] 2f93f2b25d Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 13:43:05 +00:00
gpt-engineer-app[bot] 354635c3d8 Uppdaterade Stripe-webhooken
X-Lovable-Edit-ID: edt-115a4e86-5991-46f8-8239-752c2774123d
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 13:38:55 +00:00
gpt-engineer-app[bot] 37bb419c0b Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 13:38:33 +00:00
gpt-engineer-app[bot] 0a87269136 Såg till och testade live-utgåvan
X-Lovable-Edit-ID: edt-d4addf3d-6ec1-4ad7-8720-479c03c6ec92
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 13:32:40 +00:00
gpt-engineer-app[bot] b1f5efcaad Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 13:32:05 +00:00
gpt-engineer-app[bot] 75bc5f1140 Justerade priset till 1 kr/kg
X-Lovable-Edit-ID: edt-cb3053ba-e95c-4205-b153-c55a8115e41f
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 13:14:57 +00:00
gpt-engineer-app[bot] 8b2da16ae5 Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 13:14:48 +00:00
gpt-engineer-app[bot] 513108bf1a Aktiverade Live Stripe
X-Lovable-Edit-ID: edt-974b004e-50b3-43cb-8469-5663ca5e5dd6
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 13:00:19 +00:00
gpt-engineer-app[bot] b5cf307fa1 Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-12 13:00:16 +00:00
gpt-engineer-app[bot] ca405c17c8 Byggt konto-sidan med abon.
X-Lovable-Edit-ID: edt-b85ec815-1193-40d9-9ff6-1fc7e088a9bb
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-11 18:23:00 +00:00
gpt-engineer-app[bot] 12714ac354 Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-11 18:22:53 +00:00
gpt-engineer-app[bot] bc971a1a4d Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-11 18:22:44 +00:00
gpt-engineer-app[bot] 0280b8d0d1 Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-11 18:22:15 +00:00
gpt-engineer-app[bot] 4cbc8e0eeb Lade till portal/abonnemang
X-Lovable-Edit-ID: edt-c4fe3ee8-d3b1-4b2b-b588-9260f9fe5413
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-11 18:21:04 +00:00
gpt-engineer-app[bot] 14ccf70a24 Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-11 18:20:48 +00:00
gpt-engineer-app[bot] 6b1ea0698f Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-11 18:20:30 +00:00
gpt-engineer-app[bot] 646db7299d Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-11 18:20:19 +00:00
gpt-engineer-app[bot] b2861d1210 Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-11 18:20:10 +00:00
gpt-engineer-app[bot] 5c2357fdc1 Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-11 18:19:54 +00:00
gpt-engineer-app[bot] 4e2c456c65 Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-11 18:19:22 +00:00
gpt-engineer-app[bot] c1d75b1ee9 Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-11 18:19:14 +00:00
gpt-engineer-app[bot] 05c1c84707 Stängde och resetade Stripe
X-Lovable-Edit-ID: edt-2c8d1a79-80b3-4d2e-bf25-6e82f4da217c
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-11 15:46:37 +00:00
gpt-engineer-app[bot] 37e4e1aff2 Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-11 15:46:32 +00:00
gpt-engineer-app[bot] e86c8daa91 Ta bort texten, inkludera moms
X-Lovable-Edit-ID: edt-d273db89-29bb-43a3-b64f-95795a2f1410
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-11 14:07:07 +00:00
gpt-engineer-app[bot] a9b0289de1 Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-11 14:07:03 +00:00
gpt-engineer-app[bot] 824f78d806 Visade pris inkl. moms (ink moms)
X-Lovable-Edit-ID: edt-3c8c921d-2016-4543-9479-a143cfb79faf
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-11 14:03:25 +00:00
gpt-engineer-app[bot] 441f260818 Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-11 14:03:03 +00:00
gpt-engineer-app[bot] 2913913542 Changes
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-11 14:02:48 +00:00
gpt-engineer-app[bot] ee0af8e164 Fixed security findings
X-Lovable-Edit-ID: edt-0350ce8a-9b30-411a-a2e8-6bab59e3228d
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
2026-07-11 14:01:23 +00:00