Changelog
2026-11-19 — B2C go-live map and first fix tranche
New operations page listing everything still open before a public consumer launch (voice and Knotencheck excluded), plus fixes for the code blockers that need no external access: profile privilege escalation (migration, not yet applied live), account deletion and data export, server-side Premium gating, billing portal and upgrade path, cleanup cron, email relay, Stripe redirect origin.
What changed
- New: B2C go-live map.
- Migration
supabase/migrations/20261119_profiles_rls_hardening.sql: trigger pinsis_admin,subscription_tier,feature_flagsfor theanon/authenticatedroles;profiles_update_owngainsWITH CHECK; forum post and comment inserts requireauthor_id = auth.uid(). - New routes:
DELETE /api/account(cancel Stripe subscription → delete files → delete auth user) andGET /api/account/export./datenschutzuses both. - Server-side gating:
kliniken/*,studies,studies/match,timeline(GET/POST),timeline/events(POST/PUT) now enforce the Premium features the docs already listed. New helperrequireFeatureinapps/web/lib/subscription/server.ts. - Billing:
/profilopens the Stripe billing portal for paying users;/preisestarts checkout for signed-in Free users and the portal for paying users. /api/chat/cleanup: answersGET(what Vercel Cron sends) and uses the service-role client./api/emails/send: fixed login link, sanitised names, same-origin confirmation link, recipient restricted to self for signed-in non-admins.- Stripe redirects:
getSiteUrl()— configuration only. - Launch audit findings 5 and 7 annotated.
Second tranche (same day)
- Migration
supabase/migrations/20261119_post_limit_webhook_events.sql:get_user_tier()countstrialing;AFTER INSERTtrigger onforum_postsincrements the weekly counter;stripe_webhook_eventstable. The forum insert policy in the hardening migration now also requirescan_community_post(). - Webhook: idempotent on
event.id;invoice.payment_failed→status = past_due; a processing error releases the id so Stripe's retry is applied. Four tests added. - Trialing counts as entitled in
getUserTier,can-postand the cleanup cron. - Client:
community/neuno longer increments the post counter itself. - SEO: sitemap reduced to public, finished pages;
noindexon/wbc,/chat_nacht,/profil_nacht;public/og-home.pngadded, rendered from the existing OG design file. - Config:
.env.examplecompleted (AWS, S3, Turnstile, PostHog, rollout flag, LLM key; unusedDEV_variable removed);instrumentation.tsstart-up check. - Impressum: § 5 TMG → § 5 DDG; ODR-platform paragraph replaced with the § 36 VSBG statement; privacy link to the docs site. No change to names.
- Chat page: session id mirrored in state so the PDF-export button appears when a session starts (was a ref read during render).
- Lint: 17
no-explicit-anyerrors in inbox routes, moderation page andlib/resend.tsreplaced with types; lint step added toweb-tests.yml. - CI:
web-tests.ymlusedpnpm --filter apps/web, which matches no workspace package; every run since the workflow was added printed "No projects matched the filters" and passed without running a single test. Filter corrected tofragjulia-web. The job is now expected to be red on the study-data staleness test until the data is re-verified (map item A15).
Why
A code, docs and tracker review on 2026-11-18 found no go-live map and several launch-blocking defects, the most serious being that the profile update policy let any user grant themselves admin or Premium.
Behaviour changes to be aware of
/api/klinikenand/api/studieswere public; they now need a signed-in Premium user. The only caller ofGET /api/studiesiscomponents/clinical-studies.tsxon/forschung, which redirects to the docs site.- A user who downgrades from Premium can no longer read or add timeline events through the API, only delete them. The data export still contains them.
- Stripe redirects go to
NEXT_PUBLIC_SITE_URL, orhttps://fragjulia.deif unset — set the variable in preview and local environments. - Deleting an account now ends a running subscription immediately. If Stripe cannot be reached, the account is kept and the user is told.
Verification
tsc --noEmitclean;next buildsucceeds.- vitest (local): 149 of 150 pass. New:
requireFeature(4),DELETE /api/account(6), webhook (4). Lint: 0 errors. The one failure is the existing study-data staleness check (studies.test.ts:169, data last verified 2026-04-03) and is left red deliberately. - Not verified: the migration was not run against any database; no end-to-end run against Supabase or Stripe.
Follow-ups
- Apply and verify the migration on the live database (owner).
- Everything under "Open" in the map, in particular A2b (public profile columns).