First-time deploy
End-to-end checklist for spinning up a fresh SlabTrack ecosystem from zero. Order matters — JWT secrets need to match before any handoff works, Stripe Connect needs to exist before storefronts can accept payments, etc.
Step 1 · Provision Railway services
- Create Railway project
- Add three services (one per repo) — connect each to its GitHub repo
- Add three Postgres databases — one per service. Reference each service's
DATABASE_URLto its Postgres. - Custom domains (after env vars are set):
- SlabTrack:
slabtrack.io+www.slabtrack.io - ToT:
thisorthat.slabtrack.io - Storefront:
storefront.slabtrack.io
- SlabTrack:
Step 2 · Generate shared secrets
Three secrets must match across all three services:
JWT_SECRET= # openssl rand -hex 32
ECOSYSTEM_WEBHOOK_SECRET= # openssl rand -hex 32
SESSION_SECRET= # openssl rand -hex 32 (SlabTrack only)
Step 3 · Set per-repo env vars
Step 4 · Stripe setup
Walk through Stripe Setup:
- Create Stripe account, enable Connect
- Get test keys
- Set
STRIPE_SECRET_KEY+STRIPE_PUBLISHABLE_KEY+NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEYon both ToT + Storefront - Create webhook endpoints (different events per repo)
- Set
STRIPE_WEBHOOK_SECRETon each from the matching endpoint's signing secret
Step 5 · Shippo setup
Walk through Shippo Setup:
- Create Shippo account, get test token
- Set
SHIPPO_API_TOKENon both ToT + Storefront - Set the seven
SHIP_FROM_*+ADMIN_EMAILenv vars on ToT - Per-shop ship-from on Storefront is set later via the dashboard
Step 6 · First deploy
- Push each repo to its main/master branch — Railway auto-builds
- Verify each service comes online:
https://[domain]/api/healthshould return 200 - Check Prisma db push ran (logs in Railway show schema sync)
Step 7 · Create the platform admin user
SlabTrack: register at /register, then manually flip users.is_admin = true via Postgres for the platform owner. ToT + Storefront accept the JWT this user issues.
Step 8 · Create your first storefront
- Visit
storefront.slabtrack.io/dashboard/new - Pick a slug (e.g.
slabtrackshop) - Onboard Stripe Connect → completes the operator account
- Set ship-from address in
/dashboard/[slug]/settings - Customize via Theme Studio (optional but worth doing first)
Step 9 · Smoke test
- Add a card to SlabTrack via PSA cert lookup
- Run Strategist → commit one card to ToT as a single
- Verify it appears on
thisorthat.slabtrack.io/browse - As a buyer (different browser/incognito), play a test Flip with card
4242 4242 4242 4242 - Verify webhook fires + Order created + label can be printed
- Confirm the buyer-shipped email arrives
Step 10 · Going live
- Activate Stripe live mode
- Replace test keys with live keys on Railway
- Re-create webhook endpoints in Stripe live mode, update
STRIPE_WEBHOOK_SECRET - Replace Shippo test token with live token
- Run a real $1 purchase end-to-end
- Announce launch
⚠ Common first-deploy traps
- JWT_SECRET mismatch: SSO handoff between SlabTrack and satellites silently fails. Check all three services' env vars are byte-for-byte identical.
- STRIPE_WEBHOOK_SECRET pasted from wrong environment: each environment (test/live) has its own. Webhook 401s if you mix them.
- SHIP_FROM_* missing fields: ToT throws "Ship-from address not configured" loud at request time. Make sure all six are set.
- Prisma migration didn't run: Railway's start script runs
prisma db push. If logs show errors, the new theme columns won't exist and Theme Studio saves silently fail. Check Railway build logs.