Skip to content

About

Do you like getting inspiration from community projects ? Then this project is for you !

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

GitHub Trend banner

GitHub Trend

Desktop and mobile client for GitHub Trending. Rust core, Compose Multiplatform UI.

What it does today

  • Trending repositories for today / this week / this month / all time
  • Filter by language: several at once, the full catalogue in a searchable rail on desktop, the feed's languages as chips on mobile
  • Search across name, description and language
  • Sign in with GitHub through the device flow: the token is encrypted at rest with AES-256-GCM under a random device key
  • Star and watch a repository straight from its row, with the state flipped locally first and rolled back if GitHub refuses
  • Hide a repository from the feed; the header says how many are hidden and brings them back
  • Indicators per repository — stars, forks, watchers, open issues and pull requests, licence, topics, size, creation date, last push and latest release — plus the code mix by language as a stacked bar, all from one batched GraphQL request per twenty repositories and cached an hour (two REST requests per repository when signed out)
  • Detail sheet per repository: language breakdown with percentages and sizes, every counter as a tile, topics, and the star/watch/hide actions
  • Themes: system, light, dark and a true-black OLED palette, plus a theme editor with eight accents, a custom hex field and a live preview of the feed
  • Settings as a full page (two columns of cards on a wide window, one centred column on a phone) covering everything the core can be tuned to: appearance and density, avatars and the language bar, auto-refresh, the detail enrichment budget, both cache lifetimes, request timeout and retries, and the log level
  • Logging good enough to debug from a user's machine: one rotating file per day (fourteen kept), a line per HTTP request with status, duration, attempt and remaining quota, a panic hook, and a live viewer on the settings page
  • Instant paint from the local SQLite cache, then refresh in the background
  • Honest source badge: live, cached, or offline copy when the network fails
  • Every GitHub language in the filter rail, ranked by what the caches have seen (feed presence first, then code volume from the detail sheets) and the rest alphabetically behind a rule
  • Material icons, the real app logo in the sidebar, the window titlebar and the launcher, and 160 px avatars so the faces stay readable at 22 dp
  • Adaptive layout: side rail on wide windows, stacked filters on phones
  • English and French UI strings

Not ported yet (the previous release had it): image disk cache. iOS is not wired either.

Install

Straight from GitHub, nothing to clone. The script resolves the newest build, verifies it against the release's SHA256SUMS, then installs it:

# Linux desktop: unpacks to ~/.local/opt/GithubTrend, adds ~/.local/bin/github-trend
# and a menu entry
curl -fsSL https://github.com/YoannDev90/Github-Trend/releases/latest/download/install.sh | bash

# Android, over adb (USB debugging on)
curl -fsSL https://github.com/YoannDev90/Github-Trend/releases/latest/download/install.sh -o install.sh
bash install.sh --platform android

# remove it again (the data folder in ~/.local/share/Github_Trend stays)
curl -fsSL https://github.com/YoannDev90/Github-Trend/releases/latest/download/install.sh | bash -s -- --uninstall

releases/latest always points at the newest versioned release, so those URLs keep working across upgrades. To pin a specific build, add --version v2.0.1 (or any tag); --help lists the rest. Hand-made test builds live under preview-N tags and are published as pre-releases, which latest ignores.

On Arch, Fedora and anything that is not Debian, add --with-deps: the script inspects ldd, maps what is missing to packages for pacman/apt/dnf/zypper and installs them, which is what normally makes the first launch fail (libasound.so.2, libGL.so.1).

Prefer a file? Grab it from the same tag: github-trend-<version>-linux.deb, github-trend-<version>-linux.rpm (Fedora, openSUSE), github-trend-<version>-linux.tar.gz, github-trend-<version>-android.apk.

From a checkout, the same script installs a local build:

bash scripts/install.sh                     # newest build, desktop, ~/.local
bash scripts/install.sh --platform android  # newest build over adb
bash scripts/install.sh --file dist/github-trend-<sha>-linux.tar.gz

On desktop it unpacks to ~/.local/opt/GithubTrend, writes ~/.local/bin/github-trend and a .desktop entry. Useful flags: --version TAG, --prefix DIR, --file TARBALL (install a local build), --with-deps (installs missing shared libraries through pacman/apt/dnf/zypper), --skip-deps-check, --skip-desktop-entry. After installing, it looks for unresolved ldd dependencies and prints the exact package command for your distribution instead of failing mysteriously at startup.

