Skip to main content

Deployment

The repo is the private GitHub repo orenbenbrith/fit4lyfe-os (must stay private, it commits real-data.ts, the PII seed). Vercel auto-deploys:
  • Push to master → production build + deploy (build ~1–3 min). vercel --prod (CLI) still works as a manual deploy.
  • Pushes to other branches create preview deploys.
  • Aliased to fit4lifecare.com and fit4lyfe-nine.vercel.app.
Commit-author gotcha. On Vercel’s Hobby plan, only commits whose author email is connected to the orenbenbrith account deploy. Commits must be authored as 66269401+orenbenbrith@users.noreply.github.com (already this repo’s git config user.email). Any other email gets “Deployment was blocked.”

Documentation site (Mintlify)

This docs site is built with Mintlify from docs/ on master and is GitHub-connected: any push to master that changes a file under docs/ auto-republishes it. The app’s Vercel build is skipped for docs-only commits via the repo-root vercel.json ignoreCommand, so docs and app deploy independently from one repo. It is served at a subpath on the customer domain, with “Host at /docs” enabled in the Mintlify dashboard and a host-scoped Vercel rewrite proxying the traffic:
  • Primary: https://fit4lifecare.com/docs (the vercel.json rewrite proxies /docs and /docs/* to the Mintlify origin, scoped to the fit4lifecare.com host).
  • Origin: https://fit4life.mintlify.site/docs.
  • The fit4lyfe-nine.vercel.app domain does not expose /docs (the rewrite is host-scoped).

AI / agent endpoints

Mintlify exposes machine-readable endpoints under the same /docs subpath: Connect the MCP server in Claude Code:
Enabling “Host at /docs” moved these from the domain root under /docs. The old fit4life.mintlify.site root paths (e.g. /llms.txt) now 404, use the /docs/... paths above.

Schema migrations

If a change adds schema, run the additive migration first: POST /api/admin/db-setup (idempotent, IF NOT EXISTS). No separate DDL tooling. See Admin Runbooks for the full procedure and the ?examplesOnly=1 caveat.

Twilio + A2P 10DLC

The SMS bot sends through an A2P 10DLC Messaging Service (carrier-vetted; approved).
Set TWILIO_MESSAGING_SERVICE_SID in Vercel Production so outbound application-initiated SMS routes through the service. A2P traffic sent from the bare from number can be rejected. The var is load-bearing for delivery; remove it and outbound falls back to the bare number.
Inbound-webhook gotcha. When a number is in a Messaging Service, the service controls inbound, the number’s own sms_url is ignored. The service must have UseInboundWebhookOnNumber = true (set via POST messaging.twilio.com/v1/Services/MG…) or inbound is received and routed nowhere, with no error. If inbound ever goes silent, check this flag first.
Do not re-add the twilio MCP server. Its auto-generated List* tools name range params with </> (e.g. DateSent<), which are illegal in Anthropic’s tool-property-key pattern and hard-freeze every session with an API 400. The app does not depend on it, all Twilio usage is the twilio npm SDK. For Twilio ops in a session, use the REST API via curl with the .env.local creds.

Credential rotation

Neon DB credentials are integration-managed in Vercel: Settings → Environments → Production → ⋯ on a Neon var → Rotate Integration Secrets, confirm with the project name, then redeploy. This rotates all Neon vars together (they share one credential) and leaves non-Neon secrets untouched. After rotating, refresh .env.local from Neon’s “Connect” dialog for local dev + the mirror.