How chbk1348/gatcha-log works
Gatcha LOG is a Kotlin Multiplatform Android/iOS tracker for gacha spending and game information. The user journey is to onboard or sign in, record and review spending, then use game-account data for live notes, attendance, characters, schedules, and gacha reports; alerts and cloud sync support that experience across devices. The graph also preserves the documented HoYoLAND guide and savings/challenge features. Connections reflect README statements or the supplied source index; unsampled internals and external API wiring are not inferred.
Main entry points: ContentView.swift iOS app · GachaDashboardScreen.kt Game information UI · SpendingViewModel.kt Spending view model · MainActivity.kt Android app
Components 23
Platform apps
- Android app
Gatcha Log Android/src/main/java/com/gatcha/log/MainActivity.kt - iOS app
Gatcha Log IOS/GL_IOS/ContentView.swift - iOS state bridge
Gatcha Log IOS/GL_IOS/Bridge/SpendingStore.swift - Spending screens
Gatcha Log IOS/GL_IOS/Screens/Spending/SpendingDetailView.swift - Onboarding
Gatcha Log IOS/GL_IOS/Screens/Onboarding/OnboardingView.swift - Game information UI
Gatcha Log Android/src/main/java/com/gatcha/log/ui/game/GachaDashboardScreen.kt
Shared domain
- Spending view model
Gatcha Log Shared/src/commonMain/kotlin/com/gatcha/log/data/SpendingViewModel.kt - Account data repository
Gatcha Log Shared/src/commonMain/kotlin/com/gatcha/log/data/GatchaRepository.kt - Spending records
Gatcha Log Shared/src/commonMain/kotlin/com/gatcha/log/data/Spending.kt - Gacha reports
Gatcha Log Shared/src/commonMain/kotlin/com/gatcha/log/data/GachaReport.kt
Game features
- Game data
Gatcha Log Shared/src/commonMain/kotlin/com/gatcha/log/data/GameData.kt - HoYoLAB API
Gatcha Log Shared/src/commonMain/kotlin/com/gatcha/log/data/api/HoyolabApi.kt - HoYoLAND API
Gatcha Log Shared/src/commonMain/kotlin/com/gatcha/log/data/api/HoyolandApi.kt
Persistence and services
- Account and auth
Gatcha Log Shared/src/commonMain/kotlin/com/gatcha/log/data/AuthManager.kt - App settings
Gatcha Log Shared/src/commonMain/kotlin/com/gatcha/log/data/AppSettings.kt - Local key-value store
Gatcha Log Shared/src/commonMain/kotlin/com/gatcha/log/storage/KeyValueStore.kt - Cloud sync
Gatcha Log Shared/src/commonMain/kotlin/com/gatcha/log/data/CloudSync.kt - Notification planning
Gatcha Log Shared/src/commonMain/kotlin/com/gatcha/log/data/work/NotificationChecker.kt - Scheduled alerts
Gatcha Log Shared/src/commonMain/kotlin/com/gatcha/log/data/work/ScheduledAlerts.kt - OS notifications
Other components
- Player
- Firebase / Firestore
- HoYoLAB services
Connections 25
- Player → Android app: uses
- Player → iOS app: uses
- Android app → Spending view model: uses shared logic
Gatcha Log Android/src/main/java/com/gatcha/log/MainActivity.kt - iOS app → iOS state bridge: hosts SwiftUI
Gatcha Log IOS/GL_IOS/ContentView.swift - iOS state bridge → Spending view model: bridges state
- iOS app → Onboarding: routes to
Gatcha Log IOS/GL_IOS/ContentView.swift - iOS app → Spending screens: routes to
Gatcha Log IOS/GL_IOS/ContentView.swift - iOS app → Game information UI: routes to
- Spending screens → iOS state bridge: reads state
Gatcha Log IOS/GL_IOS/Screens/Spending/SpendingDetailView.swift - Spending view model → Account data repository: manages data
Gatcha Log Shared/src/commonMain/kotlin/com/gatcha/log/data/SpendingViewModel.kt - Account data repository → Spending records: stores records
Gatcha Log Shared/src/commonMain/kotlin/com/gatcha/log/data/GatchaRepository.kt - Account data repository → Gacha reports: stores reports
Gatcha Log Shared/src/commonMain/kotlin/com/gatcha/log/data/GatchaRepository.kt - Spending records → Game data: uses game definitions
Gatcha Log Shared/src/commonMain/kotlin/com/gatcha/log/data/Spending.kt - Game information UI → Game data: shows game data
- Game information UI → HoYoLAB API: shows linked data
- Game information UI → HoYoLAND API: shows event guide
- Account and auth → Local key-value store: persists account
Gatcha Log Shared/src/commonMain/kotlin/com/gatcha/log/data/AuthManager.kt - Account and auth → Cloud sync: syncs account
Gatcha Log Shared/src/commonMain/kotlin/com/gatcha/log/data/AuthManager.kt - Spending view model → Cloud sync: syncs snapshots
Gatcha Log Shared/src/commonMain/kotlin/com/gatcha/log/data/SpendingViewModel.kt - Cloud sync → Firebase / Firestore: reads and writes
- App settings → Local key-value store: stores preferences
Gatcha Log Shared/src/commonMain/kotlin/com/gatcha/log/data/AppSettings.kt - Android app → Notification planning: triggers checks
Gatcha Log Android/src/main/java/com/gatcha/log/MainActivity.kt - Notification planning → Scheduled alerts: replans alerts
Gatcha Log Android/src/main/java/com/gatcha/log/data/work/GatchaWorker.kt - Scheduled alerts → OS notifications: schedules
- HoYoLAB API → HoYoLAB services: requests game data