How stevdza-san/nutrisport works
Project Type and Purpose
• This is a Kotlin Multiplatform (KMP) mobile e-commerce application targeting both Android and iOS.
• It follows a multi-module, clean-architecture style: UI in feature modules, shared UI components, domain/data layers, navigation, DI, and backend Firebase functions.
File Structure
• Top-level modules:
• composeApp: the Android Compose Multiplatform host.
• iosApp: the native iOS SwiftUI/Swift host.
• data: common repository implementations and domain interfaces.
• di: Koin modules for dependency injection per platform and common.
• navigation: shared navigation graph.
• shared: common UI components, resources, domain models, and utilities.
• feature/*: one module per feature (auth, home, categories, cart, checkout, details, payment_completed, profile, admin_panel/manage_product).
• FIREBASE: cloud functions folder for server-side logic.
• Build scripts and configuration files: Gradle Kotlin DSL for module builds, google-services.json, Firebase config, Xcode projects, etc.
README
• Confirms the app is an online course example: a multi-modular e-commerce app built with KMP and Firebase.
Main Components to Model
a. Mobile Hosts
• Android Host (composeApp)
• iOS Host (iosApp)
b. Shared Layers
• UI Layer: feature modules + shared components
• Navigation Layer (navigation module)
• DI Layer (di module)
• Domain/Data Layer (data module + shared domain types)
c. External Services
• Firebase Cloud Functions (FIREBASE/functions)
• Firebase Auth & Firestore (configured via google-services.json)
Relationships and Interactions
• Hosts → inject DI modules (android or iOS) → expose ViewModels and Screens from feature modules.
• Feature Screens call ViewModels → injected domain interfaces (e.g., ProductRepository, OrderRepository).
• Repositories in data module call Firebase services or Cloud Functions.
• Navigation module provides NavGraph to wire feature screens.
• Shared module provides UI widgets, composable resources, and common domain models.
Architectural Patterns and Principles
• Clean architecture (separation into UI, domain, data).
• MVVM in each feature (Screen + ViewModel).
• Kotlin Multiplatform for code reuse across Android/iOS.
• DI via Koin modules (common + platform).
• Feature-based modularization for independent development and fast builds.