5-Step Production Deployment Guide
1. Go to: https://dashboard.clerk.com
2. Enable production mode on "Project Achilles"
3. Add domains: projectachilles.io, api.projectachilles.io
4. Configure OAuth (Google, Microsoft, GitHub) for production
5. Copy: pk_live_... and sk_live_...
OAuth Setup Summary:
- Google: console.cloud.google.com → Create OAuth client → Add Clerk redirect URI
- Microsoft: portal.azure.com → Register app → Add Clerk redirect URI → Create secret
- GitHub: github.com/settings/developers → New OAuth app → Add Clerk callback URL
1. Go to: https://railway.app → New Project → From GitHub
2. Select: projectachilles/ProjectAchilles
3. Configure backend service:
- Name: projectachilles-backend
- Root: /backend
4. Add Variables (Raw Editor):
CLERK_PUBLISHABLE_KEY=pk_live_YOUR_KEY_HERE
CLERK_SECRET_KEY=sk_live_YOUR_KEY_HERE
PORT=${{PORT}}
NODE_ENV=production
SESSION_SECRET=GENERATE_32_CHAR_RANDOM_STRING
CORS_ORIGIN=https://projectachilles.io
TESTS_SOURCE_PATH=../tests_sourceGenerate SESSION_SECRET:
openssl rand -base64 321. Configure frontend service:
- Name: projectachilles-frontend
- Root: /frontend
- Start Command: npm run preview -- --port $PORT --host 0.0.0.0
2. Add Variables (Raw Editor):
VITE_CLERK_PUBLISHABLE_KEY=pk_live_YOUR_KEY_HERE
VITE_API_URL=https://api.projectachilles.io
VITE_BACKEND_PORT=3000Frontend Service → Settings → Custom Domain:
Add: projectachilles.io
Backend Service → Settings → Custom Domain:
Add: api.projectachilles.io
Railway will show CNAME values like:
specific-value.up.railway.apporproxy.railway.app
CNAME Record 1:
Name: @ (or projectachilles.io)
Value: [Railway provided value for frontend]
TTL: 3600
CNAME Record 2:
Name: api
Value: [Railway provided value for backend]
TTL: 3600
Wait 15-60 minutes for DNS propagation
Check: https://dnschecker.org
# 1. Visit production URL
https://projectachilles.io
# 2. Test OAuth
- Sign in with Google
- Sign in with Microsoft
- Sign in with GitHub
# 3. Test API
curl https://api.projectachilles.io/api/health
# 4. Check browser console (F12)
- No errors?
- HTTPS working?
- Auth working?DNS not working? → Wait longer (up to 48 hours) → Check CNAME records are correct
OAuth failing? → Check production OAuth apps have correct redirect URIs → Verify pk_live_ and sk_live_ keys in Railway
CORS errors? → Check CORS_ORIGIN in backend variables → Redeploy backend after changing
502 errors? → Check Railway logs for build/startup errors → Verify environment variables are set
Check DNS:
dig projectachilles.io
dig api.projectachilles.ioTest API:
curl https://api.projectachilles.io/api/healthGenerate SESSION_SECRET:
openssl rand -base64 32
# OR
node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"- Clerk: https://dashboard.clerk.com
- Railway: https://railway.app
- Google OAuth: https://console.cloud.google.com/apis/credentials
- Microsoft OAuth: https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps
- GitHub OAuth: https://github.com/settings/developers
- DNS Checker: https://dnschecker.org
✅ https://projectachilles.io loads ✅ SSL certificate valid (padlock icon) ✅ Redirects to Clerk sign-in ✅ All 3 OAuth providers work ✅ Can access browser module ✅ No console errors ✅ API health check returns 200
Total Time: ~50 minutes (+ DNS propagation wait)
For detailed instructions, see: PRODUCTION_DEPLOYMENT.md