- ✅ Builder: NIXPACKS
- ✅ Build command:
npm run build - ✅ Start command:
npm start(uses standalone server) - ✅ Restart policy: ON_FAILURE with 10 retries
- ✅ Node.js version: 20
- ✅ Install phase:
npm ci --ignore-scripts+npm run db:generate - ✅ Build phase:
npm run build - ✅ Start command:
npm start
- ✅ Standalone output enabled:
output: 'standalone' - ✅ CSP headers configured for Reown/WalletConnect
- ✅ React strict mode enabled
- ✅
build:next build(creates standalone output) - ✅
start:node .next/standalone/server.js(correct for Railway) - ✅
db:generate:prisma generate(runs during build)
- ✅ Next.js standalone server automatically reads
PORTfrom environment - ✅ Railway sets
PORTautomatically (usually 8080) - ✅ No hardcoded ports in code
- ✅ Prisma schema uses PostgreSQL provider
- ✅
DATABASE_URLread from environment (Railway auto-sets this) - ✅ Prisma client generated during build phase
- ✅ Database connection handled in
lib/prisma.ts
- ✅ Health endpoint:
/api/health - ✅ Returns:
{ status: 'ok', timestamp, uptime } - ✅ Available for Railway health checks
-
DATABASE_URL
- ✅ Automatically set by Railway when PostgreSQL is added
- ✅ Format:
postgresql://user:password@host:port/database
-
NEXT_PUBLIC_REOWN_PROJECT_ID
- ✅ Required for Reown AppKit
- ✅ Get from: https://dashboard.reown.com
- ✅ Must be set before build
-
NEXT_PUBLIC_APP_URL
- ✅ Your Railway app URL (e.g.,
https://your-app-name.up.railway.app) - ✅ Used for metadata and redirects
- ✅ Must match Railway domain
- ✅ Your Railway app URL (e.g.,
-
NODE_ENV
- ✅ Set to
productionin Railway - ✅ Affects logging and optimizations
- ✅ Set to
-
NEXTAUTH_URL
- ✅ Same as
NEXT_PUBLIC_APP_URL - ✅ Used for authentication callbacks
- ✅ Same as
-
NEXTAUTH_SECRET
- ✅ Generate with:
openssl rand -base64 32 - ✅ Used for session encryption
- ✅ Generate with:
- ✅ Build tested locally: SUCCESS
- ✅ Standalone output created:
.next/standalone/ - ✅ All pages compile correctly
- ✅ No build errors or warnings (except expected React Native dependency warning)
- ✅ TypeScript compilation: No errors
- ✅ ESLint: No errors
- ✅ React hooks: Properly configured with useCallback
- ✅ Error handling: Proper try-catch blocks
- ✅ Environment variable validation: Project ID checked at build time
-
Pre-deployment:
- Code pushed to GitHub
- Railway project created
- PostgreSQL database added (user confirmed)
- Environment variables set in Railway dashboard
-
Deployment:
- Railway detects Next.js and builds automatically
- Build completes successfully
- Server starts on Railway's PORT
- Health check passes
-
Post-deployment:
- Verify app loads at Railway URL
- Test wallet connection
- Test user creation
- Test profile features
- Update Reown dashboard with Railway domain
-
Environment Variables:
- Must be set BEFORE deployment
NEXT_PUBLIC_REOWN_PROJECT_IDis checked at build time- If missing, build will fail with clear error
-
Reown Dashboard:
- Must add Railway domain to allowed origins
- Update homepage URL to Railway domain
- This prevents CSP errors
-
Database:
- PostgreSQL is already initialized (user confirmed)
DATABASE_URLis auto-set by Railway- No manual migration needed (Prisma handles schema)
-
Port:
- Railway sets
PORTautomatically - Next.js standalone reads it automatically
- No configuration needed
- Railway sets
Status: ✅ READY
All configuration files are correct. The application will:
- Build successfully with Nixpacks
- Start the standalone Next.js server
- Connect to PostgreSQL automatically
- Listen on Railway's PORT
- Serve health checks at
/api/health
Next Steps:
- Set environment variables in Railway dashboard
- Deploy (automatic on push or manual trigger)
- Verify deployment
- Update Reown dashboard with Railway domain