npm install -g vercel
vercel --prod
# Or: connect GitHub repo on vercel.com
# → Auto-deploy on push to main
# Set environment variable:
# VITE_API_URL=https://api.pixelcraft.dev
# Vercel:
# - Builds your React app
# - Serves from global CDN (edge nodes)
# - Automatic HTTPS
# - Preview URLs for every PR
# Connect GitHub repo on railway.app
# Railway detects Node.js, builds, deploys
# Set environment variables:
DATABASE_URL=mongodb+srv://...
JWT_SECRET=your-64-char-random-secret
REDIS_URL=redis://...
RESEND_API_KEY=re_...
NODE_ENV=production
FRONTEND_URL=https://pixelcraft.dev
# Add health check endpoint:
app.get('/api/health', (req, res) => {
res.json({
status: 'ok',
uptime: process.uptime(),
timestamp: new Date().toISOString(),
});
});
# mongodb.com/atlas → Create free cluster
# 1. Create database user
# (strong random password)
# 2. Network access:
# Whitelist Railway's IP range
# (or 0.0.0.0/0 for free tier)
# 3. Get connection string:
# mongodb+srv://user:pass@cluster.mongodb.net/pixelcraft
# 4. Set as DATABASE_URL in Railway
# Atlas provides:
# - Automatic backups
# - Monitoring dashboard
# - Performance advisor
# - Free 512MB tier
# Buy domain: pixelcraft.dev
# (Namecheap, Cloudflare, Google)
# DNS records:
# pixelcraft.dev
# → CNAME → cname.vercel-dns.com
# (frontend)
# api.pixelcraft.dev
# → CNAME → your-app.railway.app
# (backend)
# Automatic HTTPS:
# Vercel + Railway both provision
# TLS certificates via Let's Encrypt.
# No configuration needed.
[✅] CORS configured for
production domain
[✅] Environment variables set
correctly
[✅] Database connection works
[✅] Auth flow works end-to-end
[✅] File upload works
[✅] HTTPS verified
(no mixed content)
[✅] Error tracking integrated
[✅] Health check responds
# Open https://pixelcraft.dev
# on your phone. It works.
git switch -c devops/PIXELCRAFT-082-deploy
git add vercel.json railway.toml
git commit -m "Deploy to production: Vercel + Railway + Atlas (PIXELCRAFT-082)"
git push origin devops/PIXELCRAFT-082-deploy
# PR → Review → Merge → Auto-deploy ✅
DNS is the phone book of the internet.
When you type pixelcraft.dev, your browser queries a global distributed database spanning millions of servers to resolve it to an IP address.