Setup

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

  1. Create Railway project
  2. Add three services (one per repo) — connect each to its GitHub repo
  3. Add three Postgres databases — one per service. Reference each service's DATABASE_URL to its Postgres.
  4. Custom domains (after env vars are set):
    • SlabTrack: slabtrack.io + www.slabtrack.io
    • ToT: thisorthat.slabtrack.io
    • Storefront: storefront.slabtrack.io

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:

  1. Create Stripe account, enable Connect
  2. Get test keys
  3. Set STRIPE_SECRET_KEY + STRIPE_PUBLISHABLE_KEY + NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY on both ToT + Storefront
  4. Create webhook endpoints (different events per repo)
  5. Set STRIPE_WEBHOOK_SECRET on each from the matching endpoint's signing secret

Step 5 · Shippo setup

Walk through Shippo Setup:

  1. Create Shippo account, get test token
  2. Set SHIPPO_API_TOKEN on both ToT + Storefront
  3. Set the seven SHIP_FROM_* + ADMIN_EMAIL env vars on ToT
  4. Per-shop ship-from on Storefront is set later via the dashboard

Step 6 · First deploy

  1. Push each repo to its main/master branch — Railway auto-builds
  2. Verify each service comes online: https://[domain]/api/health should return 200
  3. 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

  1. Visit storefront.slabtrack.io/dashboard/new
  2. Pick a slug (e.g. slabtrackshop)
  3. Onboard Stripe Connect → completes the operator account
  4. Set ship-from address in /dashboard/[slug]/settings
  5. Customize via Theme Studio (optional but worth doing first)

Step 9 · Smoke test

  1. Add a card to SlabTrack via PSA cert lookup
  2. Run Strategist → commit one card to ToT as a single
  3. Verify it appears on thisorthat.slabtrack.io/browse
  4. As a buyer (different browser/incognito), play a test Flip with card 4242 4242 4242 4242
  5. Verify webhook fires + Order created + label can be printed
  6. Confirm the buyer-shipped email arrives

Step 10 · Going live

  1. Activate Stripe live mode
  2. Replace test keys with live keys on Railway
  3. Re-create webhook endpoints in Stripe live mode, update STRIPE_WEBHOOK_SECRET
  4. Replace Shippo test token with live token
  5. Run a real $1 purchase end-to-end
  6. 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.