Skip to content

Commit 68ebb66

Browse files
committed
docs(readme): update feature structure and technical specifications
- **Feature Details**: - Add readme translation support with `TranslationRepository` and new UI components (`LanguagePicker`, `TranslationControls`). - Expand domain models for translation and download management (downgrade warnings, asset selection). - Update `DetailsScreen` route to include `isComingFromUpdate` flag. - Add Shizuku-based silent installation support for Android. - **Core Improvements**: - Rename `settings` module to `profile` and add `SponsorScreen`. - Enhance `core/domain` and `core/data` with `ProxyRepository`, `RateLimitRepository`, and comprehensive Shizuku integration. - Update localization to support 11 languages. - **Maintenance**: - Bump version to 1.6.2 (Target SDK 36). - Upgrade dependencies: Kotlin (2.3.10), Compose Multiplatform (1.10.1), Ktor (3.4.0), Room (2.8.4), Koin (4.1.1). - Add WorkManager, Shizuku API, and Kotlinx Datetime dependencies.
1 parent b4d66b2 commit 68ebb66

2 files changed

Lines changed: 59 additions & 32 deletions

File tree

β€ŽCLAUDE.mdβ€Ž

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
GitHub Store is a cross-platform app store for GitHub releases, built with **Kotlin Multiplatform (KMP)** and **Compose Multiplatform**. Targets **Android** (min API 26) and **Desktop** (Windows, macOS, Linux via JVM).
66

7-
Package: `zed.rainxch.githubstore`
7+
Package: `zed.rainxch.githubstore` | Version: 1.6.2 (code 13) | Target SDK: 36
88

99
## Build & Run Commands
1010

