Publish To Production - NowStack Mobile
<objective>
Ship the production stack without confusing web deploy with mobile store release. This workflow coordinates Convex prod, web-app production deployment, and handoff to the dedicated iOS/Android store skills.
</objective>
<scope>
This skill covers:
- Convex production deployment and env verification.
web-app/production build/deploy preparation.- Runtime-secret placement between Convex, web public env, and mobile public env.
- Handoff to
ns-ios-deploy-app,ns-deploy-android-app, andns-generate-store-screenshots.
This skill does not submit App Store or Google Play builds directly. Use the dedicated store skills for that.
</scope>
<preflight>
Run/read:
git status --short --branch
git remote -v
npx convex --version
npx convex env list --prod || true
cd web-app && npm run typecheck
cd web-app && npm run build
cd mobile-app && npx tsc --noEmit
Read:
site-config.tsconvex/http.tsconvex/auth.tsconvex/storage/web-app/package.jsonmobile-app/package.json.agents/rules/auth-payments-storage.md.agents/rules/store-release.md
</preflight>
<env_rules>
- Convex backend secrets stay in Convex env.
- Do not commit
.env,.env.local,.env.production, store keys, App Store.p8, Google service account JSON, Stripe secrets, or R2 secrets. - Web/mobile public env values may exist locally for builds only when they are non-secret and required by the framework.
- iOS production payments use Apple IAP. Do not route iOS production checkout through Stripe.
- Android/web Stripe server logic belongs in Convex.
</env_rules>
<web_deploy>
Web deploy is owned by the ns-web-deploy skill — run it; do not duplicate its steps here. It covers the full one-shot flow: the mandatory nitro Vite plugin (without it Vercel ships a SPA and every route 404s), web-app/vercel.json running convex deploy so the backend ships with the frontend, npm run setup:vercel (deploy key + Root Directory = web-app), and deploying from the repo root with --archive=tgz or a push to main.
Non-negotiables to assert before declaring the web surface done:
npm run check-setuppasses the "web-app/vercel.json" AND "web-app nitro plugin" checks.CONVEX_DEPLOY_KEY(Production) is set so the backend never drifts behind the frontend.- The build log shows
convex deployrunning ANDGenerated .vercel/output/nitro.json. - Every public route (
/,/privacy,/cgv,/support) returns 200, not 404 — a SPA-404 regression only surfaces on the live routes, not in the build.
See ns-web-deploy and docs/production-checklist.md stage 2 for the step-by-step.
</web_deploy>
<mobile_handoff>
Before declaring production complete:
- Run
ns-generate-store-screenshotsif store screenshots are missing or stale. - Use
ns-ios-deploy-appfor TestFlight/App Store Connect (ascworkflow). - Use
ns-deploy-android-appfor Google Play (gpcworkflow). - Verify production Convex URLs and public app URLs match
site-config.ts.
</mobile_handoff>
<success_criteria>
- Convex prod env is present and verified.
web-apptypecheck/build pass.- Mobile TypeScript passes when mobile config/env changed.
- Store-release work is either completed through dedicated skills or explicitly listed as remaining.
- No production secret is written to git-tracked files.
</success_criteria>