How hoangthan/note-app works
Project type and purpose
• This is a full-stack Android application (“Note App”) built with Clean Architecture.
• Purpose: allow users to create, read, update, delete and mark notes complete, with dynamic backgrounds and theming.
File structure
• Top-level Gradle modules:
• app – the Android application entry point
• features – UI modules, one per feature (core, dynamic-background, note)
• libraries – domain+data libraries, mirroring the features (core, dynamic-background, note)
• Each feature/library follows a layered package structure (e.g. domain/usecase, data/repository, data/datasource).
• Configuration files: Gradle scripts (build.gradle, common.gradle, settings.gradle), ProGuard rules, AndroidManifest.xml.
README for additional insights
• Architecture: Clean Architecture with three layers (Data, Domain, Features) that are modularized into libraries and features Gradle modules.
• Tech stack: Kotlin, Jetpack Compose, MVVM, Coroutines, Flow, Hilt DI, Room, Paging.
a. Main components
• App Module: MainApplication, MainActivity, Hilt setup
• Feature UI Modules:
• Core UI (themes, typography)
• UI (Compose screens + ViewModels)
• Dynamic-Background UI (ViewModel + Composables)
• Library Modules (Domain+Data):
• Core Data/Domain (DispatcherProvider, extensions)
• Domain & Data (UseCases, Repository, Room DAO, Entities, Mappers)
• Dynamic-Background Domain & Data (UseCase, repository interface, local image repository)
• External Services & Components:
• Room Database
• Hilt dependency graph
• Android Framework (Activity lifecycle, resource system)
b. Relationships and interactions
• App → depends on all Feature UI Modules
• Each Feature UI Module → depends on its corresponding Library Module
• Library Module domain layer → exposes UseCase APIs
• Library Module data layer → implements repository, data sources (Room, local files)
• UI (Compose) → ViewModel → UseCase → Repository → DAO/DB
• Hilt DI provides binding between layers
c. Architectural patterns/design principles
• Clean Architecture (separation of Data/Domain/UI)
• MVVM in UI modules (ViewModel mediating UI & domain)
• Dependency Inversion (UI depends on abstractions (use cases), not concrete repos)
• Package-by-feature and module-by-layer
d. Key technologies/frameworks
• Kotlin & Jetpack Compose for UI
• AndroidX ViewModel, LiveData/StateFlow
• Hilt for DI
• Room for local persistence
• Coroutines + Flow for asynchronous streams
• Paging for large lists
Detailed capture of essential elements
• Package names or module names on containers
• Call out Hilt modules and injection points