Goal
Productionize the backend: launch readiness, observability, hardening, idempotency, tests, and app-selectable backend environments — independent of individual product stages.
Merged from
To do
Production envs & compatibility (was #6 )
Set production compatibility envs: NEVERMIND_MIN_DESKTOP_VERSION, NEVERMIND_LATEST_DESKTOP_VERSION, NEVERMIND_DESKTOP_UPDATE_URL
Confirm/rotate production Stripe envs: STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, STRIPE_SUBSCRIPTION_TIERS, STRIPE_TOP_UP_PACKS, CREDIT_USD, CREDIT_MARKUP, MONTHLY_FREE_CREDITS
Confirm Stripe webhook endpoint points at latest production deployment
Enable/configure Stripe Customer Portal
Run billing smoke tests (subscribe, verify credits, top-up, cancel)
Swap WorkOS staging → production credentials
Verify packaged Electron build against production end-to-end
Dogfood tool-calling through the pure reverse proxy
Repeat Google streaming AI request and confirm prod logs show non-zero tokens
Observability & ops (was #9 )
Backend hardening & idempotency (was #12 )
Staging & app-selectable backends (was #12 )
Useful files
backend/src/lib/billing.ts, backend/src/lib/cost.ts, backend/src/lib/settings.ts
backend/src/lib/proxy.ts, backend/src/lib/limits.ts, backend/src/lib/ratelimit.ts
backend/src/lib/log.ts, backend/src/lib/compatibility.ts
backend/src/pages/api/**, backend/src/db/schema.ts, backend/drizzle/
src/electron/nevermind-auth.ts, src/electron/nevermind-api.ts, src/electron/nevermind-compatibility.ts
.agents/skills/production-debugger/
Verification
mise exec -- pnpm test
mise exec -- pnpm -C backend test
Prod health: curl -fsS https://api.nvm.fyi/api/health → ok: true
Packaged app can switch between production and PR Preview backends
Goal
Productionize the backend: launch readiness, observability, hardening, idempotency, tests, and app-selectable backend environments — independent of individual product stages.
Merged from
To do
Production envs & compatibility (was #6)
NEVERMIND_MIN_DESKTOP_VERSION,NEVERMIND_LATEST_DESKTOP_VERSION,NEVERMIND_DESKTOP_UPDATE_URLSTRIPE_SECRET_KEY,STRIPE_WEBHOOK_SECRET,STRIPE_SUBSCRIPTION_TIERS,STRIPE_TOP_UP_PACKS,CREDIT_USD,CREDIT_MARKUP,MONTHLY_FREE_CREDITSObservability & ops (was #9)
nvmVercel projectabuse_check,health_checktagshttps://api.nvm.fyi/api/healthbackendVercel project from accidental linkBackend hardening & idempotency (was #12)
Idempotency-Keysupport on chat completionsrequest_deduptable/logic so chat retries do not double-chargegetBalancesStaging & app-selectable backends (was #12)
https://api.nvm.fyi, dev → localhostUseful files
backend/src/lib/billing.ts,backend/src/lib/cost.ts,backend/src/lib/settings.tsbackend/src/lib/proxy.ts,backend/src/lib/limits.ts,backend/src/lib/ratelimit.tsbackend/src/lib/log.ts,backend/src/lib/compatibility.tsbackend/src/pages/api/**,backend/src/db/schema.ts,backend/drizzle/src/electron/nevermind-auth.ts,src/electron/nevermind-api.ts,src/electron/nevermind-compatibility.ts.agents/skills/production-debugger/Verification
mise exec -- pnpm testmise exec -- pnpm -C backend testcurl -fsS https://api.nvm.fyi/api/health→ok: true