Stack: Vercel (frontend) · Railway (backend) · Supabase (database) · Upstash (Redis)
- Create a new Supabase project
- Go to Settings → Database → Connection string → URI
- Copy the URI — it looks like:
postgresql://postgres:[PASSWORD]@db.[PROJECT_REF].supabase.co:5432/postgres - Append
?sslmode=requireto the end - This becomes your
DATABASE_URL
After backend is deployed, run once:
# From apps/api directory (with DATABASE_URL set)
npx prisma db push
npx ts-node prisma/seed.ts
npx ts-node prisma/seed-demo.tsOr via Railway CLI:
railway run npx prisma db push
railway run npx ts-node prisma/seed.ts
railway run npx ts-node prisma/seed-demo.ts- Create a new Redis database at upstash.com
- Go to Details → Connect → ioredis — copy the URL
- It will start with
rediss://(TLS) — use this exactly asREDIS_URL
- Connect your GitHub repo to Railway
- Set root directory to
/(the monorepo root — Railway readsapps/api/Dockerfile) - Or use Railway CLI:
railway upfrom repo root
DATABASE_URL=postgresql://postgres:[PW]@db.[REF].supabase.co:5432/postgres?sslmode=require
JWT_SECRET=<random 64-char string>
JWT_EXPIRES_IN=7d
GITHUB_CLIENT_ID=<your OAuth app client ID>
GITHUB_CLIENT_SECRET=<your OAuth app secret>
GITHUB_WEBHOOK_SECRET=<random string>
GITHUB_TOKEN=<personal access token with repo scope>
ANTHROPIC_API_KEY=<your key>
REDIS_URL=rediss://default:[PW]@[HOST].upstash.io:6379
FRONTEND_URL=https://your-app.vercel.app
NODE_ENV=production
STRIPE_SECRET_KEY=sk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...
STRIPE_PRO_PRICE_ID=price_...
Railway sets
PORTautomatically — do NOT override it.
After deploy: GET https://your-api.railway.app/health → {"status":"ok"}
- Go to GitHub → Settings → Developer settings → OAuth Apps
- Update (or create) your OAuth App:
- Homepage URL:
https://your-app.vercel.app - Authorization callback URL:
https://your-api.railway.app/auth/github/callback
- Homepage URL:
- Copy Client ID →
GITHUB_CLIENT_ID(both Railway and Vercel) - Copy Client Secret →
GITHUB_CLIENT_SECRET(Railway only)
- Go to your NovaTech CRM repo → Settings → Webhooks
- Update the Payload URL to:
https://your-api.railway.app/webhooks/github - Content type:
application/json - Secret: must match
GITHUB_WEBHOOK_SECRETin Railway
- Import repo from GitHub in Vercel dashboard
- Set Root Directory to
apps/web - Framework preset: Next.js (auto-detected)
NEXT_PUBLIC_API_URL=https://your-api.railway.app
NEXT_PUBLIC_GITHUB_CLIENT_ID=<same as Railway GITHUB_CLIENT_ID>
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live_...
-
GET /healthreturns{"status":"ok"} - GitHub OAuth login works (redirects back to frontend)
-
GET /employer/dashboard/statsreturns candidate data (no auth required) -
GET /employer/candidates/demo-user-ahmed-khan-001returns Ahmed's profile -
POST /employer/candidates/comparereturns all 3 with recommendations -
/employer/demo→ Reset Demo Data → success message - Dashboard loads real candidates (no mock data)
- Candidate detail page loads for each demo candidate
Before any investor meeting, visit:
https://your-app.vercel.app/employer/demo
Click Reset Demo Data → green checkmark → Go to Dashboard