How ashfaqueo/brobehave works
BroBehave is an Android app for personal streak tracking and recovery, social accountability, and optional automatic adult-domain detection. The main path is app launch and navigation into onboarding or sign-in, then profile and streak activity backed by local storage and server sync; social feed and detection are additional user workflows. The source excerpts support several repository, storage, and detection relationships, but the README is empty and many screens and navigation routes were not sampled, so those links are not asserted.
Main entry points: StreakRepository.kt Streak tracking · ProfileRepository.kt Profile data · DetectionVpnService.kt VPN detection · AuthRepository.kt Authentication data
Components 25
App and onboarding
- Android activity
app/src/main/kotlin/com/brobehave/app/MainActivity.kt - Navigation shell
app/src/main/kotlin/com/brobehave/app/navigation/BroBehaveNavShell.kt - Authentication UI
feature/auth/src/main/kotlin/com/brobehave/feature/auth/AuthScreen.kt - Authentication state
feature/auth/src/main/kotlin/com/brobehave/feature/auth/AuthViewModel.kt - Setup workflow
feature/onboarding/src/main/kotlin/com/brobehave/feature/onboarding/SetupViewModel.kt - Push messaging
app/src/main/kotlin/com/brobehave/app/push/BroBehaveMessagingService.kt
Streak and social
- Own profile
feature/profile/src/main/kotlin/com/brobehave/feature/profile/ProfileScreen.kt - Profile and settings
feature/profile/src/main/kotlin/com/brobehave/feature/profile/UserProfileScreen.kt - Social feed
feature/feed/src/main/kotlin/com/brobehave/feature/feed/FeedScreen.kt - Feed state
feature/feed/src/main/kotlin/com/brobehave/feature/feed/FeedViewModel.kt - Social data
core/data/src/main/kotlin/com/brobehave/core/data/SocialRepository.kt - Streak tracking
core/data/src/main/kotlin/com/brobehave/core/data/StreakRepository.kt
Automatic detection
- Detection disclosure
detection/src/main/kotlin/com/brobehave/detection/DetectionDisclosureScreen.kt - Detection controller
detection/src/main/kotlin/com/brobehave/detection/DetectionController.kt - VPN detection
detection/src/main/kotlin/com/brobehave/detection/DetectionVpnService.kt - Domain matching
detection/src/main/kotlin/com/brobehave/detection/engine/DomainMatcher.kt - Blocklist updates
detection/src/main/kotlin/com/brobehave/detection/BlocklistUpdater.kt
Data and services
- Authentication data
core/data/src/main/kotlin/com/brobehave/core/data/AuthRepository.kt - Profile data
core/data/src/main/kotlin/com/brobehave/core/data/ProfileRepository.kt - Local store
core/data/src/main/kotlin/com/brobehave/core/data/LocalStore.kt - Room database
core/database/src/main/kotlin/com/brobehave/core/database/BroBehaveDatabase.kt - Flagged-day storage
core/database/src/main/kotlin/com/brobehave/core/database/FlaggedDayDao.kt - Flagged-day records
core/database/src/main/kotlin/com/brobehave/core/database/FlaggedDayEntity.kt
Other components
- App user
- Supabase services
Connections 28
- App user → Android activity: opens app
app/src/main/kotlin/com/brobehave/app/MainActivity.kt - Android activity → Navigation shell: hosts navigation
app/src/main/kotlin/com/brobehave/app/MainActivity.kt - Authentication UI → Authentication state: dispatches input
feature/auth/src/main/kotlin/com/brobehave/feature/auth/AuthScreen.kt - Authentication state → Authentication data: uses auth
feature/auth/src/main/kotlin/com/brobehave/feature/auth/AuthViewModel.kt - Setup workflow → Authentication data: uses auth
feature/onboarding/src/main/kotlin/com/brobehave/feature/onboarding/SetupViewModel.kt - Setup workflow → Profile data: updates profile
feature/onboarding/src/main/kotlin/com/brobehave/feature/onboarding/SetupViewModel.kt - Social feed → Feed state: dispatches actions
feature/feed/src/main/kotlin/com/brobehave/feature/feed/FeedScreen.kt - Feed state → Social data: loads feed
feature/feed/src/main/kotlin/com/brobehave/feature/feed/FeedViewModel.kt - Own profile → Profile and settings: opens views
- Own profile → Detection controller: toggles detection
- Detection controller → VPN detection: starts service
detection/src/main/kotlin/com/brobehave/detection/DetectionController.kt - VPN detection → Domain matching: matches domains
detection/src/main/kotlin/com/brobehave/detection/DetectionVpnService.kt - VPN detection → Blocklist updates: loads updates
detection/src/main/kotlin/com/brobehave/detection/DetectionVpnService.kt - VPN detection → Streak tracking: records heartbeat
detection/src/main/kotlin/com/brobehave/detection/DetectionVpnService.kt - Streak tracking → Flagged-day storage: reads and writes
core/data/src/main/kotlin/com/brobehave/core/data/StreakRepository.kt - Streak tracking → Local store: updates cache
core/data/src/main/kotlin/com/brobehave/core/data/StreakRepository.kt - Streak tracking → Profile data: refreshes profile
core/data/src/main/kotlin/com/brobehave/core/data/StreakRepository.kt - Streak tracking → Supabase services: syncs events
core/data/src/main/kotlin/com/brobehave/core/data/StreakRepository.kt - Local store → Flagged-day storage: uses DAO
core/data/src/main/kotlin/com/brobehave/core/data/LocalStore.kt - Room database → Flagged-day storage: provides DAO
core/database/src/main/kotlin/com/brobehave/core/database/BroBehaveDatabase.kt - Room database → Flagged-day records: stores records
core/database/src/main/kotlin/com/brobehave/core/database/BroBehaveDatabase.kt - Flagged-day storage → Flagged-day records: queries records
core/database/src/main/kotlin/com/brobehave/core/database/FlaggedDayDao.kt - Authentication data → Supabase services: auth and functions
core/data/src/main/kotlin/com/brobehave/core/data/AuthRepository.kt - Authentication data → Local store: clears local data
core/data/src/main/kotlin/com/brobehave/core/data/AuthRepository.kt - Profile data → Local store: caches profile
core/data/src/main/kotlin/com/brobehave/core/data/ProfileRepository.kt - Profile data → Supabase services: reads profile
core/data/src/main/kotlin/com/brobehave/core/data/ProfileRepository.kt - Push messaging → Profile data: registers token
app/src/main/kotlin/com/brobehave/app/push/BroBehaveMessagingService.kt - Push messaging → Android activity: opens on tap
app/src/main/kotlin/com/brobehave/app/push/BroBehaveMessagingService.kt