-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/pricing #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
aalexmrt
wants to merge
28
commits into
master
Choose a base branch
from
feat/pricing
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feat/pricing #29
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…Extraction service with new URL and model settings
…w console statements, and add new dependencies for @tanstack/react-query and react-native-purchases
- Add RevenueCat SDK integration with environment-based configuration - Implement useRevenueCat hook with TanStack Query for subscription management - Add useAppInitialization hook for centralized app startup sequence - Create RevenueCat service layer with full TypeScript support - Add example component demonstrating RevenueCat usage - Integrate RevenueCat initialization in app layout with error handling - Support both test and production environments - Add proper caching, error handling, and loading states - Make RevenueCat initialization non-blocking (app works if it fails) - Update database initialization to return boolean for TanStack Query compatibility
- Remove isAnyLoading variable and related loading screen logic - Update loading condition to only check for database and RevenueCat loading states - Improve clarity and maintainability of the app initialization process
- Add PaywallModal component with subscription package selection - Create usePaywall hook for paywall state management - Integrate paywall into app startup flow for non-premium users - Add detailed RevenueCat logging for packages, offerings, and customer info - Add premium status indicator to main chat screen - Support both development and production environments - Include purchase flow, restore purchases, and error handling - Add comprehensive paywall UI with features list and pricing cards
- Update error messages to be more descriptive for initialization failures - Consolidate retry logic for database and RevenueCat errors - Increase retry attempts and adjust delay for RevenueCat initialization - Remove non-critical error handling to streamline the app initialization process
- Remove startup paywall display logic and related state management - Introduce shouldShowPaywall variable to determine visibility based on subscription status - Streamline the hook for improved clarity and maintainability
…h + annual option - Add /api/negotiate endpoint with direct AgentTool streaming - Create pricing_agent with simplified pricing presentation - Update finalize_negotiation tool to support annual pricing (.99/year) - Add sendNegotiationMessage function to frontend chat API - Update process_llm_response.py to handle negotiation events - Implement proper error handling and validation - Support both monthly (.99) and annual (.99) pricing options - Add comprehensive stress testing and edge case handling
… negotiation architecture - Updated pricing agent to present pricing immediately on first message - Agent calls finalize_negotiation function right away instead of waiting for user interest - Updated NegotiationResultCard UI with 'Choose Your Plan' messaging - Keeps full negotiation architecture for future enhancements (promo codes, discounts, etc) - Improved UX by reducing friction in upgrade flow
- Simplify PricingCard to compact display with single Upgrade button - Enhance PaywallModal with highlighted package and negotiation context - Connect PricingCard to PaywallModal for seamless purchase flow - Hide PricingCard when user becomes premium (isPremium: true) - Remove pricingMode state management (no longer needed) - Clean up debug logs for production readiness - Update backend agent to use hybrid approach (immediate pricing + negotiation) - Add annual pricing support (.99/year with 20% discount) Flow: negotiation → pricing card → paywall modal → purchase → premium mode
- Frontend: add NegotiationEventProcessor, NegotiationResult, onNegotiationChannel - Hook: update useChatWithStorage for chatMode and negotiationResult - UI: add compact PricingCard and integrate with PaywallModal - App: mode based on isPremium; hide PricingCard for premium - Backend: pricing agent prompt to emit immediate pricing via tool - Cleanup: remove noisy logs, minor fixes
- Add RevenueCat SDK integration with environment-based key management - Implement subscription state management with TanStack Query - Add DevResetButton for development environment testing - Configure StoreKit testing with configurationTest.storekit file - Add comprehensive payment architecture documentation - Update .gitignore to exclude StoreKit certificates - Integrate pricing negotiation flow with premium access gating - Support both test and production API keys based on environment Features: - Premium subscription gating (monthly/annual plans) - StoreKit testing support for local simulator testing - RevenueCat web billing toggle via dashboard configuration - Price negotiation flow with LLM-based pricing agent - Developer tools for subscription testing Documentation: - PAYMENT_ARCHITECTURE.md: Complete payment flow documentation - StoreKit setup guide for testing - TestFlight and production deployment checklist - Employee testing strategies
…aywallModal with error handling and logging improvements
… for debugging - Changed logging to display full API keys instead of masked versions for verification purposes - Added warning to remove full keys from logs before production deployment
- Redesign PaywallModal: cleaner UI, remove pre-selection, direct purchase buttons - Simplify welcome message for negotiation chat mode - Fix RevenueCat offerings configuration (single offering with multiple packages) - Enhance PricingCard with modern styling and clearer hierarchy - Update app flow: show PricingCard immediately for non-premium users - Update pricing agent prompt to answer app questions naturally - Add comprehensive RevenueCat logging for debugging - Fix StoreKit configuration path in Xcode scheme
- Simplified header with a more concise title and savings badge - Updated pricing section to a horizontal layout for better readability - Enhanced button styling and text for clarity - Adjusted overall styles for a cleaner, modern appearance
…cingCard and ChatScreen - Updated ChatScreen to extract monthly and annual packages from RevenueCat offerings - Modified PricingCard to display prices from RevenueCat packages or fallback to negotiation results - Improved PaywallModal to refresh customer info and check premium status after purchase and restore actions
…play logic - Added loading state handling for RevenueCat offerings in ChatScreen - Updated PricingCard visibility logic to prevent fallback prices from flashing - Enhanced user experience by ensuring PricingCard only displays when offerings are fully loaded
…ssing tiktoken import - Simplified token counting by directly using tiktoken if available - Removed the ImportError handling for tiktoken, relying on exception handling for other errors
…n installation requirement - Revised comment to specify that the fallback mechanism is triggered when tiktoken is not installed, enhancing code clarity and maintainability.
…sponsiveness to chatMode changes - Converted getWelcomeMessage to useCallback for memoization - Added useEffect to update the welcome message when chatMode changes - Enhanced clearMessages function to reset to the appropriate welcome message based on current chatMode
…dance - Updated the pricing_system_prompt to emphasize the Premium-only model and privacy features - Clarified the role of the assistant in providing information about GeistAI and its pricing plans - Added strict rules for conversation handling, including redirecting off-topic questions and emphasizing subscription requirements - Enhanced examples of user interactions to align with the new prompt structure
…at logging for better debugging and error handling
- Introduced useNegotiationLimit hook to manage message count and limit for negotiation mode - Updated useChatWithStorage to integrate negotiation limit checks and callbacks - Enhanced ChatScreen to reset negotiation limit upon user upgrading to premium - Added logic to display a limit message when the negotiation message count is reached
- Introduced MEASURABLE_OUTCOMES.md to summarize performance metrics and achievements, including local dev speedup, first-token latency, and GPU acceleration. - Created PROJECT_ANALYSIS.md for a detailed overview of the GeistAI project, covering purpose, completed work, architecture, core logic, tech stack, and integration details. - Updated app.json and Info.plist to reflect the new build number (10). - Enhanced RevenueCat TestFlight setup documentation for better troubleshooting and verification processes.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement Subscription System with RevenueCat
Summary
Implements complete subscription system for GeistAI using RevenueCat with App Store integration. Supports monthly ($9.99/month) and annual ($95.99/year) plans with automatic premium status detection.
Note: Pricing negotiation architecture is prepared but not yet implemented - currently only provides fixed pricing and app information.
Key Changes
Features
/api/negotiate) - LLM agent for app questions and pricing presentationTechnical
/api/negotiatestreaming endpoint, pricing agent with privacy-focused promptNot Implemented
Backend RevenueCat Verification
Deferred - need to implement without breaking local development. Will add webhook verification with environment-based toggle in future PR.
Migration Requirements
Environment Variables:
EXPO_PUBLIC_REVENUECAT_TEST_STORE_API_KEY(development)EXPO_PUBLIC_REVENUECAT_APPLE_API_KEY(production)RevenueCat Dashboard:
premium_monthly_10,premium_yearly_10premiumApp Store Connect: