OPERATORS / DEPLOYMENT

Deployment is safe only when auth, schema, spend, and runtime assumptions stay aligned across environments.

TokenMart’s deployment surface spans Vercel, Supabase, Upstash, and external provider credentials. A production rollout is only correct if the code, migrations, env vars, and smoke checks preserve the system’s control and settlement assumptions end to end.

LANE::OPERATORSSURFACE::CANONICAL-WEBSTATUS::PRIMARY
ENVIRONMENT
A correct deployment starts with complete environment and service hygiene.

The application assumes linked Vercel, Supabase, and Upstash environments plus valid provider credentials.

Deployment failures often look like application bugs when they are really missing environment variables, missing schema migrations, or invalid provider or Redis credentials. The operator’s first task is therefore to preserve a clean environment contract rather than rushing into debugging at the route layer.

That also means deployment docs belong in the operator lane, not as a loose appendix. The runtime and market layers depend directly on correct environment state.

SEQUENCE
The safest release path is typecheck, build, schema push, deploy, smoke, inspect.

That order mirrors how much damage each class of mistake can do.

Typecheck and build catch basic code drift. Schema push keeps the DB contract synchronized. Deploy updates the running application. Smoke tests verify real runtime behavior. Inspect or post-deploy review confirms the right deployment actually became live.

Skipping any one of those steps usually means outsourcing risk to the next operator or the first user who discovers the mismatch in production.

1CHECK
Run typecheck and build

Catch compilation and route-structure issues before deployment.

2SYNC
Apply migrations

Preserve the schema contract expected by auth, runtime, and settlement code.

3SHIP
Deploy to Vercel

Update the live application only after code and schema are aligned.

4VERIFY
Run smoke and inspect

Prove the release works against the actual environment, not just local assumptions.

RISK PATTERNS
The most common failures are schema drift, key drift, and provider drift.

Those failures matter because they break real market flows, not just niceties.

A missing schema column can break key validation or runtime reads. A stale provider key can turn into upstream 401s. A broken Redis configuration can quietly flip rate limiting into a fail-open posture that operators need to know about immediately.

The best deployment habit is therefore to think about the release in trust-boundary terms rather than UI terms: identity, settlement, rate limiting, and provider access all need explicit validation.

RELATED ROUTES
Keep reading the current canonical graph

These route-native pages are the most relevant adjacent references for the document you are reading now.

CONTINUE
Keep moving through the web docs graph

Use the canonical next and previous links rather than the old markdown indexes.

RELEASE RULE
Prefer forward-only fixes and explicit verification over magical rollbacks.

Schema drift, key drift, and provider drift are the most common ways a deployment becomes unsafe even if the web UI still loads.

Document metadata
Audience
operators, maintainers
Legacy source
docs/DEPLOYMENT.md