How kokorikofc/tfgonitime works
Project Type and Purpose
• Android mobile application written in Kotlin
• Implements MVVM (Model–View–ViewModel) + Repository patterns
• Uses Firebase (google‑services.json) for authentication, chat, diary, etc.
• Provides UI screens for login, sign‐up, diary, chat, tasks, missions, streaks, store, settings
Main Architectural Components
• Presentation Layer (UI)
– Activities & Compose/Views (MainActivity, screen Composables under ui/screens and ui/components)
– Navigation wrapper (NavigationWrapper.kt)
• ViewModel Layer
– ViewModels for each feature (AuthViewModel, ChatViewModel, DiaryViewModel, …)
– Exposes LiveData/StateFlows to the UI
• Domain/Data Layer
– Repositories (ChatRepository, DiaryRepository, TaskRepository, etc.)
– LanguageManager for runtime locale
• Data Models
– Plain‐Kotlin data classes (User, Task, Mission, Mood, Streak, StreakDay, TaskGroup)
• External Services
– Firebase Auth / Firestore / Realtime Database (implied by google‑services.json)
– Local caching (if any) or Room (if integrated)
• Configuration & Resources
– Gradle build scripts, ProGuard, themes, drawables, strings
Relationships and Data Flow
• UI <‐> ViewModel:
– UI events (button taps, form input) invoke ViewModel calls
– ViewModel exposes UI state updates (via LiveData/StateFlow) back to UI
• ViewModel <‐> Repository:
– ViewModel calls repository methods to fetch/save data
– Repository interacts with Firebase SDK or local DB
• Repository <‐> External Service:
– Reads/writes from Firebase APIs (Auth, Firestore, Storage)
– Could also read/write local cache
Architectural Patterns
• MVVM: clear separation of concerns
• Repository Pattern: single point of data access and syncing
• Unidirectional data flow: UI → VM → Repo → External
• Modularization: UI components, ViewModels, Repositories, Models
Essential Details to Capture
• All major ViewModels and which Repositories they depend on
• Core data models flowing through the layers
• External Firebase services (Auth, Database, Storage) used by specific repositories
• The navigation component (NavigationWrapper) linking UI screens