Skip to content

๐Ÿš€ Init

Initialize your ExpoBase project with your app configuration using the automated setup script.

๐Ÿ“ฑ Run the Init Script

npm run init

This will start an interactive setup:

๐Ÿš€ App Initialization Script
================================
 
๐Ÿ“ฑ Bundle Identifier Setup
Format: com.yourcompany.yourapp
Example: com.foodieapp.mobile
 
Enter your new bundle identifier: com.test.app
Enter your app name (e.g., "My Awesome App"): testApp
Enter your app slug (e.g., "my-awesome-app"): test-app
 
๐Ÿ’ณ Stripe Payment Integration
Stripe allows you to process payments in your app
If you don't need payments, you can remove it to reduce bundle size
 
Do you want to use Stripe for payments? (y/N): n
 
๐Ÿ’ฐ Superwall Paywall Management
Superwall allows you to manage dynamic paywalls and A/B testing
If you don't need paywall management, you can remove it
 
Do you want to use Superwall for paywalls? (y/N): n
 
๐Ÿ›’ RevenueCat Subscription Management
RevenueCat manages in-app purchases and subscriptions
If you don't need subscriptions, you can remove it
 
Do you want to use RevenueCat for subscriptions? (y/N): n
 
๐Ÿ“‹ Configuration Summary:
App Name: testApp
App Slug: test-app
Bundle ID: com.test.app
Use Stripe: No
Use Superwall: No
Use RevenueCat: No
 
Proceed with this configuration? (y/N): y
 
๐Ÿ”ง Starting initialization...
๐Ÿ—‘๏ธ Removing .expo...
โœ… Removed .expo
 
๐Ÿšซ Removing Stripe integration...
๐Ÿ“ Removing Stripe from app.json...
โœ… Removed Stripe from app.json
๐Ÿ“ Removing Stripe from package.json...
โœ… Removed Stripe from package.json
๐Ÿ“ Removing Stripe from _layout.tsx...
โœ… Removed Stripe from _layout.tsx
๐Ÿ—‘๏ธ Removing Stripe-related files...
๐Ÿ—‘๏ธ Removing context/StripeContext.tsx...
โœ… Removed context/StripeContext.tsx
๐Ÿ—‘๏ธ Removing components/payment/PaymentSheet.tsx...
โœ… Removed components/payment/PaymentSheet.tsx
๐Ÿ—‘๏ธ Removing components/payment/stripeButtonPay.tsx...
โœ… Removed components/payment/stripeButtonPay.tsx
๐Ÿ“ Removing Stripe from payment/index.ts...
โœ… Removed Stripe exports from payment/index.ts
๐Ÿ“ Cleaning payment.tsx from Stripe code...
โœ… Cleaned payment.tsx - kept only RevenueCat
๐Ÿ—‘๏ธ Removing supabase/functions/create-payment-intent...
โœ… Removed supabase/functions/create-payment-intent
๐Ÿ—‘๏ธ Removing supabase/functions/create-stripe-checkout...
โœ… Removed supabase/functions/create-stripe-checkout
๐Ÿ—‘๏ธ Removing supabase/functions/stripe-webhooks...
โœ… Removed supabase/functions/stripe-webhooks
๐Ÿ—‘๏ธ Removing assets/logo/stripe.jpeg...
โœ… Removed assets/logo/stripe.jpeg
โœ… Removed all Stripe-related files
๐Ÿ“ฆ Uninstalling Stripe package...
โœ… Uninstalled Stripe package
โœ… Stripe integration removed successfully!
 
๐Ÿšซ Removing Superwall integration...
๐Ÿ“ Removing Superwall from _layout.tsx...
โœ… Removed Superwall from _layout.tsx
๐Ÿ—‘๏ธ Removing context/SuperwallProvider.tsx...
โœ… Removed context/SuperwallProvider.tsx
๐Ÿ“ Removing Superwall from app.json...
โœ… Removed Superwall from app.json
โœ… Superwall integration removed successfully!
 
