Summary: The 7Mind marketing website (www.7mind.de and the other country domains): a Next.js 16 static export on Cloudflare Pages, content from Storyblok. It replaced the Nuxt site nuxt-website in summer 2026; login and checkout now hand off to frontend-public-pages on app.7mind.de.
Sources: direct code inspection (README.md, DEPLOY.md, MIGRATION.md, functions/_middleware.ts, lib/api/, lib/auth/tokens.ts, .github/workflows/ci.yml), git log; Slack 7m_product-team-public. 2026-11-09: re-checked against origin/main (b54ed4c): functions/_middleware.ts, lib/checkout/redirect.ts, lib/i18n/locales.ts, lib/env/host.ts, .env.example, docs/moved-to-public-pages.md, package.json; live curl of www.7mind.app, www.6mind.de, next.6mind.de
Last updated: 2026-11-09
Purpose
All public, SEO-relevant 7Mind web pages: landing pages, B2B and campaign pages, legal pages, magazin, podcast, wissen, and the /krankenkasse/<course>/<insurance> prevention pages. It also hosts the account page, insurance and partner activation pages, and Mondia redeem pages. 7Sleep was dropped in the port.
GitHub: sevenmind/website-next-js. Note: a local folder named website-next-js without git metadata may exist next to the real checkout; it is a stale copy, use the git repo.
Stack
- Next.js 16 (Pages Router) with
output: 'export', React 19, TypeScript, Node 22, Yarn 1 (pinned viapackageManager) - Storyblok as CMS (see storyblok-cms); Zustand stores; design tokens built from
tokens/7mind/*.json - Vitest and ESLint in CI, Playwright e2e locally
Key Files / Entry Points
MIGRATION.md— Nuxt to Next.js decisions and milestone log (the M15 status is stale; all domains are live)DEPLOY.md— Cloudflare Pages config and build output (some details are stale, for example it names the catch-all[[...slug]].tsxand saystrailingSlash: true;next.config.tshastrailingSlash: false)functions/_middleware.ts— Cloudflare Pages Function: host to locale folder routing, robots.txt per host, the/ento7mind.app301s, and theMOVED_TO_APP302s that send the 6 login slugs and the 6 password-reset slugs toapp.<domain>pages/[locale]/[...slug].tsxandpages/[locale]/index.tsx— Storyblok catch-all and home pagelib/checkout/redirect.ts— builds the checkout hand-off toapp.<domain>/signup(see Integration Points)components/checkout/CheckoutOverlay.tsx— turns an inbound?buy=link into the same hand-offlib/api/routes.ts,lib/api/client.ts— calls tomagic.7mind.*(the legacy gateway)lib/api/gateway.ts— calls to the Gymondo APIs onapp.7mind.*(subscription cancel and reactivate, voucher validation)lib/auth/tokens.ts,lib/auth/cookieDomain.ts— shares the OAuth tokens issued by public-pages via parent-domain cookieslib/appDomain.ts— derives theapp.<domain>origin per host and builds the login and reset-password URLslib/env/host.ts— decides production vs staging from the live hostnamedocs/moved-to-public-pages.md— which components became unreachable when login and checkout moved
Deployment
- Cloudflare Pages, production branch
main, buildyarn build, outputout/(several thousand HTML files). PR previews come from Cloudflare Pages. - One build serves staging and production. Anything that must differ (Chargebee site and SKU mapping, Sentry environment) is resolved at runtime from the hostname in
lib/env/host.ts. - Production hosts, one locale each:
www.7mind.de(de),www.7mind.app(us),www.7mind.fr,www.7mind.it,www.7mind.es,www.7mind.ca,www.7mind.co.uk(uk). All were on Pages by 2026-08-18. - The
enlocale is not built./enand/en/*on any host 301 towww.7mind.app(the US content, localeus).nlhas no domain; Dutch locale-prefixed paths 301 to the7mind.apphome. - Staging hosts:
www.6mind.de(paired withapp.6mind.de),next.6mind.*andnext.7mind.*. They sit behind Cloudflare Access, so a browser needs a Cloudflare Access login. - A separate Pages project from the same repo serves Storyblok preview (
yarn build:preview,PREVIEW_SPA=1). See storyblok-cms. - Required build env:
NEXT_PUBLIC_STORYBLOK_TOKEN,NEXT_PUBLIC_BACKEND_URL,VOUCHER_SEED_ORIGIN,NPM_TOKEN(empty string). Analytics needNEXT_PUBLIC_SENTRY_DSN,NEXT_PUBLIC_GTM_IDandNEXT_PUBLIC_VWO_ACCOUNT_ID; without them that tool is simply off for the build. The full list is in.env.example. .github/workflows/ci.ymlruns only Vitest and ESLint; the build itself is validated by the Pages preview.
Dependencies
External services: Storyblok, Cloudflare Pages (static hosting plus Pages Functions), CookieFirst (consent), Sentry (@sentry/react), Google Tag Manager (loaded from data.7mind.de after consent), VWO (A/B testing, since 2026-10-15), ConfigCat (feature flags), Amplitude, reCAPTCHA, Braze and Mailchimp (newsletter and B2B forms, called from functions/newsletter_signup.ts and functions/mailchimp.ts), Zendesk.
Internal: function-sevenmind-legacy-gateway on magic.7mind.* for identity, subscription status, insurance activations and Mondia; Gymondo APIs on app.7mind.* (see gymondo-platform); frontend-public-pages for login, signup, password reset and checkout.
Integration Points
- Login: the login slugs 302 at the edge to
app.<domain>/login. A legacy?redirect=becomes?fw=<absolute url>, the return parameter public-pages reads. In-app login prompts usegoToLogin()inlib/appDomain.ts. Users come back with shared token cookies. See gymondo-sso-auth. - Checkout: there is no checkout page here. A product CTA click goes to
app.<domain>/signup?article_number=<id>, plusvoucher=<code>andchannel_id=<id>when present (lib/checkout/redirect.ts).article_numberis the Chargebee item-price id, mapped from the old Fastspring-style SKU inlib/checkout/constants.ts. Inbound?buy=<sku>&code=<code>links (marketing e-mails, print) still work throughCheckoutOverlay. /me/reset-passwordstays on this site because reset e-mails already in inboxes link to it.www.7mind.de/web-appis where the retired web player (sunset 2026-07-31) redirects- Some routes in
lib/api/routes.tsare no longer served by the gateway:/prevention/certificates,/monetization/chargebee/self_serve_portal/session,/monetization/gift/claim. Gift purchase pages were retired on 2026-09-24
Conventions
- See locale-aware-slugs-static-export and static-export-i18n-catalogue for the two non-obvious patterns of the static export.
- Every page lives under
pages/[locale]/; the middleware hides the locale prefix from the URL bar. - New hosts must be added in several places that cannot import each other:
HOST_TO_LOCALEandPRODUCTION_HOSTSinfunctions/_middleware.ts,HOST_TO_BACKENDinlib/api/client.ts, andlib/auth/cookieDomain.ts. - A staging host whose derived
app.<domain>would point at production must setAPP_ORIGIN/NEXT_PUBLIC_APP_ORIGIN, otherwise links mix staging and production. - Token cookie names and encoding must match
frontend-coreexactly; a mismatch silently splits the session. - Login, signup and checkout components (
CheckoutAuth,LoginForm,SignupFormand others) are still in the repo but unreachable. Do not fix bugs there; the flows live in frontend-public-pages.
Agent Change Log
2026-10-06 — note created during the wiki update for the Gymondo backend migration 2026-11-09 — audit fixes: checkout hand-off is a CTA redirect, not a middleware 302; catch-all filename; 7mind.app host, en sunset and staging hosts; missing external services