Skip to content

Latest commit

 

History

History
142 lines (107 loc) · 3.66 KB

File metadata and controls

142 lines (107 loc) · 3.66 KB

Deployment Guide for Open Operator

🏗️ Architecture Overview

open-operator.io          → Landing page (separate repo)
app.open-operator.io      → This repo (authenticated app)

📋 Pre-Deployment Checklist

1. Domain Setup

  • Purchase open-operator.io domain
  • Add domain to Vercel project
  • Configure DNS records for subdomain

2. Supabase Configuration

Dashboard Settings (Authentication > URL Configuration):

  • Site URL: https://app.open-operator.io
  • Redirect URLs:
    https://app.open-operator.io/auth/callback
    https://app.open-operator.io/**
    http://localhost:3000/** (for development)
    

OAuth Provider Settings:

  • GitHub: Callback URL = https://your-project-ref.supabase.co/auth/v1/callback
  • Google: Authorized redirect URI = https://app.open-operator.io/auth/callback

3. Vercel Environment Variables

Set these in Vercel dashboard for production:

# Supabase
NEXT_PUBLIC_SUPABASE_URL=https://your-project-ref.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key

# URLs
NEXT_PUBLIC_SITE_URL=https://app.open-operator.io
NEXT_PUBLIC_LANDING_URL=https://open-operator.io
NEXT_PUBLIC_APP_URL=https://app.open-operator.io

🚀 Deployment Steps

Step 1: Deploy to Vercel

# Connect this repo to Vercel
vercel --prod

# Or deploy via Vercel dashboard

Step 2: Configure Domain

  1. Go to Vercel dashboard → Project Settings → Domains
  2. Add app.open-operator.io
  3. Configure DNS as instructed

Step 3: Set Environment Variables

  1. Go to Vercel dashboard → Project Settings → Environment Variables
  2. Add all variables from checklist above
  3. Redeploy to apply changes

Step 4: Test Authentication Flow

  1. Visit https://app.open-operator.io/login
  2. Test email/password signup
  3. Test social login (GitHub, Google)
  4. Test password reset flow

🔗 Landing Page Integration

Landing Page Repo (Separate)

The landing page should include:

<!-- Call-to-action buttons -->
<a href="https://app.open-operator.io/signup">Get Started</a>
<a href="https://app.open-operator.io/login">Sign In</a>

User Flow:

Landing (open-operator.io) 
  → Click "Get Started" 
  → Signup (app.open-operator.io/signup)
  → Email confirmation 
  → Login → Dashboard (app.open-operator.io/chat)

🔒 Security Considerations

HTTPS & Security Headers

  • ✅ Automatic HTTPS via Vercel
  • ✅ Security headers configured in vercel.json
  • ✅ CORS properly configured for cross-domain auth

RLS Policies

  • ✅ Row Level Security enabled on all tables
  • ✅ Users can only access their own data
  • ✅ Team-based access properly configured

🐛 Troubleshooting

Common Issues:

Auth redirects to localhost:

  • Check NEXT_PUBLIC_SITE_URL is set to production URL
  • Update Supabase dashboard redirect URLs

OAuth providers not working:

  • Verify callback URLs in provider settings
  • Check Supabase OAuth provider configuration

CORS errors:

  • Ensure domains are added to Supabase allowed origins
  • Check vercel.json headers configuration

📊 Monitoring

Setup monitoring for:

  • Authentication errors
  • Database connection issues
  • API rate limits
  • User signup/login metrics

Vercel Analytics:

  • Enable Vercel Analytics for performance monitoring
  • Set up custom events for user actions

🔄 CI/CD Pipeline

Automatic Deployments:

  • Main branch → Production (app.open-operator.io)
  • Feature branches → Preview deployments
  • Pull requests → Preview with comments

Environment Variables by Branch:

  • Production: Use production Supabase project
  • Preview: Can use same project or separate staging project