@@ -45,8 +45,8 @@ feature/
4545
dev-profile/ # Developer/user profile display
4646
favourites/ # Saved favorite repositories (presentation-only)
4747
home/ # Main discovery screen (trending, hot, popular)
48+
profile/ # User profile, settings, appearance, proxy, Shizuku installer
4849
search/ # Repository search with filters
49-
settings/ # App settings (theme, account, appearance)
5050
starred/ # Starred repositories (presentation-only)
5151
build-logic/convention/ # Custom Gradle convention plugins
5252
```
@@ -86,9 +86,9 @@ class XViewModel : ViewModel() {
8686
Type-safe navigation using `@Serializable` sealed interface `GithubStoreGraph`:
8787

8888
```
89-
HomeScreen, SearchScreen, AuthenticationScreen, SettingsScreen,
90-
FavouritesScreen, StarredReposScreen, AppsScreen
91-
DetailsScreen(repositoryId, owner, repo)
89+
HomeScreen, SearchScreen, AuthenticationScreen, ProfileScreen,
90+
FavouritesScreen, StarredReposScreen, AppsScreen, SponsorScreen
91+
DetailsScreen(repositoryId, owner, repo, isComingFromUpdate)
9292
DeveloperProfileScreen(username)
9393
```
9494

@@ -102,26 +102,29 @@ Routes defined in `composeApp/.../app/navigation/GithubStoreGraph.kt`, wired in
102102

103103
| Module | Purpose | Key Contents |
104104
|--------|---------|--------------|
105-
| `core/domain` | Shared contracts | Repository interfaces (`FavouritesRepository`, `StarredRepository`, `InstalledAppsRepository`, `ThemesRepository`), models (`GithubRepoSummary`, `GithubRelease`, `InstalledApp`, `ProxyConfig`), system interfaces (`Downloader`, `Installer`, `PackageMonitor`) |
106-
| `core/data` | Shared implementations | `HttpClientFactory` (Ktor + interceptors), `AppDatabase` (Room), `ProxyManager`, `TokenStore`, `LocalizationManager`, platform-specific clients (OkHttp for Android, CIO for Desktop) |
107-
| `core/presentation` | Shared UI | `GithubStoreTheme` (Material 3), reusable components (`RepositoryCard`, `GithubStoreButton`), formatting utils |
105+
| `core/domain` | Shared contracts | Repository interfaces (`FavouritesRepository`, `StarredRepository`, `InstalledAppsRepository`, `ThemesRepository`, `ProxyRepository`, `RateLimitRepository`), models (`GithubRepoSummary`, `GithubRelease`, `InstalledApp`, `ProxyConfig`, `InstallerType`, `ShizukuAvailability`), system interfaces (`Installer`, `InstallerInfoExtractor`, `InstallerStatusProvider`, `PackageMonitor`) |
106+
| `core/data` | Shared implementations | `HttpClientFactory` (Ktor + interceptors), `AppDatabase` (Room), `ProxyManager`, `TokenStore`, `LocalizationManager`, platform-specific clients (OkHttp for Android, CIO for Desktop), Shizuku integration (Android: `ShizukuServiceManager`, `ShizukuInstallerWrapper`, `ShizukuInstallerServiceImpl`, `AndroidInstallerStatusProvider`; Desktop: `DesktopInstallerStatusProvider`) |
107+
| `core/presentation` | Shared UI | `GithubStoreTheme` (Material 3), reusable components (`RepositoryCard`, `GithubStoreButton`), formatting utils, localized strings (11 languages) |
108108

109109
## Tech Stack
110110

111111
| Area | Library | Version |
112112
|------|---------|---------|
113-
| Language | Kotlin | 2.3.0 |
114-
| UI | Compose Multiplatform | 1.9.0-beta01 |
115-
| HTTP | Ktor | 3.2.3 |
116-
| Database | Room | 2.7.2 |
117-
| DI | Koin | 4.1.0 |
118-
| Serialization | Kotlinx Serialization | 1.9.0 |
119-
| Preferences | DataStore | 1.1.7 |
120-
| Image Loading | Landscapist (Coil3) | 2.9.1 |
113+
| Language | Kotlin | 2.3.10 |
114+
| UI | Compose Multiplatform | 1.10.1 |
115+
| HTTP | Ktor | 3.4.0 |
116+
| Database | Room | 2.8.4 |
117+
| DI | Koin | 4.1.1 |
118+
| Serialization | Kotlinx Serialization | 1.10.0 |
119+
| Preferences | DataStore | 1.2.0 |
120+
| Image Loading | Landscapist (Coil3) | 2.9.5 |
121121
| Logging | Kermit | 2.0.8 |
122-
| Permissions | MOKO Permissions | 0.19.1 |
123-
| Navigation | Navigation Compose | 2.9.1 |
124-
| Markdown | Multiplatform Markdown Renderer | 0.39.1 |
122+
| Permissions | MOKO Permissions | 0.20.1 |
123+
| Navigation | Navigation Compose | 2.9.2 |
124+
| Markdown | Multiplatform Markdown Renderer | 0.39.2 |
125+
| Shizuku | Shizuku API | 13.1.5 |
126+
| Background Work | WorkManager | 2.11.1 |
127+
| Date/Time | Kotlinx Datetime | 0.7.1 |
125128

126129
All versions managed in `gradle/libs.versions.toml` (Version Catalog).
127130

@@ -151,7 +154,8 @@ Custom Gradle plugins in `build-logic/convention/` standardize module setup:
151154

152155
## Key Configuration
153156

154-
- **GitHub OAuth:** Set `GITHUB_CLIENT_ID` in `local.properties`. Callback URL: `githubstore://callback`
157+
- **GitHub OAuth:** Set `GITHUB_CLIENT_ID` in `local.properties`. Callback URL: `githubstore://callback`. Deep link: `githubstore://repo`
158+
- **Shizuku (Android):** Optional silent install via `ShizukuProvider` (registered in AndroidManifest). Requires Shizuku app running with ADB or root. AIDL service passes APK via `ParcelFileDescriptor` to `pm install -S`. Falls back to standard installer on failure.
155159
- **Gradle properties:** Config cache enabled, build cache enabled, 4GB Gradle heap, 3GB Kotlin daemon heap
156160
- **Code style:** Official Kotlin style (`kotlin.code.style=official`)
157161

