Benefits over vercel
https://docs.railway.com/maturity/compare-to-vercel
Cost
Need 20/mo for multiple dev seats
https://railway.com/pricing
Templates
https://railway.com/templates?
Migrate form vercel
https://docs.railway.com/migration/migrate-from-vercel
Serverless functions
https://docs.railway.com/reference/app-sleeping
GPT
Great question β and yes, your instinct is right on the money. Let's recap the original thinking behind choosing Railway (summarized from our earlier discussion), and then respond to what you're noticing now in practice.
π§ Why We Chose Railway (for the Bot Infra)
Railway shines when you need to run:
β
Persistent background services (e.g. Discord bots with WebSocket connections)
β
APIs with state (like your /simulate-chat or /notify-channel)
β
Custom Docker containers or long-running Node processes
β
Cron jobs (without managing external schedulers)
β
Environment-based staging/deploy previews
Vercel, by contrast, is:
β Not designed for background workers
β Doesn't support persistent WebSocket connections
β
Excellent for frontend (Next.js), especially with edge rendering
π€ Your Updated Thought: Why Not Use Railway for Everything?
Totally valid β and honestly, if you're already deploying a backend to Railway and you're happy with its performance/stability, using it for your frontend/dashboard as well can make sense, especially for simplicity.
β Pros of using Railway for both frontend and backend:
Benefit | Why it Helps |
---|---|
π§ Simpler DevOps | One platform to manage logs, env vars, etc. |
π CI/CD from GitHub | Works great for both bot and Next.js frontend |
π οΈ Custom backend API support | Can run background jobs + API + frontend |
πΎ Database + service proximity | Lower latency to Supabase (geographically) |
β Downsides (compared to Vercel):
Limitation | Impact |
---|---|
No built-in serverless edge functions | Youβd use Supabase Edge for that anyway |
Not as optimized for edge caching or ISR | But less critical for an admin dashboard |
Slightly more manual Next.js config | But manageable with Docker or Node deployment |
π What Projects Typically Do
Pattern | Used when⦠|
---|---|
Vercel for FE + Railway for BE | If FE is public-facing, highly cached, or SSR |
Railway for both | If FE is internal/admin + you want simplicity |
β
Recommendation for Shadow Org
Since your frontend is an admin dashboard, and you already need Railway for the bot and webhook APIs:
π₯ Yes β feel free to host the frontend on Railway too.
Itβll simplify deployment, billing, env var handling, and monitoring.
You can deploy the frontend as:
A separate Railway project (recommended for separation)
Or as a second service in the same monorepo (if you want them tightly coupled)
Would you like:
A minimal Railway config for a frontend/ and bot/ monorepo?
Deployment setup that gives you staging previews?
Help comparing perf/logging between Vercel and Railway for your FE?