Summary
Verify and fix wallet signature authentication end-to-end in production after #15 (DATABASE_URL) is configured.
Code is merged (SEP-53 challenge, JWT sessions, rate limits). Production auth still fails without DB and needs a final QA pass.
Implemented (do not re-build)
Layer
Files
Challenge + verify
Server/src/services/auth-challenge.service.ts
JWT sessions
Server/src/services/session.service.ts, session.middleware.ts
Auth routes
POST /api/auth/challenge, /register/signed, /login/signed
Front
Front/lib/wallet-kit.ts, wallet-auth-card.tsx, auth.ts, api-client.ts
Tests
Server/src/services/__tests__/verifyWalletSignature.test.ts, integration tests in CI
Production checklist
Provision production MySQL and configure DATABASE_URL on Vercel #15 done — DATABASE_URL + JWT_SECRET on Vercel
Redeploy zcore-api and dapp-zcore
Confirm NEXT_PUBLIC_API_BASE_URL=https://zcore-api.vercel.app
Confirm NEXT_PUBLIC_STELLAR_NETWORK=testnet matches Freighter network
Full flow: connect wallet → sign challenge → land on /dashboard with JWT in sessionStorage
Acceptance criteria
How to verify locally
npm run setup
npm run dev:server
npm run dev:front
# Use Freighter testnet wallet at http://localhost:3001/register
Out of scope
Summary
Verify and fix wallet signature authentication end-to-end in production after #15 (DATABASE_URL) is configured.
Code is merged (SEP-53 challenge, JWT sessions, rate limits). Production auth still fails without DB and needs a final QA pass.
Implemented (do not re-build)
Server/src/services/auth-challenge.service.tsServer/src/services/session.service.ts,session.middleware.tsPOST /api/auth/challenge,/register/signed,/login/signedFront/lib/wallet-kit.ts,wallet-auth-card.tsx,auth.ts,api-client.tsServer/src/services/__tests__/verifyWalletSignature.test.ts, integration tests in CIProduction checklist
DATABASE_URL+JWT_SECRETon Vercelzcore-apianddapp-zcoreNEXT_PUBLIC_API_BASE_URL=https://zcore-api.vercel.appNEXT_PUBLIC_STELLAR_NETWORK=testnetmatches Freighter network/dashboardwith JWT insessionStorageAcceptance criteria
201+data.token200+data.tokenGET /api/user/{wallet}/profilewithAuthorization: Bearerreturns 200401(not 500)CONTRIBUTING.mdHow to verify locally
npm run setup npm run dev:server npm run dev:front # Use Freighter testnet wallet at http://localhost:3001/registerOut of scope