- GitHub account
- Vercel account (for frontend)
- Railway account (sign up with GitHub at railway.app)
- Sign up: Go to railway.app and sign in with GitHub
- Deploy: Click "New Project" → "Deploy from GitHub repo" → Select your repository
- Wait: Railway automatically builds and deploys your API (~2 minutes)
- Done: Your API is live at
https://your-api.up.railway.app
- In your Railway project, click "New" → "Database" → "PostgreSQL"
- Copy the connection string from the database service
- Add it to your API's environment variables
In Railway dashboard → Your API Service → Variables:
DATABASE_URL=postgresql://postgres:password@host:port/railway
JWT_SECRET=your-super-secret-key
NEXT_PUBLIC_APP_URL=https://your-vercel-app.vercel.app
NODE_ENV=production
PORT=4000- Connect your GitHub repo to Vercel
- Add environment variable:
NEXT_PUBLIC_API_URL=https://your-api.up.railway.app
- Deploy!
The following files are included to optimize Railway deployment:
Tells Railway how to build and deploy your Turborepo API.
- Cost: ~$1-2/month (within free tier)
- Setup: One click in Railway dashboard
- Integrated: Automatic connection string
- $5 credit monthly (resets each month)
- 512MB RAM, 1 vCPU
- 1GB disk, 100GB bandwidth
- API: $2-3/month
- Database: $1-2/month
- Total: $3-5/month (within free tier!)
- Railway Dashboard → Your Service → "Logs" tab
- Real-time logs with filtering and search
- Download logs for analysis
- Railway automatically monitors
/healthendpoint - View uptime and response times in dashboard
- CPU, memory, and network usage
- Request counts and response times
- Error rates and status codes
- Push to main → Automatic deployment
- Pull requests → Optional preview deployments
- Rollbacks → One-click rollback to previous versions
- Railway detects push to main branch
- Runs
pnpm install && pnpm build --filter=@hackathon/api - Starts API with
cd apps/api && node dist/main.js - Health check on
/healthendpoint - Routes traffic to new deployment