尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗Web onboarding funnel (quiz.nutreeai.com production, quiz.preview.nutreeai.com preview): landing → quiz → TDEE results → email capture → anonymous RevenueCat Web checkout → thin correlation → redemption email → mobile Home shell → Firebase email → redeem → finalize.
Design spec: docs/superpowers/specs/2026-07-07-web-to-app-funnel-design.md
Next.js (App Router) · TypeScript · Tailwind CSS · zustand ·
Vitest. Localized copy lives in src/lib/copy/vi.ts and
src/lib/copy/en.ts.
VN) uses Vietnamese copy and the existing VND offering configured in RevenueCat./survey/en loads the English Meta pixel only when its pixel id and
Conversions API token are both set. Otherwise that page uses the Vietnamese
pixel and token. Vietnamese pages, /, /postcheckout, /success, and
every other route load only the default pixel. A full page load after
checkout uses that default pixel. PostHog events include funnel_locale
(vi or en) and funnel (web_funnel_vi or web_funnel_en).npm install
cp .env.example .env.local # fill in values
npm run dev # http://localhost:3000
npm test # unit tests (vitest)
npm run build # production build check
| Variable | Purpose |
|---|---|
NEXT_PUBLIC_API_BASE_URL | Nutree backend base URL (no trailing slash) |
WEB_FUNNEL_BFF_SHARED_SECRET | Server-only shared credential required by MealTrack for lead creation |
NEXT_PUBLIC_REVENUECAT_WEB_API_KEY | RevenueCat Web public API key for the web checkout config |
NEXT_PUBLIC_REVENUECAT_WEB_OFFERING_ID | Existing Vietnam offering; the paywall shows its packages in dashboard order |
NEXT_PUBLIC_REVENUECAT_WEB_OFFERING_ID_INTL | Required separate offering for non-Vietnam markets, containing the new USD Paddle prices |
NEXT_PUBLIC_FIREBASE_IOS_BUNDLE_ID / NEXT_PUBLIC_FIREBASE_ANDROID_PACKAGE_NAME | Matching Nutree app bundle/package IDs for the phone handoff flow |
NEXT_PUBLIC_POSTHOG_PROJECT_TOKEN | PostHog project token for session replay (optional; omitted if unset). Use DEV locally, STAGING on preview, PROD on production |
NEXT_PUBLIC_GA4_ID | GA4 measurement id (optional; script omitted if unset) |
NEXT_PUBLIC_META_PIXEL_ID | Meta Pixel id for Vietnamese pages and every non-English route (optional) |
NEXT_PUBLIC_META_PIXEL_ID_EN | Meta Pixel id for /survey/en. Used only together with the English token; otherwise the page uses the default pixel |
META_CONVERSIONS_API_ACCESS_TOKEN | Server-only Conversions API token for the default pixel. Empty keeps /api/meta/events inert. The route forwards only from the production deployment on quiz.nutreeai.com |
META_CONVERSIONS_API_ACCESS_TOKEN_EN | Server-only token for the English pixel. Used only together with the English pixel id; otherwise events use the default token. Set in Vercel as a Sensitive variable |
NEXT_PUBLIC_TIKTOK_PIXEL_ID | TikTok Pixel id (optional) |
NEXT_PUBLIC_AIRBRIDGE_APP_NAME | Airbridge app name (optional) |
NEXT_PUBLIC_AIRBRIDGE_WEB_TOKEN | Airbridge web SDK token (optional) |
NEXT_PUBLIC_AIRBRIDGE_TRACKING_LINK |
The quiz is a Next.js deployment on Vercel. Use the linked nutree_web_funnel
project, set the env vars above in the matching Preview/Production
environments, and attach these domains to that project:
| Vercel environment | Domain | Firebase project used by the matching mobile flavor |
|---|---|---|
| Preview | quiz.preview.nutreeai.com | nutree-ai-staging |
| Production | quiz.nutreeai.com | nutree-ai |
Deploy with the guarded helpers below. They run the web tests and production build before submitting a deployment, and require an explicit confirmation flag for production:
./scripts/deploy-vercel.sh preview
CONFIRM_PRODUCTION_DEPLOY=1 ./scripts/deploy-vercel.sh production
No special Vercel build settings are required. The custom domains must be
owned by the Vercel team and resolve to this project before the domain URLs are
deployment proof. NEXT_PUBLIC_* values are embedded at build time, so
changing them requires a new deployment.
The app serves host-specific /.well-known/apple-app-site-association and
/.well-known/assetlinks.json responses. Set the matching release fingerprint
in each Vercel environment; leaving it empty intentionally returns no Android
association until the signing certificate is configured.
Copy config/vercel-preview.env.example to .env.preview.local and
config/vercel-production.env.example to .env.production.local. Fill the local
files, which stay ignored by Git, then import non-empty values with:
./scripts/import-vercel-env.sh preview .env.preview.local
./scripts/import-vercel-env.sh production .env.production.local
Set both Vietnam and international offering IDs in each environment. The international offering must contain RevenueCat products linked to the new USD Paddle prices. Preview must use RevenueCat's sandbox web key/config; Production uses the live web key/config. Redeploy after an import because
NEXT_PUBLIC_* values are embedded during the build.
/api/web-funnel/session and /api/web-funnel/leads, correlates anonymous RC customers after pay, and can /session/reset an unpaid draft with the same-origin lead-access cookie. Legacy /resend magic-claim remains on the BFF for compatibility only (backend-gated; web UI no longer offers it). /welcome is guidance-only./open-nutree and /redeem are token-free install/reopen fallbacks.app_user_id + SHA-256 digest to the BFF, keeps the raw redeem URL in memory only, and navigates to /postcheckout. RevenueCat emails the Redemption Link; opening it in Nutree silently signs the buyer in and activates the purchase. /redeem is guidance-only and does not activate.NEXT_PUBLIC_AIRBRIDGE_TRACKING_LINK).docs/utm-tracking-links.md.| Airbridge tracking link for the success page |
NEXT_PUBLIC_APPSTORE_URL / NEXT_PUBLIC_PLAYSTORE_URL | Raw store URLs |
NUTREE_ANDROID_SHA256_CERT_FINGERPRINTS | Server-only comma/newline-separated release SHA-256 fingerprints for Android App Links |