On-device LLM + RevenueCat + Supabase in a React Native boilerplate
Does AI Mobile Launcher support this combo?
Yes, with one clarification. People search for "Ollama React Native" but Ollama is a desktop server runtime. It does not run inside a mobile app. The mobile equivalent is llama.rn, which loads GGUF models the same way Ollama does. AI Mobile Launcher AI Pro ships llama.rn v0.10.0-rc.2 with a model-download modal and a runtime toggle that lets users switch between cloud and on-device. RevenueCat and Supabase are wired identically to the cloud combos.
The stack
- React Native 0.83.6 + Expo SDK 55.0.17
- On-device:
llama.rnv0.10.0-rc.2 (GGUF inference, Metal on iOS, CPU on Android) - Service:
src/features/local-llm/services/local-llm.service.ts - Model downloader UI:
src/features/local-llm/components/model-download-modal.tsx - Provider toggle (cloud / on-device) persisted in Redux + MMKV:
src/store/llm-preferences-slice.ts - RevenueCat + Supabase wired same as other combos
Setup in five steps
1. Clone AI Pro
git clone <ai-pro-tier-repo>
cd ai-mobile-launcher
pnpm install2. Pick a model
# Default: Qwen 2.5 1.5B Q4_K_M (~1.2 GB on-device)
# Configurable in src/features/local-llm/config.ts
# The model download modal fetches on first cold-start of the AI Hub tab.Anything under 2 GB runs comfortably on iPhone 12 and newer. 3-7B Q4 models work on iPhone 15 Pro and recent Android flagships. Below ~6 GB device RAM, stick to 1-3B.
3. Supabase env
# .env
EXPO_PUBLIC_SUPABASE_URL=https://<project>.supabase.co
EXPO_PUBLIC_SUPABASE_ANON_KEY=<anon-key>4. RevenueCat env
# .env
EXPO_PUBLIC_REVENUECAT_IOS_KEY=appl_...
EXPO_PUBLIC_REVENUECAT_ANDROID_KEY=goog_...5. Real-device build
eas build --profile development --platform ios
# Then install on a real device. Simulator inference is too slow to test.Why this combo works
On-device inference is the only combo where your unit economics flip from negative to flat. Cloud LLM apps lose money on power users; on-device apps do not. The tradeoff is that you ship a 1-2 GB model download on first run, which is a real conversion friction.
Why pair with RevenueCat at all if inference is free? Because on-device-only apps still have features that justify a paywall: faster cloud fallback, larger model unlocks, multi-device sync. The model is the cost; subscription is the value capture.
Supabase is in the stack to handle the parts on-device can't: user accounts, multi-device sync, server-side analytics, leaderboards. RLS keeps user data isolated without middleware.
What it costs at scale
| Line item | 1K MAU | 100K MAU |
|---|---|---|
| On-device LLM inference | $0 | $0 |
| Model file CDN (1.2 GB × downloads) | varies | varies by host |
| RevenueCat | $0 | ~$200 |
| Supabase Pro | $25 | ~$125 |
| Total infra (excl. store fees) | ~$30 | ~$825 |
The CDN line is the one to watch. Host the GGUF on Cloudflare R2 (zero egress) or Hugging Face (free hosting) and the cost approaches zero at any scale.
What this combo does NOT cover
- Frontier-model quality: on-device tops out around 3-7B parameters quantized. Reasoning suffers
- Tool use / function calling: possible but unreliable in this size class
- Multimodal: llama.rn is text-only today
- Background inference: iOS kills long-running JS work in background
- The 1-2 GB download on first run: that is fundamental, not a wiring issue
Get this combo
Ships in AI Pro tier ($199). The Standard tier does not include on-device LLM.
See AI Pro tier ($199)