The desktop bundles are Linux x86_64 only: jpackage cannot cross-build a JRE. Android ships one .so per ABI, so the APK runs on arm64-v8a and x86_64.

The .deb, the .rpm and the tarball hold the same tree; the tarball is the one for distributions without a native package, or when the script is preferred. If the window stays blank on a machine without working GL, force software rendering by adding java-options=-Dskiko.renderApi=SOFTWARE to lib/app/GithubTrend.cfg.

Build and run

Requirements: Rust (stable), JDK 21, and an Android SDK carrying the packages declared in gradle.properties when you build for Android.

make core-test      # cargo test on the Rust core
make desktop-run    # builds the core, then launches the desktop app
make android-build  # debug APK, cross-compiling the core for arm64-v8a + x86_64
make bindings       # regenerate the Kotlin bindings after an API change

The Android build installs the Rust targets it needs (rustup target add runs before each cross-compile) and looks for the NDK at $ANDROID_HOME/ndk/$ndkVersion, or wherever ANDROID_NDK_HOME points.

Add another ABI with ./gradlew :androidApp:assembleDebug -PandroidAbis=arm64-v8a,x86_64,armeabi-v7a; the matching Rust triple comes from the map in androidApp/build.gradle.kts.

Versions

Nothing that has one obvious home is repeated elsewhere:

Value Source
app version core/Cargo.toml ([workspace.package] version) — the core logs it, CoreInfo exposes it, Gradle reads it for the APK versionName and the desktop package version
APK versionCode derived as major*10000 + minor*100 + patch, override with -PappVersionCode=
namespace / applicationId appNamespace in gradle.properties
ABIs androidAbis in gradle.properties
NDK ndkVersion in gradle.properties
SDK packages androidSdkPackages in gradle.properties, read by both workflows

Bumping a release is therefore a one-line edit in core/Cargo.toml, and a mismatched gradle.properties fails at configuration instead of shipping a half-updated build.

Without make:

cd core && cargo build
./gradlew :composeApp:run                 # desktop
./gradlew :androidApp:assembleDebug      # android

Architecture

core/                    Rust, exposed through UniFFI
  gh-trend-core/         trending fetch + parse, cache policy, SQLite, logging
composeApp/              Kotlin Multiplatform library (Android + desktop)
  commonMain/kotlin      UI, state holder, core facade (platform agnostic)
    .../core/            UniFFI generated bindings (regenerate with `make bindings`)
  desktopMain/           JVM entry point, jpackage config
  androidMain/           Activity and the JNA dependency
androidApp/              Android application shell
  src/main/              manifest, theme, launcher icon

core is built by cargo as a cdylib and reaches Kotlin through UniFFI + JNA: on desktop it is copied next to the app and jpackage bundles it in app/resources; on Android one .so per ABI is cross-compiled with the NDK and packed under lib/<abi>/.

The Kotlin side never talks HTTP or SQL: CoreGateway is the only door into the Rust core, and it moves every blocking call onto Dispatchers.IO.

Language ranking

GitHub has no endpoint that ranks languages, and Octoverse publishes a ranking once a year with no API. So the order is data, generated in CI and shipped as a file the app downloads:

  • data/octoverse-baseline.json is the editorial base (Octoverse 2025, monthly contributors): TypeScript, Python, JavaScript, Java, C#.
  • .github/workflows/languages.yml runs monthly, counts repositories per language with the GitHub search API, and commits data/languages.json: Octoverse order first, the repository count as the monthly indicator.
  • The core fetches that file (popularityUrl in the config), caches the parsed list for 30 days in popularity_cache, and falls back to the cache when the file is unreachable. Regenerate it locally with make languages.

Data compatibility

The app reuses the data folder and SQLite schema of previous releases (~/.local/share/Github_Trend on Linux, %LOCALAPPDATA%\Github_Trend on Windows, ~/Library/Application Support/Github_Trend on macOS). Existing cache entries are picked up, and schema migrations are additive only.

Status

Work in progress on feat/rust-core-compose-multiplatform. Desktop builds, loads the native core and passes its tests; the Android APK ships the core for arm64-v8a and x86_64; iOS is not wired yet.

Licence

See LICENSE.

About

Do you like getting inspiration from community projects ? Then this project is for you !

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Contributors

Languages