β€Žfeature/details/CLAUDE.mdβ€Ž

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Purpose
44

5-
Repository detail screen. Displays full info for a GitHub repository including owner profile, stats, releases with download links, readme rendering, and installation/update flow. This is the most complex feature module (~27 presentation files).
5+
Repository detail screen. Displays full info for a GitHub repository including owner profile, stats, releases with download links, readme rendering (with translation support), and installation/update flow. This is the most complex feature module.
66

77
## Module Structure
88

@@ -11,14 +11,21 @@ feature/details/
1111
β”œβ”€β”€ domain/
1212
β”‚ β”œβ”€β”€ model/
1313
β”‚ β”‚ β”œβ”€β”€ ReleaseCategory.kt # Release filtering categories
14-
β”‚ β”‚ └── RepoStats.kt # Stars, forks, open issues
15-
β”‚ └── repository/DetailsRepository.kt # Repo, releases, readme, stats, user profile
14+
β”‚ β”‚ β”œβ”€β”€ RepoStats.kt # Stars, forks, open issues
15+
β”‚ β”‚ β”œβ”€β”€ SupportedLanguage.kt # Languages for readme translation
16+
β”‚ β”‚ └── TranslationResult.kt # Translation response model
17+
β”‚ └── repository/
18+
β”‚ β”œβ”€β”€ DetailsRepository.kt # Repo, releases, readme, stats, user profile
19+
β”‚ └── TranslationRepository.kt # Readme translation
1620
β”œβ”€β”€ data/
1721
β”‚ β”œβ”€β”€ di/SharedModule.kt # Koin: detailsModule
18-
β”‚ β”œβ”€β”€ repository/DetailsRepositoryImpl.kt # API calls + readme localization
19-
β”‚ β”œβ”€β”€ readme/ReadmeLocalizationHelper.kt # Find readme in user's language
20-
β”‚ β”œβ”€β”€ dto/ # Network DTOs
21-
β”‚ └── mappers/ # DTO β†’ domain model mappers
22+
β”‚ β”œβ”€β”€ repository/
23+
β”‚ β”‚ β”œβ”€β”€ DetailsRepositoryImpl.kt # API calls + readme localization
24+
β”‚ β”‚ └── TranslationRepositoryImpl.kt # Translation API integration
25+
β”‚ β”œβ”€β”€ model/ReadmeAttempt.kt # Readme fetch attempt tracking
26+
β”‚ └── utils/
27+
β”‚ β”œβ”€β”€ ReadmeLocalizationHelper.kt # Find readme in user's language
28+
β”‚ └── preprocessMarkdown.kt # Markdown preprocessing
2229
└── presentation/
2330
β”œβ”€β”€ DetailsViewModel.kt # State management for detail screen
2431
β”œβ”€β”€ DetailsState.kt # Repo, releases, readme, download progress, etc.
@@ -28,17 +35,26 @@ feature/details/
2835
β”œβ”€β”€ model/
2936
β”‚ β”œβ”€β”€ DownloadStage.kt # Download progress tracking
3037
β”‚ β”œβ”€β”€ InstallLogItem.kt # Installation log entries
31-
β”‚ └── LogResult.kt # Log result types
38+
β”‚ β”œβ”€β”€ LogResult.kt # Log result types
39+
β”‚ β”œβ”€β”€ ShowDowngradeWarning.kt # Downgrade confirmation model
40+
β”‚ β”œβ”€β”€ SupportedLanguages.kt # UI language list
41+
β”‚ β”œβ”€β”€ TranslationState.kt # Translation UI state
42+
β”‚ └── TranslationTarget.kt # Translation target selection
3243
β”œβ”€β”€ components/
3344
β”‚ β”œβ”€β”€ AppHeader.kt # App icon, name, developer
45+
β”‚ β”œβ”€β”€ LanguagePicker.kt # Readme translation language selector
46+
β”‚ β”œβ”€β”€ ReleaseAssetsPicker.kt # Asset selection for download
3447
β”‚ β”œβ”€β”€ SmartInstallButton.kt # Context-aware install/update/open button
3548
β”‚ β”œβ”€β”€ StatItem.kt # Individual stat display
49+
β”‚ β”œβ”€β”€ TranslationControls.kt # Translation UI controls
3650
β”‚ β”œβ”€β”€ VersionPicker.kt # Release version selector
51+
β”‚ β”œβ”€β”€ VersionTypePicker.kt # Stable/pre-release filter
3752
β”‚ └── sections/
3853
β”‚ β”œβ”€β”€ About.kt # Description & topics
3954
β”‚ β”œβ”€β”€ Header.kt # Top header section
4055
β”‚ β”œβ”€β”€ Logs.kt # Installation/download logs
4156
β”‚ β”œβ”€β”€ Owner.kt # Repository owner info
57+
β”‚ β”œβ”€β”€ ReportIssue.kt # Issue reporting section
4258
β”‚ β”œβ”€β”€ Stats.kt # Stars, forks, issues
4359
β”‚ └── WhatsNew.kt # Release changelog
4460
β”œβ”€β”€ states/ErrorState.kt # Error display composable
@@ -47,8 +63,7 @@ feature/details/
4763
β”œβ”€β”€ LogResultAsText.kt # Log result formatting
4864
β”œβ”€β”€ MarkdownImageTransformer.kt # Transform relative image URLs
4965
β”œβ”€β”€ MarkdownUtils.kt # Markdown preprocessing
50-
β”œβ”€β”€ SystemArchitecture.kt # Platform architecture detection
51-
└── isLiquidFrostAvailable.kt
66+
└── SystemArchitecture.kt # Platform architecture detection
5267
```
5368

5469
## Key Interfaces
@@ -63,20 +78,28 @@ interface DetailsRepository {
6378
suspend fun getRepoStats(owner: String, repo: String): RepoStats
6479
suspend fun getUserProfile(username: String): GithubUserProfile
6580
}
81+
82+
interface TranslationRepository {
83+
suspend fun translate(text: String, targetLanguage: SupportedLanguage): TranslationResult
84+
}
6685
```
6786

