Skip to content

๐Ÿ—๏ธ Prepare Build

Complete environment setup and run the setup script.

โš ๏ธ Before proceeding: Make sure you have completed ALL previous setup steps:

โœ… Supabase - Database and authentication configured
โœ… Expo Notifications - Push notifications set up
โœ… Revenue Cat - Subscription management configured
โœ… Sentry - Error tracking linked
โœ… Stripe - Payment processing set up (or removed if not needed)
โœ… Resend - Email service configured
โœ… Apple Authentication - Apple Sign-In configured (if using)
โœ… Google Authentication - Google Sign-In configured (if using)

Missing any step will cause build or runtime errors.

๐Ÿ”ง Verify Your Environment Files

1. Expo Access Token (Required)

Required for Edge Functions and push notifications:
  1. Go to Expo Access Tokens
  2. Create new token
  3. Add to supabase/functions/.env:
EXPO_ACCESS_TOKEN=your-expo-access-token

2. Google Client ID (Required)

Required for Google authentication: You should already have this from step 4, but if missing:

  1. Go to Google Cloud Console
  2. APIs & Services โ†’ Credentials
  3. Add to .env.local:
EXPO_PUBLIC_GOOGLE_CLIENT_ID=your-google-client-id

3. OpenAI API (Optional)

For AI features:

  1. Go to OpenAI Platform
  2. Create API key
  3. Add to supabase/functions/.env:
OPENAI_API_KEY=sk-proj-your-openai-key

Make sure both your environment files are properly configured with all the keys from the previous steps.

โœ… Complete Environment File

Your final .env.local should include all these variables:

# --- Supabase ---
EXPO_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
EXPO_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key

# --- Stripe (optional) ---
EXPO_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_your-key

# --- RevenueCat ---
REVENUECAT_API_KEY=your-revenuecat-key
EXPO_PUBLIC_RC_IOS_KEY=appl_your-ios-key
EXPO_PUBLIC_REVENUECAT_ANDROID_KEY=goog_your-android-key
EXPO_PUBLIC_RC_SUBSCRIPTION_NAME=premium_monthly

# --- Sentry ---
EXPO_PUBLIC_SENTRY_DSN=https://your-dsn@sentry.io/project-id
SENTRY_DISABLE_AUTO_UPLOAD=true
SENTRY_AUTH_TOKEN=sntryu_your-token

# --- Google ---
EXPO_PUBLIC_GOOGLE_CLIENT_ID=your-google-id

Your supabase/functions/.env should include:

# --- Resend (optional) ---
RESEND_API_KEY=re_your-key
RESEND_FROM_EMAIL=your-email@domain.com

# --- OpenAI (optional) ---
OPENAI_API_KEY=sk-proj_your-key

# --- Expo ---
EXPO_ACCESS_TOKEN=your-expo-token

# --- Stripe (optional) ---
STRIPE_SECRET_KEY=sk_test_your-key
STRIPE_WEBHOOKS_SECRET=whsec_your-secret

# --- Auth providers ---
SUPABASE_AUTH_EXTERNAL_APPLE_SECRET=your-apple-jwt-token
SUBASE_AUTH_GOOGLE_ID=your-google-web-client-id

๐Ÿ’ก Production Builds: For production builds, you'll need to add ALL your environment variables to expo.dev โ†’ Your Project โ†’ Settings โ†’ Environment variables.

โ˜๏ธ Deploy to Supabase Cloud (Optional)

If you want to deploy your local setup to Supabase Cloud:

# Deploy your local secrets to Supabase cloud
supabase secrets set --env-file supabase/functions/.env
 
# Deploy your Edge Functions to cloud
supabase functions deploy

Note: Make sure your supabase/functions/.env file is properly configured with all necessary API keys before running the setup.

๐Ÿ“ฑ Build and Test

1. Prebuild Native Code

First, generate the native code:

# Clean rebuild to ensure all configurations are applied
npx expo prebuild --clean

2. Build Your App

# Build for development
eas build --platform ios --profile development
 
# Or build for production
eas build --platform ios --profile production

3. Test Your App

Once built, install the app on your device and test:

  • โœ… Authentication (sign up/login)
  • โœ… Database sync
  • โœ… Push notifications
  • โœ… Subscription flows
  • โœ… Error reporting

๐ŸŽฏ Ready for Development!

Your ExpoBase is now fully configured and ready for development!


๐ŸŽ‰ Setup Complete!

Step 11/11 Complete โœ…

Your ExpoBase app is fully configured and ready to build amazing features!

Happy coding! ๐Ÿš€