Summary
Production blocker: configure managed MySQL and wire DATABASE_URL on Vercel so the API can persist users, credit events, and platforms.
Without this, /health/ready returns 503 and all Prisma routes fail.
Current state
| Check |
Result |
GET https://zcore-api.vercel.app/health |
503 degraded — DATABASE_URL missing |
| Vercel env (zcore-api) |
ADMIN_SECRET, STELLAR_NETWORK only |
Local npm run setup |
Works with Docker MySQL |
Steps
1. Provision MySQL 8.x
Options: PlanetScale, Railway, Aiven, Neon (MySQL mode), or RDS.
Requirements: SSL, reachable from Vercel serverless.
2. Set Vercel env vars (project zcore-api)
| Variable |
Required |
Notes |
DATABASE_URL |
Yes |
mysql://user:pass@host:3306/zcore?sslaccept=strict |
JWT_SECRET |
Yes |
Random secret for wallet sessions (#35 merged) |
ADMIN_SECRET |
Yes |
Rotate from dev default |
STELLAR_NETWORK |
Yes |
testnet for now |
Optional: UPSTASH_REDIS_REST_URL, UPSTASH_REDIS_REST_TOKEN, METRICS_SECRET.
3. Run migrations
cd Server
DATABASE_URL="mysql://..." npx prisma migrate deploy
npm run prisma:seed # optional: demo lenders/platforms
4. Verify production
curl https://zcore-api.vercel.app/health/ready # 200
curl -X POST https://zcore-api.vercel.app/api/auth/challenge \
-H "Content-Type: application/json" \
-d '{"walletAddress":"G..."}'
Acceptance criteria
Related
Summary
Production blocker: configure managed MySQL and wire
DATABASE_URLon Vercel so the API can persist users, credit events, and platforms.Without this,
/health/readyreturns 503 and all Prisma routes fail.Current state
GET https://zcore-api.vercel.app/healthDATABASE_URLmissingADMIN_SECRET,STELLAR_NETWORKonlynpm run setupSteps
1. Provision MySQL 8.x
Options: PlanetScale, Railway, Aiven, Neon (MySQL mode), or RDS.
Requirements: SSL, reachable from Vercel serverless.
2. Set Vercel env vars (project
zcore-api)DATABASE_URLmysql://user:pass@host:3306/zcore?sslaccept=strictJWT_SECRETADMIN_SECRETSTELLAR_NETWORKtestnetfor nowOptional:
UPSTASH_REDIS_REST_URL,UPSTASH_REDIS_REST_TOKEN,METRICS_SECRET.3. Run migrations
4. Verify production
Acceptance criteria
/health/readyreturnsconnected: trueUserrowServer/prisma/migrations/Docs/vercel-deploy.md(no values committed)Related