๐Ÿšซ Removing RevenueCat integration...
๐Ÿ“ Removing RevenueCat from _layout.tsx...
โœ… Removed RevenueCat from _layout.tsx
โœ… RevenueCat integration removed from _layout.tsx!
๐Ÿ“ Updating app.json...
โœ… Updated app.json
๐Ÿ“ Updating package.json...
โœ… Updated package.json
๐Ÿ” Updating identifiers throughout the project...
โœ… Updated 0 files with new identifiers
๐Ÿ“ Updating supabase/config.toml...
โœ… Updated supabase/config.toml
 
๐ŸŽ‰ Initialization completed successfully!
 
๐Ÿ“‹ Next Steps:
1. Run: npm install (to clean up dependencies)
2. Run: npx expo prebuild (to generate native code)
3. Run: eas init (to initialize EAS project)
4. Configure your environment variables
5. Set up your authentication providers
 
๐Ÿ’ณ Stripe Integration Removed:
โ€ข All Stripe-related files and configurations have been removed
โ€ข You can always add Stripe back later if needed
 
๐Ÿ’ฐ Superwall Integration Removed:
โ€ข Superwall context and wrapper have been removed from _layout.tsx
โ€ข You can always add Superwall back later if needed
 
๐Ÿ›’ RevenueCat Integration Removed:
โ€ข RevenueCat context and wrapper have been removed from _layout.tsx
โ€ข You can always add RevenueCat back later if needed
 
โš ๏ธ Important Notes:
โ€ข EAS project ID and owner have been cleared
โ€ข Update your environment variables accordingly

๐Ÿ”ง What the Script Does

The script automatically:

  • Cleans previous configuration and cache (removes .expo folder)
  • Updates your app name, slug, and bundle identifier throughout the project
  • Configures Stripe integration (asks if you want to use it)
    • If No: Removes all Stripe files, dependencies, and configurations
    • If Yes: Keeps Stripe integration for payments
  • Configures Superwall integration (asks if you want to use it)
    • If No: Removes Superwall from layout and cleans up
    • If Yes: Keeps Superwall integration for dynamic paywalls
  • Configures RevenueCat integration (asks if you want to use it)
    • If No: Removes RevenueCat from layout and cleans up
    • If Yes: Keeps RevenueCat integration for subscriptions
  • Updates supabase/config.toml with your bundle identifier
  • Prepares the project for EAS initialization

๐Ÿ’ก Smart Integration Management

The script intelligently handles integrations:

  • Stripe removal: Deletes 10+ files including contexts, components, Edge Functions, and assets
  • Superwall removal: Cleans layout wrappers, removes provider and configurations
  • RevenueCat removal: Cleans layout wrappers and configurations
  • Dependency cleanup: Automatically uninstalls unused packages
  • Configuration updates: Updates all relevant config files

This ensures your app only includes what you actually need, reducing bundle size and complexity.

๐Ÿ—๏ธ After Initialization

Run these commands in order:

# Install dependencies (clean up after removals)
npm install
 
# Generate native code
npx expo prebuild
 
# Initialize EAS
eas init

๐ŸŽฏ Next Steps Based on Your Choices

If you removed Stripe (answered No):

โœ… Skip the Stripe setup page in the documentation
โœ… Your app is lighter and doesn't include payment processing
โœ… You can always add Stripe back later if needed

If you removed Superwall (answered No):

โœ… Skip the Superwall setup page in the documentation
โœ… Your app won't have dynamic paywall management
โœ… You can always add Superwall back later if needed

If you removed RevenueCat (answered No):

โœ… Skip the RevenueCat setup page in the documentation
โœ… Your app won't have subscription management
โœ… You can always add RevenueCat back later if needed

If you kept all integrations (answered Yes to all):

โœ… Follow all setup steps in the documentation
โœ… Configure environment variables for all services
โœ… Your app will have full payment, paywall, and subscription capabilities

๐Ÿ’ก Tip: The script has already done the heavy lifting for you! Only follow the documentation steps for the integrations you chose to keep.

๐ŸŽฏ Next Step

Continue to ๐Ÿ—„๏ธ Supabase to set up your backend database.


๐Ÿš€ Smart Initialization Complete โœ…

Your app is customized and ready for development!