How jesushzc/runique works
Main Components
• Mobile App (app module): Acts as the primary user interface and entry point for runners. It contains the main activity, navigation, and high-level app logic.
• Wear OS App (wear/app & wear/run modules): Provides a tailored interface and functionality for wearables, including sync with the mobile application and specialized features like heart rate tracking and ambient mode.
• Domain-Specific Modules:
• Analytics (analytics/…): Handles analytics features, with clear separation into feature (presentation/UI for analytics), data (persistence and repository logic), and domain layers (business rules and models).
• Authentication (auth/…): Covers user logins, registration, and credential validation. Notice the layered break into data, domain, and presentation.
• Run Tracking (run/…): Manages the core functionalities of recording runs (using location, network, and connectivity modules). It includes distinct layers like run data, domain logic, network handling, and presentation (for active run and run overview screens).
• Core Modules (core/…): Common functionalities such as connectivity, database (via Room), notifications, shared design system (UI/design system, both for mobile and wear), and utilities. These modules provide shared infrastructure (e.g., encrypted session storage, local run data sources) used across features.
Architectural Patterns and Design Principles
• MVI Pattern: While not mandatory to show every internal ViewModel and state, indicate that the presentation layer follows a Model-View-Intent pattern.
• Separation of Concerns: Show how responsibilities are divided (e.g., UI in presentation modules, business rules in domain, and external data handling in data modules).
• Technologies: Mention key technologies such as Jetpack Compose (for UI), Ktor (for networking), Room (for database), WorkManager (for background tasks), and services like Foreground service for long‐running tasks.
Relationships and Interactions
• Mobile App ↔ Auth: for user login and registration.
• Mobile App ↔ Run Tracking: for initiating, tracking, and reviewing runs.
• Mobile App ↔ Analytics: to display detailed statistics.
• A two-way communication link between Mobile App and Wear App (syncing data, run progress, etc.).
• Within each module (Auth, Analytics, Run), layout the three layers:
• Presentation Layer (UI components, activities/fragments with Jetpack Compose)
• Domain Layer (business logic, use cases)
• Data Layer (repositories, network layers using Ktor, and local persistence via Room)
• Core modules are shared and interact with multiple feature modules. For example, Core/Database is used by both Analytics and Run; similarly, Core/Connectivity facilitates communication to the wear-side components.