How zaemazmi/qurannexusmobile works
Main Components
• Mobile Application (Client): This is the Android app that includes multiple feature modules.
• Presentation/UI Layer: Activities, Fragments, and custom views defined in XML (e.g., MainActivity, SplashActivity, various fragments under features such as auth, quiz, home, recitation, etc.).
• ViewModel Layer: Located inside each feature (e.g., BookmarkWordsViewModel, QuizViewModel, HomepageStatisticsViewModel) responsible for the MVVM architecture.
• Domain/Business Logic: The core functionalities and utility classes (packages like core/utils, core/models, core/network) that implement business logic.
• Data Layer: Repositories (for bookmarks, prayer times, quizzes, etc.) along with network interfaces (ApiService, AuthApi, QuranApi, etc.) that interact with the backend.
• External Backend Services: The Laravel PHP backend (accessed via API calls) and the MongoDB database. Include AWS S3 integration for multimedia storage.
• Multimedia Services: Media3 ExoPlayer for audio playback integrated into the recitation features.
• Dependency Injection: Hilt is used across the layers for managing dependencies.
Architectural Relationships and Interactions
• The Presentation Layer interacts with ViewModels that, in turn, invoke Repositories.
• The Repositories are responsible for managing data sources, which include making API calls (using Retrofit or similar under the networking package) to the Laravel backend and fetching/storing multimedia content via AWS S3.
• All API responses and data manipulations are streamlined through the core/interfaces and utility packages.
• Additional auxiliary components include analytics, graphs (using MPAndroidChart), and navigation managed via the Jetpack Navigation Component.
Architectural Patterns and Tools
• MVVM Pattern: Clearly separate the UI (activities/fragments), the ViewModels (data & state management), and the data repositories.
• Feature-Based Modularity: Each major functionality (analysis, auth, bookmark, quiz, recitation, etc.) is encapsulated in its own package under the “features” directory.
• Dependency Injection with Hilt maintains a clean architecture across modules.
• Utilization of Jetpack Navigation along with custom views for dynamic UI rendering.
• Media Handling: Use of Media3 ExoPlayer for audio services.
• Graphical & Statistical Data: MPAndroidChart for visual representation.
• At the top level, show the Android App divided into layers: Presentation, ViewModel, and Data/Repository.
• Under the Data/Repository layer, detail which components interact with the External Backend (Laravel API) and external storage (AWS S3).
• Intersperse the feature-based modules as sub-components within each layer (for example “Features: Auth, Bookmark, Quiz, Recitation, Words, etc.”).
• Dependency injection (Hilt) as an overarching mechanism present in every layer.