How jnquez27/gamblingv2 works
BettingLog is an Android-first behavioral gambling-awareness app. Its user journey combines onboarding and baseline risk measurement with ongoing reflection, monitoring, and behavior-change support: users track mood and spending, see gambling-app usage and risk, then receive prompts, check-ins, and guided consultation. The README documents additional capabilities such as trends, streaks, spending limits, and a readiness-gated action plan. Source excerpts confirm the monitoring and FHIR-export relationships shown; several other feature-to-service connections are not evidenced in the sampled code and are therefore omitted.
Main entry points: gamblingDetection.service.ts Gambling detection · fhir-export/index.ts FHIR export handler · gambling-monitor/index.ts Monitor native API · about-you.tsx Onboarding
Components 24
User journey
- Onboarding
bettinglog-rn/app/onboarding/about-you.tsx - Risk assessment
bettinglog-rn/app/assessment.tsx - Weekly check-in
bettinglog-rn/app/weekly-checkin.tsx - Behavioral diary
bettinglog-rn/app/(tabs)/diary.tsx - Profile and settings
bettinglog-rn/app/(tabs)/profile.tsx
Behavior insights
- Usage tracking
bettinglog-rn/src/services/usage.service.ts - Usage thresholds
bettinglog-rn/src/utils/thresholdEngine.ts - Spending limits
bettinglog-rn/src/services/spending.service.ts - Spending engine
bettinglog-rn/src/utils/spendingEngine.ts - App influence
bettinglog-rn/src/services/influence.service.ts
Behavior change
- Guided consultation
bettinglog-rn/app/consultation.tsx - Consultation engine
bettinglog-rn/src/utils/consultationEngine.ts - Action plan
bettinglog-rn/src/services/tbp.service.ts - Engagement streaks
bettinglog-rn/src/services/streak.service.ts
Platform services
- Gambling detection
bettinglog-rn/src/services/gamblingDetection.service.ts - Monitor native API
bettinglog-rn/modules/gambling-monitor/index.ts - App monitor
bettinglog-rn/modules/gambling-monitor/android/src/main/java/expo/modules/gamblingmonitor/GamblingMonitorService.kt - Website shield
bettinglog-rn/modules/gambling-monitor/android/src/main/java/expo/modules/gamblingmonitor/GamblingVpnService.kt - Notifications
bettinglog-rn/src/services/notification.service.ts
Data export
- FHIR export handler
bettinglog-rn/supabase/functions/fhir-export/index.ts - FHIR bundle serializer
bettinglog-rn/supabase/functions/fhir-export/lib.ts
Other components
- App user
- Supabase
- FHIR endpoint
Connections 14
- App user → Onboarding: starts with
README.md - App user → Risk assessment: completes
README.md - App user → Behavioral diary: reflects in
README.md - App user → Weekly check-in: checks in
README.md - App user → Guided consultation: seeks guidance
README.md - App user → Profile and settings: manages settings
README.md - Gambling detection → Monitor native API: uses module
bettinglog-rn/src/services/gamblingDetection.service.ts - Monitor native API → App monitor: dispatches monitoring
- Monitor native API → Website shield: starts shield
- Gambling detection → Usage tracking: logs opens
bettinglog-rn/src/services/gamblingDetection.service.ts - Gambling detection → Notifications: sends alert
bettinglog-rn/src/services/gamblingDetection.service.ts - FHIR export handler → FHIR bundle serializer: builds bundle
bettinglog-rn/supabase/functions/fhir-export/index.ts - FHIR export handler → Supabase: reads assessment
bettinglog-rn/supabase/functions/fhir-export/index.ts - FHIR export handler → FHIR endpoint: posts bundle
bettinglog-rn/supabase/functions/fhir-export/index.ts