How Wrapper's pieces fit together across local, dev, and prod, and how each one deploys. If you only want to test locally, jump to Local development.
| Component | What it is | Hosting | Code |
|---|---|---|---|
| backend | Convex functions, auth (Better Auth), billing (Autumn) | Convex | packages/backend |
| relay | Bun + Hono WebSocket relay for remote sessions | Fly.io | apps/relay |
| web | Next.js site | Vercel | apps/web |
| cli | The wrapper CLI (host/attach) |
GitHub Releases / Homebrew | apps/cli |
| docs | Mintlify documentation source | docs.wrapper.sh |
apps/docs |
| mobile | Native iPhone/iPad viewer MVP | TestFlight pre-release | apps/mobile |
| Domain | Purpose | Current state |
|---|---|---|
wrapper.sh |
Canonical production website, auth, installer, legal, and support origin | Live on the production Vercel app |
docs.wrapper.sh |
Canonical public Mintlify documentation origin | Live |
Two long-lived environments, driven by branch:
local your machine convex dev (sleek-echidna) + ws://localhost:8080 + localhost:3000
|
dev branch -> DEV env -> Convex sleek-echidna-539 · wrapper-relay-dev · Vercel Preview
main branch -> PROD env -> Convex confident-fox-458 · wrapper-relay-prod · Vercel Production
Real Convex URLs:
| dev | prod | |
|---|---|---|
.cloud |
https://sleek-echidna-539.convex.cloud |
https://confident-fox-458.convex.cloud |
.site |
https://sleek-echidna-539.convex.site |
https://confident-fox-458.convex.site |
Released CLI binaries treat an unset NODE_ENV as production and default to
https://confident-fox-458.convex.cloud,
wss://wrapper-relay-prod.fly.dev, and https://wrapper.sh. Source development
must set NODE_ENV=development and explicit dev endpoints.
-
web (Vercel): Vercel's Git integration decides by the Production Branch setting. Set Production Branch =
main. Thenmain→ Production, every other branch (incl.dev) and PR → Preview. No GitHub workflow needed. -
backend + relay (GitHub Actions): the deploy workflows pick a GitHub Environment from the branch, so secrets/variables resolve per environment:
environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'dev' }}
| Workflow | Trigger | Deploys |
|---|---|---|
.github/workflows/deploy-backend.yml |
push dev/main on packages/backend/** |
Convex (convex deploy) |
.github/workflows/deploy-relay.yml |
push dev/main on apps/relay/** |
Fly app (flyctl deploy --app) |
.github/workflows/ci.yml |
every PR/push | audit, lint, format, types, tests, web/docs builds, relay smoke (no deploy) |
Web deployment is not in GitHub Actions. CI still builds the web app, while Vercel deploys it directly from Git.
| Key | dev (sleek-echidna) | prod (confident-fox) |
|---|---|---|
ENVIRONMENT |
development |
production |
SITE_URL |
Vercel dev/preview URL | https://wrapper.sh |
BETTER_AUTH_SECRET |
dev secret | prod secret |
GITHUB_CLIENT_ID / GITHUB_CLIENT_SECRET |
dev OAuth app | prod OAuth app |
APPLE_CLIENT_ID / APPLE_CLIENT_SECRET |
dev Services ID + secret | prod Services ID + secret |
AUTUMN_SECRET_KEY |
am_sk_test_… (sandbox) |
am_sk_live_… (production) |
WRAPPER_AUTUMN_RELAY_SHARE_FEATURE_ID |
can_share_relay |
can_share_relay |
WRAPPER_RELAY_HOST_TICKET_TTL_MS etc. |
optional (has defaults) | optional (has defaults) |
| Key | wrapper-relay-dev | wrapper-relay-prod |
|---|---|---|
CONVEX_URL |
https://sleek-echidna-539.convex.cloud |
https://confident-fox-458.convex.cloud |
PORT |
8080 (in fly.toml) | 8080 (in fly.toml) |
Vercel scopes: Production = main, Preview = dev + PRs, Development
= local vercel dev only. These values are baked at
build time):
| Key | Production | Preview | Development |
|---|---|---|---|
NEXT_PUBLIC_CONVEX_URL |
…confident-fox-458.convex.cloud |
…sleek-echidna-539.convex.cloud |
…sleek-echidna-539.convex.cloud |
NEXT_PUBLIC_CONVEX_SITE_URL |
…confident-fox-458.convex.site |
…sleek-echidna-539.convex.site |
…sleek-echidna-539.convex.site |
NEXT_PUBLIC_APPLE_AUTH_ENABLED |
true after Apple OAuth is configured |
true after Apple OAuth is configured |
false unless testing Apple OAuth |
| Name | Kind | dev | production |
|---|---|---|---|
CONVEX_DEPLOY_KEY |
secret | sleek-echidna deploy key | confident-fox deploy key |
FLY_API_TOKEN |
secret | ✓ | ✓ |
FLY_APP_NAME |
var | wrapper-relay-dev |
wrapper-relay-prod |
-
Vercel (web): import the repo, set Root Directory =
apps/weband Production Branch =main. Add the env vars from the web table above (Production / Preview / Development). If the build fails resolving the buncatalog:versions, set the Install Command to run at the repo root (cd ../.. && bun install). -
Convex env: set the backend vars on both deployments and create a deploy key each (Dashboard → Settings → Deploy Keys):
cd packages/backend # dev (against sleek-echidna, e.g. `bunx convex env set --preview-name` or via dashboard) bunx convex env set SITE_URL https://<vercel-dev-url> # prod (against confident-fox) bunx convex env set SITE_URL https://wrapper.sh
-
Fly (relay): two apps plus secrets:
flyctl apps create wrapper-relay-dev flyctl apps create wrapper-relay-prod flyctl secrets set CONVEX_URL=https://sleek-echidna-539.convex.cloud --app wrapper-relay-dev flyctl secrets set CONVEX_URL=https://confident-fox-458.convex.cloud --app wrapper-relay-prod # FLY_API_TOKEN: `flyctl tokens create deploy` -> GitHub env secret (both envs)
Retire any previous Fly app only after both replacement environments pass their smoke checks and no configuration or traffic references the old app.
-
GitHub Environments: create
devandproduction, then fill the table above. -
OAuth apps: configure the dev GitHub OAuth app (callback
https://sleek-echidna-539.convex.site/api/auth/callback/github) and prod (https://confident-fox-458.convex.site/api/auth/callback/github). Put client id/secret in the matching Convex deployment env. -
Autumn: push config to both (not automatic, the key decides the env):
cd packages/backend bunx atmn push # sandbox (dev) -> am_sk_test_ key bunx atmn push --prod # production -> am_sk_live_ key
-
Docs:
apps/docsis connected to Mintlify athttps://docs.wrapper.sh. Keep DNS, TLS, and representative page requests healthy after navigation or domain changes.
Once done, a push to dev updates matching dev backend/relay paths and creates a
Vercel Preview. A merge to main updates matching production backend/relay
paths and Vercel Production. CLI, docs, and mobile releases use their separate
release or hosting processes.
Four terminals:
# 1) backend (Convex dev deployment + live codegen)
cd packages/backend && bunx convex dev
# 2) relay
cd apps/relay && CONVEX_URL="https://sleek-echidna-539.convex.cloud" bun run dev
# 3) web (optional, for auth/onboarding UI)
cd apps/web && bun run dev # http://localhost:3000
# 4) cli
cd apps/cli && bun run index.ts auth login
bun run index.ts shell-hostpackages/backend/.env.local holds your local Convex + AUTUMN_SECRET_KEY. Point
the CLI at local with apps/cli/.env.local (copy from .env.example).
-
In the host shell, press
Ctrl+\thensto share. -
As a free user you should see "Relay sharing requires Pro" + a checkout URL (URL only if Stripe is connected in the Autumn sandbox; otherwise the generic message, still correctly denied).
-
Grant Pro (Stripe test card
4242 4242 4242 4242, or attachproin the Autumn dashboard), retry → sharing succeeds and a viewer can attach:bun run index.ts attach --id <session-id>