6887
## Navigation
6988

70-
Route: `GithubStoreGraph.DetailsScreen(repositoryId: Long, owner: String, repo: String)`
89+
Route: `GithubStoreGraph.DetailsScreen(repositoryId: Long, owner: String, repo: String, isComingFromUpdate: Boolean)`
7190

72-
Can be reached via repo ID or owner+name (for deep links). Falls back to owner+name lookup if `repositoryId == -1`.
91+
Can be reached via repo ID or owner+name (for deep links). Falls back to owner+name lookup if `repositoryId == -1`. `isComingFromUpdate` flag indicates navigation from an update notification.
7392

7493
## Implementation Notes
7594

7695
- Readme supports localization: `ReadmeLocalizationHelper` tries to find readme in user's language first
96+
- Readme translation: `TranslationRepository` translates readme content to user's chosen language via `LanguagePicker`
7797
- Markdown rendering uses `multiplatform-markdown-renderer` with custom `MarkdownImageTransformer` for relative URLs
7898
- Download flow tracks stages via `DownloadStage` (idle β†’ downloading β†’ installing β†’ done)
7999
- `SmartInstallButton` changes behavior based on installed/update-available/not-installed state
100+
- `ReleaseAssetsPicker` allows selecting specific assets; `VersionTypePicker` filters stable vs pre-release
80101
- Version picker allows selecting specific releases for download
102+
- Downgrade warning shown when installing an older version than currently installed
81103
- Integrates with `FavouritesRepository`, `StarredRepository`, `InstalledAppsRepository` from core
82104
- Uses `Downloader` and `Installer` interfaces from core/domain for platform-specific download/install
105+
- On Android, install may use Shizuku (silent) or standard system installer depending on user preference in profile settings

0 commit comments

Comments
Β (0)