React Native Vibe Code SDK
Deployment

Environment Variables

Complete reference for React Native Vibe Code environment configuration

Required Variables

These variables are required for the application to function:

Database

VariableDescriptionExample
DATABASE_URLPostgreSQL connection string (Neon recommended)postgresql://user:pass@ep-xxx.neon.tech/db?sslmode=require

Authentication

VariableDescriptionExample
BETTER_AUTH_SECRETSession encryption key (min 32 chars)your-secret-key-here-min-32-chars
NEXT_PUBLIC_APP_URLLocal development URLhttp://localhost:3000
NEXT_PUBLIC_PROD_URLProduction URLhttps://capsule-ide.vercel.app

AI Services

VariableDescriptionExample
ANTHROPIC_API_KEYAnthropic Claude API keysk-ant-...

Sandboxing

VariableDescriptionExample
E2B_API_KEYE2B sandbox API keye2b_...
E2B_SANDBOX_TIMEOUT_MSSandbox timeout in milliseconds3600000 (1 hour)

Real-time Communication

VariableDescriptionExample
NEXT_PUBLIC_PUSHER_APP_KEYPusher app key (public)abc123...
PUSHER_APP_IDPusher app ID123456
PUSHER_APP_SECRETPusher app secretxyz789...
NEXT_PUBLIC_PUSHER_CLUSTERPusher cluster regionus2

Optional Variables

These variables enable additional features:

Google OAuth

VariableDescriptionExample
GOOGLE_CLIENT_IDGoogle OAuth client ID...apps.googleusercontent.com
GOOGLE_CLIENT_SECRETGoogle OAuth client secretGOCSPX-...

Polar Billing

VariableDescriptionExample
POLAR_ACCESS_TOKENPolar.sh API access tokenpolar_...
POLAR_WEBHOOK_SECRETWebhook signature verificationwhsec_...
NEXT_PUBLIC_POLAR_JUNIOR_PRODUCT_IDJunior tier product IDprod_...
NEXT_PUBLIC_POLAR_MIDDLE_PRODUCT_IDMiddle tier product IDprod_...
NEXT_PUBLIC_POLAR_SENIOR_PRODUCT_IDSenior tier product IDprod_...

Additional AI Services

VariableDescriptionExample
OPENAI_API_KEYOpenAI API key (for DALL-E, Whisper)sk-...
DEEPGRAM_API_KEYDeepgram API key (live transcription)dg_...

Voice Recording

VariableDescriptionDefault
NEXT_PUBLIC_REALTIME_VOICEUse live Deepgram transcriptiontrue

Background Jobs

VariableDescriptionExample
INNGEST_EVENT_KEYInngest event publishing key...
INNGEST_SIGNING_KEYInngest webhook signing keysignkey-...

GitHub Integration

VariableDescriptionExample
GITHUB_TOKENPersonal access token for Git operationsghp_...
GITHUB_OWNERDefault GitHub organization/usercapsule-this

Expo/EAS

VariableDescriptionExample
EXPO_TOKENExpo access token for buildsexpo_...

Convex Integration

VariableDescriptionExample
CONVEX_OAUTH_CLIENT_IDConvex OAuth client ID...
CONVEX_OAUTH_CLIENT_SECRETConvex OAuth client secret...
CONVEX_TEAM_SCOPED_TOKENTeam API token for provisioning...
CONVEX_TEAM_SLUGConvex team identifieryour-team

Development Options

VariableDescriptionDefault
LOCAL_DEPLOYMENT_MODEEnable local deployment modefalse
LOCAL_EXPO_APP_PATHPath to local Expo app-
NEXT_PUBLIC_DISABLE_REFOCUS_CHECKDisable auto health checksfalse
CHAT_HISTORY_LIMITMax messages to load from history10

Vercel Configuration

When deploying to Vercel, add environment variables in your project settings:

  1. Go to your project in the Vercel Dashboard
  2. Navigate to Settings → Environment Variables
  3. Add each variable for the appropriate environments (Production, Preview, Development)

Automatic Variables

These are automatically set by Vercel and don't need manual configuration:

VariableDescription
VERCELSet to 1 when running on Vercel
VERCEL_ENVproduction, preview, or development
VERCEL_URLAuto-generated deployment URL
BLOB_READ_WRITE_TOKENVercel Blob access token (when Blob is enabled)

Storage Integration

When you add Vercel Blob storage to your project:

  1. Go to Storage tab in your project
  2. Click Create Database → Blob
  3. The BLOB_READ_WRITE_TOKEN is automatically injected

Local Development

Create a .env.local file in the project root:

# Copy the example file
cp .env.example .env.local

# Edit with your values
nano .env.local

Minimal Local Setup

For basic local development, you need at minimum:

# Database
DATABASE_URL="postgresql://..."

# Auth
BETTER_AUTH_SECRET="at-least-32-characters-long-secret"
NEXT_PUBLIC_APP_URL="http://localhost:3000"

# AI
ANTHROPIC_API_KEY="sk-ant-..."

# Sandbox
E2B_API_KEY="e2b_..."

# Pusher (for real-time updates)
NEXT_PUBLIC_PUSHER_APP_KEY="..."
PUSHER_APP_ID="..."
PUSHER_APP_SECRET="..."
NEXT_PUBLIC_PUSHER_CLUSTER="..."

Security Notes

  1. Never commit secrets - Use .env.local (gitignored) for local development
  2. Use environment-specific values - Different API keys for dev/staging/prod
  3. Rotate secrets regularly - Especially after team member changes
  4. Limit access - Only grant necessary permissions for each API key
  5. Monitor usage - Set up alerts for unusual API usage

Troubleshooting

Missing Environment Variables

If you see errors about missing variables:

  1. Check Vercel Dashboard → Settings → Environment Variables
  2. Ensure variables are set for the correct environment (Production/Preview/Development)
  3. Redeploy after adding new variables

Variable Not Available in Browser

Variables must be prefixed with NEXT_PUBLIC_ to be available in client-side code:

# Server-only (API routes, server components)
ANTHROPIC_API_KEY="..."

# Available in browser
NEXT_PUBLIC_APP_URL="..."

Vercel Blob Not Working

  1. Ensure Blob storage is created in Vercel Dashboard
  2. Check that the project is linked to the storage
  3. Verify BLOB_READ_WRITE_TOKEN is present in environment

On this page