DocsDeploymentDeployment Guide

Deployment Guide

Deploy Shipfastai to production with confidence.

Recommended Stack

Frontend: Vercel

Backend: Railway

Database: Supabase (managed)

Deploying Frontend to Vercel

1. Connect Repository

1. Go to [vercel.com](https://vercel.com)

2. Click "New Project"

3. Import your GitHub repository

4. Select the frontend directory as root

2. Configure Environment

Add these environment variables in Vercel:

NEXT_PUBLIC_SUPABASE_URL=https://xxx.supabase.co

NEXT_PUBLIC_SUPABASE_ANON_KEY=xxx

NEXT_PUBLIC_API_URL=https://your-backend.railway.app

NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live_xxx

3. Deploy

Click "Deploy" and wait for build to complete.

Deploying Backend to Railway

1. Create Project

npm install -g @railway/cli

railway login

railway init

2. Configure

Create railway.toml:

[build]

builder = "DOCKERFILE"

[deploy]

healthcheckPath = "/health"

restartPolicyType = "ON_FAILURE"

3. Add Environment Variables

railway variables set SUPABASE_URL=xxx

railway variables set STRIPE_SECRET_KEY=xxx

railway variables set OPENAI_API_KEY=xxx

4. Deploy

railway up

Domain Setup

Frontend (Vercel)

1. Go to Project Settings > Domains

2. Add your domain (e.g., Shipfastai.dev)

3. Configure DNS as instructed

Backend (Railway)

1. Go to Settings > Domains

2. Add custom domain (e.g., api.Shipfastai.dev)

3. Update CORS settings in backend

Post-Deployment

Update Stripe Webhooks

1. Go to Stripe Dashboard > Webhooks

2. Update endpoint URL to production

3. Get new webhook secret

Update OAuth Callbacks

Update redirect URLs in:

Supabase Auth settings

Google/GitHub OAuth apps

Enable Monitoring

1. Add Sentry for error tracking

2. Enable Vercel Analytics

3. Set up uptime monitoring