Inspiration

Managing money as a busy mum can feel overwhelming. Between groceries, bills, home improvements, and daily expenses, financial advice often feels too technical or unrealistic for real life.

I wanted to build something supportive instead of intimidating — something that feels like texting a financially smart friend.

PurplePurse was inspired by the idea of a Pocket Assistant that gives practical, conversational, and judgment-free money guidance tailored to everyday situations.


What it does

PurplePurse is a Flutter-based mobile financial assistant designed to help users make smarter financial decisions through categorized AI guidance:

  • 💵 Finance Knowledge
  • 🛒 Smart Shopping
  • 🍱 Meal Planning
  • 🏠 Home Reno Hacks
  • 🔍 Quick Reads (Premium Feature)

The Quick Reads category is gated behind a RevenueCat-powered subscription.

Premium unlocks:

  • Access to exclusive assistant functionality
  • Real-time entitlement-based UI updates
  • A PRO badge displayed in the app bar
  • AI generated weekly plans that are tailored to the user and what they truly need and want to learn

No premium access is ever stored locally — everything is validated against RevenueCat.


How I built it

Architecture

  • Flutter + Dart
  • Riverpod for reactive state management
  • Supabase for authentication
  • RevenueCat for subscription infrastructure
  • OpenAI Api for AI-powered conversations
  • Google Play Billing (Internal Testing Track)

The app uses a StreamProvider<bool> to expose premium state:

  1. Fetch initial CustomerInfo
  2. Emit entitlement state
  3. Subscribe to addCustomerInfoUpdateListener
  4. Reactively rebuild UI when entitlements change

This ensures subscription state is always consistent and server-authoritative.


Identity Binding (Critical Engineering Decision)

Initially, anonymous RevenueCat IDs caused entitlement merging across sessions.

To solve this properly, I implemented authenticated identity binding:

await Purchases.logIn(supabaseUserId);

on login, and:

await Purchases.logOut();

on logout.

This binds RevenueCat App User IDs directly to Supabase users, eliminating alias stacking and cross-account entitlement leakage.


Entitlement Validation

Premium status is determined strictly via:

customerInfo.entitlements.active.containsKey('premium')

This drives:

  • UI gating
  • Navigation restrictions
  • PRO badge rendering
  • Feature availability

No local flags. No cached booleans.


Google Play Billing Integration

Tested using:

  • Internal testing track
  • License tester accounts
  • Trial activation
  • Renewal opt-outs
  • Declined transactions
  • Restore flows
  • Subscription expiration scenarios

Debugged real-world billing issues including:

  • Anonymous alias merging
  • OR-HDT-16 payment errors
  • Subscription plan change restrictions
  • Play Store cache inconsistencies

Challenges I ran into

Anonymous RevenueCat alias merging

Resolved by implementing authenticated logIn() binding.

Subscription plan change errors

Resolved by properly canceling sandbox subscriptions and resetting Play Store cache.

OR-HDT payment errors

Identified as Google sandbox payment configuration issues and resolved through tester configuration validation.


Accomplishments that I am proud of

  • Production-ready subscription identity architecture
  • Fully reactive entitlement-driven UI
  • Clean separation of auth and subscription layers
  • Real sandbox subscription lifecycle testing
  • Eliminated cross-account entitlement persistence

Premium access is enforced entirely through RevenueCat entitlements — never through local state.


What I learned

  • Subscription systems are identity systems.
  • Anonymous users should not power production monetization flows.
  • Entitlement-driven UI must be reactive.
  • Google Play sandbox behavior differs significantly from production.
  • Clearing Play Store cache can resolve stale billing states.

What's next for PurplePurse

  • iOS release using RevenueCat
  • Subscription analytics & cohort tracking
  • Feature experimentation via RevenueCat offerings
  • Advanced personalization models
  • Production launch

PurplePurse aims to make financial confidence practical, supportive, and accessible for busy moms.

Built With

Share this project:

Updates