AUTOXSPARE Docs
API reference

Environment

Every variable the backend and storefront read.

Values live on Railway (backend) and Vercel (storefront). No secret belongs in this repository or in these docs.

Backend — Railway

Core

VariableNotes
DATABASE_URLManaged Postgres. Needs ssl.rejectUnauthorized = false in production.
REDIS_URLCache, event bus, workflow engine, locking
JWT_SECRET, COOKIE_SECRETSession signing
STORE_CORS, ADMIN_CORS, AUTH_CORSMust list every live domain
MEDUSA_BACKEND_URLInlined into the admin bundle at build time — changing it requires a redeploy, not a restart

Payments

VariableNotes
CURLEC_MODEtest or live. Defaults to live.
CURLEC_LIVE_KEY_ID, CURLEC_LIVE_KEY_SECRETUsed when mode is live
CURLEC_TEST_KEY_ID, CURLEC_TEST_KEY_SECRETUsed when mode is test
CURLEC_WEBHOOK_SECRETSeparate from the API secret

Shipping

VariableNotes
EASYPARCEL_API_KEYCurrently unset — this is what keeps EasyParcel off
EASYPARCEL_ENVdemo or live. Unset is treated as demo.

Social sign-in

Unset, which is why only emailpass is registered. Each provider needs its own client id and secret before it appears on the login screen.

Storefront — Vercel

VariableNotes
NEXT_PUBLIC_MEDUSA_BACKEND_URLhttps://api.autoxspare.com
NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEYStore publishable key
NEXT_PUBLIC_BASE_URLDrives canonical URLs, sitemap and JSON-LD. Set before pointing the apex domain.

vercel env add marks variables sensitive by default. A sensitive NEXT_PUBLIC_* cannot be read at build time, so the build silently falls back to a default and the wrong value ships without any error.

Scripts

Run with npx medusa exec ./src/scripts/<name>.ts from apps/backend. Several are dry-run by default and need an explicit flag to write:

ScriptGuard
enforce-myr.tsMYR_APPLY=1
check-admin-users.tsADMIN_RESET_EMAIL + ADMIN_RESET_PASSWORD to reset a password
normalise-vehicles.ts, import-weights.ts, setup-shipping-my.tsSee each file's header

On this page