You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Sealed classes for type-safe navigation and state management
198
+
-**Layered Architecture & UDF**: UI Layer (Compose + ViewModels with StateFlow), Domain/Model Layer (`model/`, `exception/`), and Data Layer (`data/repository/`, `data/local/`).
199
+
-**Repository Pattern**: Repositories act as the Single Source of Truth (SSOT). ViewModels never interact directly with DAOs, DataStores, or raw network clients.
200
+
-**Dependency Inversion**: Models and domain logic are decoupled from UI and ViewModel layers.
201
+
-**Component Placement Conventions**:
202
+
-**Global Reusable Components**: Place in `ui/component/` (e.g. `SummaryCard`, `LlmSwitcher`, `LlmIndicator`, `LogoIcon`, `ClickablePasteIcon`).
203
+
-**Page-Specific Components**: Place alongside the screen in `ui/page/` (or `ui/page/<feature>/`) scoped specifically to that screen/feature (e.g. `BilibiliLoginScreen.kt` sheet).
204
+
-**Custom Exceptions**: Centralized in `exception/SummaryException.kt` with string resource localization support.
Copy file name to clipboardExpand all lines: README.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,9 +86,21 @@ package previously.
86
86
87
87
-**History search**
88
88
89
+
## 🏗️ Architecture
90
+
91
+
The app follows Google's [official Android Architecture Recommendations](https://developer.android.com/topic/architecture/recommendations) and [Modern Android Development (MAD)](https://developer.android.com/courses/pathways/android-architecture) best practices:
92
+
93
+
-**Layered Architecture**:
94
+
-**UI Layer**: Built with Jetpack Compose and Material 3 Expressive, powered by ViewModels exposing reactive `StateFlow` and following Unidirectional Data Flow (UDF).
95
+
-**Domain & Model Layer (`model/`, `exception/`)**: Pure domain models and centralized custom exceptions decoupled from UI and data layers.
96
+
-**Data Layer (`data/`)**: Repositories act as the Single Source of Truth (SSOT), encapsulating Room SQLite DB, ProtoBuf DataStore, Ktor network client, and Koog LLM engine.
97
+
-**Dependency Injection**: Powered by Dagger Hilt for loose coupling and testability.
0 commit comments