How victorhvs/trading-fight-club-mobile works
Project type and purpose
• This is a full-stack Android mobile application (TradingFight.club) built in Kotlin using Modern Android development (Jetpack Compose, Coroutines, Paging).
• Its purpose is to deliver a financial social network: display stock data, user profiles, rankings, portfolios, and allow buy/sell actions, all backed by Firebase.
File structure
• Top-level “app/” module holds the Android application code.
• src/main/java/com/victorhvs/tfc:
– core: shared utilities (DispatcherProvider for Coroutines, Resource/State wrappers).
– data: data-layer (datasources, paging, DI, extensions, fake for tests, repository implementations).
– domain: clean-architecture boundary (models, enums, repository interfaces, use-cases).
– presentation: UI-layer (Compose screens, components, ViewModels, navigation graphs, theming, extensions).
• src/test & src/androidTest: unit and instrumentation tests using fake datasources and CoroutinesRule.
• Build files: Gradle Kotlin DSL, Proguard rules.
• CI: .github/workflows/tfc.yml, common GitHub-Action steps.
• Config: detekt, lint rules.
README for additional insights
• MVP features map to screens: Splash, Home, Stocks, Ranking, Profile, Stock Detail, Search.
• CI/CD via GitHub Actions is in place.
a. Main components
• Android Client App
– Presentation Layer (Compose Screens & ViewModels)
– Domain Layer (Use-Cases & Interfaces)
– Data Layer (Repositories & DataSources)
– Dependency Injection module (DI.kt)
• External Services
– Firebase Firestore (stocks, rankings, profiles)
– Firebase Authentication
• (Optional) Local device storage or caching if any (not present, but mention Room if added)
• CI/CD Pipeline (GitHub Actions)
b. Relationships & interactions
• User taps UI → Compose Screen invokes ViewModel
• ViewModel calls appropriate Use-Case
• Use-Case calls Repository interface
• Repository implementation uses DataSource to fetch from Firebase (or FakeDataSource for tests)
• DataSource returns domain models via Coroutines Flow/LiveData
• DI module wires ViewModels → Use-Cases → Repositories → DataSources
• CI/CD workflow triggers build/test on commit → deploy to Play Store placeholder
c. Architectural patterns & principles
• Clean Architecture / MVVM
• Single-Activity, multiple Compose-based screens (Navigation Graph)
• Separation of Concerns: Presentation / Domain / Data
• Coroutines DispatcherProvider for testable threading
• Repository Pattern, Paging 3 for infinite scroll
• Dependency Injection (manual DI via DI.kt)
d. Key technologies & frameworks
• Kotlin, Jetpack Compose, AndroidX Navigation, Paging 3
• Firebase Firestore & Auth
• Coroutines & Flow
• JUnit + AndroidX Test + CoroutinesRule for testing
• GitHub Actions for CI/CD
• Detekt & lint for static analysis
Detailed capture of essential elements
• Don’t simply list classes; group them by layer and responsibility.
• MVVM flow and Clean Architecture boundaries.
• Test harness path (FakeDataSource) branching off the Data layer.
Summary: