A small Expo / React Native app that showcases RevenueCat Virtual Currency in a fantasy RPG‑style item shop.
Players buy Gems via in‑app purchases, then spend them on weapons, armor, and potions in a dungeon shop.
- Virtual currency flow: Buy gems with IAP, see your balance, and spend gems on items.
- RevenueCat integration:
Purchases.getOfferings()to load gem packages.Purchases.purchasePackage()to buy gems.Purchases.getVirtualCurrencies()to read theGEMSbalance.- Backend proxy (Expo API route) to spend gems via the RevenueCat Transaction API.
- App structure (Expo Router + bottom tabs):
- Shop: Browse items, see prices in gems, purchase via a confirmation bottom sheet.
- Buy Gems: Choose from multiple gem packs wired to RevenueCat products.
- Inventory: View items you own, grouped by rarity.
For a more detailed breakdown of screens, data, and API usage, see SPEC.md.
-
Install dependencies
npm install
-
Configure RevenueCat
- Create a project and virtual currency
GEMSin the RevenueCat dashboard. - Configure the gem products (
gems_50,gems_200,gems_500,gems_1500) and an Offering. - Add your public SDK key and any needed environment values as described in the tutorial/video.
- Create a project and virtual currency
-
Start the dev server
npx expo start
Then open the app in an iOS simulator, Android emulator, or on‑device development build.
- Framework: Expo + React Native with Expo Router
- In‑app purchases / virtual currency:
react-native-purchases(RevenueCat) - Navigation: React Navigation bottom tabs
- State: React Context +
useReducerfor gem balance and inventory - Storage:
@react-native-async-storage/async-storagefor inventory persistence