@byarcadia-app/plutus
v0.1.1
Published
Reusable RevenueCat wrapper for React Native in-app purchases
Maintainers
Readme
Named after the Greek god of wealth — Plutus wraps RevenueCat so you can set up in-app purchases once and reuse across projects.
What it does
- PlutusProvider — RevenueCat SDK initialization, customer info listener, entitlement state management
- usePlutus — Access
isPro,isInTrial,isReady,managementURL,purchasePackage,restorePurchases - useOfferings — Load offerings with configurable identifiers, per-package trial detection, computed discount percentages
- usePaywall — Purchase flow orchestration with subscription type selection, configurable callbacks
- useRescuePaywall — Rescue/discount offer purchase flow
- Translations — English fallback strings, override with
Partial<PlutusTranslations> - Error handling — Typed error objects with error codes and factory functions
- Callback-driven — All app-specific concerns (analytics, alerts, navigation, haptics) via callbacks, not baked in
Documentation
Agent Skill
Set up Plutus in your project with a single command using skills.sh:
npx skills add byarcadia-app/plutus --skill plutus-setupThe skill handles dependency installation, PlutusProvider integration, and environment variable configuration. See skills/plutus-setup/ for details.
Example App
A complete working integration lives in example/. It demonstrates provider setup and all hook usage patterns.
pnpm example:start # Start Expo dev server
pnpm example:ios # Run on iOS simulatorRequirements
| Dependency | Version | | ---------------------- | ------- | | React | >= 18 | | React Native | >= 0.72 | | react-native-purchases | >= 9 |
License
MIT
