How cjmaybe/next-pay works
OffPay is an Android app for initiating UPI payments and balance checks through carrier USSD flows, with QR scanning, session feedback, history, settings, and onboarding. The visible workflow is user entry through the app, payment-form submission, and domain/platform execution; the source excerpts do not show the full ViewModel-to-USSD runtime chain. The graph preserves documented screens and platform capabilities, but omits uncertain links where the sampled source does not establish a caller.
Main entry points: OffPayApplication.kt Dependency wiring · MainScaffold.kt App navigation · OnboardingFlow.kt Onboarding · ActionRunner.kt Action runner
Components 29
App experience
- App navigation
offpay_ref/presentation/navigation/MainScaffold.kt - Onboarding
offpay_ref/presentation/screens/onboarding/OnboardingFlow.kt - Pay screen
offpay_ref/presentation/screens/PayScreen.kt - Balance screen
offpay_ref/presentation/screens/BalanceScreen.kt - QR scanning screen
offpay_ref/presentation/screens/ScanScreen.kt - History screen
offpay_ref/presentation/screens/HistoryScreen.kt - Settings screen
offpay_ref/presentation/screens/SettingsScreen.kt - Help and legal
offpay_ref/presentation/screens - Payment state
offpay_ref/presentation/PayViewModel.kt - Balance state
offpay_ref/presentation/BalanceViewModel.kt - History state
offpay_ref/presentation/HistoryViewModel.kt
Payment domain
- Action runner
offpay_ref/domain/ActionRunner.kt - Payment actions
offpay_ref/domain/Actions.kt - Input validation
offpay_ref/domain/InputValidator.kt - Mode routing
offpay_ref/domain/ModeRouter.kt - UPI parsing
offpay_ref/domain/UpiParser.kt - Session state
offpay_ref/domain/SessionState.kt
Android platform
- USSD engine
offpay_ref/platform/UssdEngine.kt - USSD accessibility
offpay_ref/platform/UssdAccessibilityService.kt - Session overlay
offpay_ref/platform/OverlayControllerImpl.kt - QR scanner
offpay_ref/platform/QrScannerManager.kt - Carrier detection
offpay_ref/platform/CarrierDetector.kt - Dependency wiring
offpay_ref/OffPayApplication.kt
Persistence
- History repository
offpay_ref/data/HistoryRepository.kt - Preferences
offpay_ref/data/PreferencesRepository.kt - Transaction database
offpay_ref/data/AppDatabase.kt - Transaction DAO
offpay_ref/data/TransactionDao.kt - Transaction records
offpay_ref/data/TransactionEntity.kt
Other components
- User
Connections 14
- User → App navigation: opens app
- App navigation → Onboarding: shows first launch
offpay_ref/presentation/navigation/MainScaffold.kt - Onboarding → Preferences: saves completion
- App navigation → Balance screen: routes to
offpay_ref/presentation/navigation/MainScaffold.kt - Pay screen → Payment state: submits payment
offpay_ref/presentation/screens/PayScreen.kt - Dependency wiring → Transaction database: creates
offpay_ref/OffPayApplication.kt - Dependency wiring → History repository: creates
offpay_ref/OffPayApplication.kt - Dependency wiring → Preferences: creates
offpay_ref/OffPayApplication.kt - Dependency wiring → Session overlay: creates
offpay_ref/OffPayApplication.kt - Dependency wiring → USSD engine: creates with overlay
offpay_ref/OffPayApplication.kt - Dependency wiring → Carrier detection: creates
offpay_ref/OffPayApplication.kt - Dependency wiring → QR scanner: creates
offpay_ref/OffPayApplication.kt - Dependency wiring → Action runner: creates with engine
offpay_ref/OffPayApplication.kt - Action runner → USSD engine: uses