OpenAI + RevenueCat + Supabase in a React Native boilerplate
Does AI Mobile Launcher support this combo?
Yes. The AI Pro tier ships OpenAI as one of two cloud LLM providers (the other is Gemini), RevenueCat as the subscription layer with a pre-built paywall, and Supabase for auth + Postgres + row-level security. It calls the OpenAI API directly over REST with no SDK package, which keeps the bundle small and side-steps the Node-only dependencies most JS SDKs carry.
The stack
- React Native 0.83.6 + Expo SDK 55.0.17 (New Architecture)
- TypeScript strict mode
- OpenAI: direct REST client at
src/features/gen-ui/api/openai.api.ts. Default modelgpt-4o-mini, swap togpt-4ovia env - RevenueCat:
react-native-purchases - Supabase:
@supabase/supabase-js+expo-secure-storefor token storage - State: Redux Toolkit 2.11 + RTK Query + Redux Persist (MMKV-backed)
- UI: @shopify/restyle
Setup in five steps
1. Clone and install
git clone <ai-pro-tier-repo>
cd ai-mobile-launcher
pnpm install2. OpenAI key
# .env
OPENAI_API_KEY=sk-...
OPENAI_MODEL=gpt-4o-mini # or gpt-4o for higher qualityThe key is read on the server side of a thin proxy you deploy yourself (Supabase Edge Function or Cloudflare Worker). Never ship the OpenAI key inside the mobile bundle, because anyone with mitmproxy can extract it.
3. Supabase
# .env
EXPO_PUBLIC_SUPABASE_URL=https://<project>.supabase.co
EXPO_PUBLIC_SUPABASE_ANON_KEY=<anon-key>Apple sign-in, Google sign-in, email/password, and biometric unlock are wired. Tokens persist in expo-secure-store (Keychain on iOS, Keystore on Android).
4. RevenueCat
# .env
EXPO_PUBLIC_REVENUECAT_IOS_KEY=appl_...
EXPO_PUBLIC_REVENUECAT_ANDROID_KEY=goog_...Paywall component, free-trial flow, restore purchases, 48-hour re-prompt cooldown, A/B variants: all wired. Define your products in App Store Connect / Play Console, then link them in the RevenueCat dashboard.
5. EAS dev build
eas build --profile development --platform ios
eas build --profile development --platform androidWhy this combo works
OpenAI is the default cloud LLM for most B2C AI apps in 2026, not because it is the smartest model (it usually is not, by the time you ship), but because gpt-4o-mini gives you a price-quality floor that survives a viral spike. At $0.150 input / $0.600 output per million tokens, a 500-token chat round-trip costs around $0.0004. You can run a free tier and not panic.
RevenueCat exists because Apple and Google receipt validation is a swamp. You write the code once, then receipts break in TestFlight, sandbox runs differently from prod, refunds take two weeks to propagate. RevenueCat handles all of it and gives you cohort retention out of the box.
Supabase is the right backend for an AI app specifically because pgvector ships in every Supabase project. You do not need a separate vector DB to build a RAG feature. Row-level security gives you per-user data isolation in SQL, not in middleware.
What it costs at scale
| Line item | 1K MAU | 100K MAU |
|---|---|---|
| OpenAI (gpt-4o-mini, 10 chats/user/mo, 500 tokens) | ~$4 | ~$400 |
| RevenueCat (free tier, then percentage of MTR) | $0 | ~$200 |
| Supabase Pro ($25/mo + usage) | $25 | ~$125 |
| Apple / Google store fees (15-30%) | n/a | ~$1500-3000 on $10K MRR |
| Total infra (excl. store) | ~$29 | ~$725 |
Numbers assume average usage. A power user running 100 chats/day blows the OpenAI line item up fast, so rate-limit per user on day one.
What this combo does NOT cover
- On-device inference: if you need offline mode or zero-cloud cost, use the llama.rn on-device combo
- Anthropic Claude: not bundled in the AI Pro tier today, port the OpenAI REST client (~80 lines) to Anthropic if you need it
- Image / video generation: only image, audio, and video analysis
- Streaming responses out of the box: SSE works but you wire it
- Self-hosted infra: Supabase Cloud is assumed
Get this combo
OpenAI + RevenueCat + Supabase ships in the AI Pro tier ($199). The Standard tier ($99) is the same base without any AI providers, so you wire OpenAI yourself in ~2 hours.
See AI Pro tier ($199)Standard tier ($99)