๐๏ธ 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)
๐ง Verify Your Environment Files
1. Expo Access Token (Required)
Required for Edge Functions and push notifications:- Go to Expo Access Tokens
- Create new token
- 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:
- Go to Google Cloud Console
- APIs & Services โ Credentials
- Add to
.env.local
:
EXPO_PUBLIC_GOOGLE_CLIENT_ID=your-google-client-id
3. OpenAI API (Optional)
For AI features:
- Go to OpenAI Platform
- Create API key
- 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! ๐