Deployment Guide
Deploy the complete Project Noir platform: the Next.js dashboard on Vercel, and the Python services on Railway.
Service Overview
Dashboard (Next.js)
Landing page, dashboard, all API routes
Vercel
Port Auto
Voice Agent (Python)
Pipecat voice pipeline, Twilio integration
Railway
Port 7860
Telegram Worker (Python)
Telethon client pool, message sending
Railway
Port 7861
Dashboard on Vercel
Vercel auto-detects Next.js -- zero configuration needed. Simply connect your repository and set environment variables.
Steps
- Connect the
telephonia-reactrepository to Vercel - Set all environment variables in the Vercel dashboard (see below)
- Deploy -- Vercel handles the build automatically
- Configure webhook URLs after deployment:
- Stripe:
https://yourdomain.com/api/webhook/stripe - LiqPay:
https://yourdomain.com/api/webhook/liqpay
- Stripe:
Do not set output: "standalone"in next.config.js -- that's only needed for Docker deployments.
Voice Agent on Railway
- Create a Railway project from the
voice-agentdirectory - Railway auto-detects the Dockerfile
- Set all environment variables (see table below)
- Service exposes on port 7860
- Set
BASE_URLto the Railway public URL - Configure Twilio incoming call webhook:
{BASE_URL}/twilio/incoming
Telegram Worker on Railway
- Create a Railway project from the
telegram-workerdirectory - Railway auto-detects the Dockerfile
- Set all environment variables (see table below)
- Service exposes on port 7861
Environment Variables
Next.js Dashboard
| Variable | Description |
|---|---|
| DATABASE_URL | Neon PostgreSQL connection string |
| NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY | Clerk publishable key |
| CLERK_SECRET_KEY | Clerk secret key |
| STRIPE_SECRET_KEY | Stripe API secret key |
| STRIPE_PUBLISHABLE_KEY | Stripe publishable key |
| STRIPE_WEBHOOK_SECRET | Stripe webhook signing secret |
| LIQPAY_PUBLIC_KEY | LiqPay public key (Ukraine payments) |
| LIQPAY_PRIVATE_KEY | LiqPay private key |
| TWILIO_ACCOUNT_SID | Twilio account SID |
| TWILIO_AUTH_TOKEN | Twilio auth token |
| RESEND_API_KEY | Resend email API key |
| OPENROUTER_API_KEY | OpenRouter API key (email generation) |
| RAILWAY_VOICE_AGENT_URL | Voice agent Railway URL |
| SENTRY_DSN | Sentry DSN for error tracking |
Voice Agent
| Variable | Description |
|---|---|
| DATABASE_URL | Neon PostgreSQL connection string |
| ORG_ID | Default organization ID for call attribution |
| DEEPGRAM_API_KEY | Deepgram STT API key |
| ELEVENLABS_API_KEY | ElevenLabs TTS API key |
| ELEVENLABS_VOICE_ID | Default ElevenLabs voice ID |
| OPENROUTER_API_KEY | OpenRouter API key (GPT-4o) |
| TWILIO_ACCOUNT_SID | Twilio account SID |
| TWILIO_AUTH_TOKEN | Twilio auth token |
| TWILIO_PHONE_NUMBER | Twilio phone number for outbound calls |
| BASE_URL | Public URL of this service |
| DAILY_API_KEY | Daily.co API key for WebRTC transport |
Telegram Worker
| Variable | Description |
|---|---|
| DATABASE_URL | Neon PostgreSQL connection string |
| MAX_DAILY_MESSAGES_PER_ACCOUNT | Daily message cap per account (default: 30) |
| MESSAGE_DELAY_MIN | Min seconds between sends (default: 30) |
| MESSAGE_DELAY_MAX | Max seconds between sends (default: 90) |
Deployment Checklist
All environment variables set in Vercel dashboard
Stripe webhook URL configured to /api/webhook/stripe
LiqPay webhook URL configured to /api/webhook/liqpay
Database schema pushed via drizzle-kit push
Voice agent deployed on Railway (port 7860)
RAILWAY_VOICE_AGENT_URL set in Vercel env
Twilio incoming call webhook set to voice agent BASE_URL/twilio/incoming
Telegram worker deployed on Railway (port 7861)
Clerk sign-in/sign-up redirect URLs configured
Sentry DSN configured for error monitoring