Komi Store

repository·main·Indexed 10 days ago

https://github.com/kurikomi-labs/komi-store

A cross-platform application designed as a specialized app store for GitHub releases, enabling users to discover, manage, and install open-source software. Features include release browsing, a download mirror system, and localization in 13 languages. Available for Android, Windows (Scoop, WinGet), macOS (Homebrew), and Linux (Flatpak).

Tokens
10.7K
Snippets
33
Records
48
Agent score
96%

What's inside Komi Store

  1. Overview of Komi Store features

    main

    Komi Store is a cross-platform app store for GitHub releases designed to simplify discovering and installing open-source software. Key features include:

    • Smart discovery and recently released software tracking
    • Release browsing and direct installation
    • Download mirror system
    • App management and collections
    • Localization (available in 13 languages)
    • Tweaks, network, and performance optimizations
  2. How 'What's-new' entries are structured and loaded

    main

    The 'What's-new' feature uses individual JSON files named after the Android versionCode to display release notes in the in-app sheet and history screen. These files are loaded at runtime by WhatsNewLoaderImpl.

    Locale Resolution Logic

    Because Compose Multiplatform Resources does not automatically resolve locales in the files directory, WhatsNewLoaderImpl performs manual lookup in this order:

    1. files/whatsnew/<full-locale>/<versionCode>.json (e.g., zh-CN, pt-BR)
    2. files/whatsnew/<primary-locale>/<versionCode>.json (e.g., zh, pt)
    3. files/whatsnew/<versionCode>.json (English fallback)

    The resolution honors the in-app language override (via LocalizationManager) rather than just the OS locale.

    File Layout

    • Default (English): files/whatsnew/<versionCode>.json
    • Localized: files/whatsnew/<locale>/<versionCode>.json
    files/whatsnew/<versionCode>.json                  # default (English)
    files/whatsnew/<locale>/<versionCode>.json         # localized translation
  3. Generate offline dependency sources for Flatpak

    main

    Flatpak offline builds require all Maven and Gradle artifacts to be pre-pinned in JSON source files. Because the project uses Kotlin Multiplatform (KMP) and a custom build-logic classpath, you must generate two distinct source files to ensure full coverage.

    1. Project dependencies (flatpak-sources.json): Scans the Gradle cache to capture KMP multiplatform dependencies.
    2. Build-logic classpath (flatpak-sources-convention.json): Captures buildscript transitives (like gson) that the cache scan misses.

    Workflow:

    # 1. Generate project deps
    rm -rf ~/.gradle/caches                                                     # avoid pinning stale versions
    ./gradlew :composeApp:packageUberJarForCurrentOS --no-configuration-cache   # populate cache
    python3 packaging/flatpak/generate-all-sources.py                           # scan cache + auto-verify
    
    # 2. Generate build-logic classpath
    ./gradlew -p build-logic :convention:flatpakGradleGenerator --no-configuration-cache
    python3 packaging/flatpak/verify-sources.py packaging/flatpak/flatpak-sources-convention.json

    Note: Never commit a sources file that fails verify-sources.py. Every pinned URL must serve its recorded sha512 hash.

    # See content above
  4. Workflow for translating 'What's-new' entries

    main

    To provide translations for existing release notes:

    1. Copy the source file files/whatsnew/<versionCode>.json to the target locale directory: files/whatsnew/<your-locale>/<versionCode>.json (using BCP-47 codes like de, pt-BR, or zh-CN).
    2. Translate only the bullets text.
    3. Do not modify versionCode, versionName, releaseDate, showAsSheet, or the section type values.
    4. Submit a PR. Translations can be submitted independently of the release that introduced the version.
  5. Install Flatpak build prerequisites

    main

    To package Komi Store as a Flatpak, you must install flatpak and flatpak-builder using your distribution's package manager, then install the required Freedesktop runtimes and the OpenJDK 21 extension.

    Fedora

    sudo dnf install flatpak flatpak-builder

    Ubuntu/Debian

    sudo apt install flatpak flatpak-builder

    Arch

    sudo pacman -S flatpak flatpak-builder

    Required Runtimes

    flatpak install flathub org.freedesktop.Platform//24.08
    flatpak install flathub org.freedesktop.Sdk//24.08
    flatpak install flathub org.freedesktop.Sdk.Extension.openjdk21//24.08
    # See content above
  6. Build and test Komi Store Flatpak locally

    main

    Flatpak builds must be performed on Linux using flatpak-builder.

    Local Test Build To test locally without a remote git source, temporarily change the manifest's type to dir and path to ../../.

    Build Commands:

    cd packaging/flatpak
    
    # Build the application
    flatpak-builder --force-clean build-dir com.kurikomi.komistore.yml
    
    # Test run the application
    flatpak-builder --run build-dir com.kurikomi.komistore.yml komistore
    
    # Install the application locally
    flatpak-builder --user --install --force-clean build-dir com.kurikomi.komistore.yml
    cd packaging/flatpak
    flatpak-builder --force-clean build-dir com.kurikomi.komistore.yml
  7. Workflow for adding a new release entry

    main

    To add release notes for a new version, follow these steps:

    1. Create the JSON file at: core/presentation/src/commonMain/composeResources/files/whatsnew/<versionCode>.json.
    2. Register the new version by appending the versionCode to KnownWhatsNewVersionCodes.ALL in composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/whatsnew/WhatsNewLoaderImpl.kt.
    3. Ensure bullets are short, factual, and avoid marketing language.
  8. Install Komi Store on macOS via Homebrew

    main

    Install Komi Store on macOS using Homebrew.

    Note for macOS Users: Because the app is distributed outside the App Store and is not yet notarized, you may see a warning that Apple cannot verify the app. To bypass this, go to System SettingsPrivacy & SecurityOpen Anyway.

    brew tap OpenHub-Store/tap
    brew install --cask github-store
  9. Install Komi Store on Windows via Scoop or WinGet

    main

    You can install Komi Store on Windows using either the Scoop or WinGet package managers.

    # Using Scoop
    scoop bucket add scoop-bucket https://github.com/OpenHub-Store/scoop-bucket
    scoop install scoop-bucket/github-store
    
    # Using WinGet
    winget install zed.rainxch.githubstore
  10. Publish Komi Store to Flathub

    main

    Publishing requires domain verification and a specific Git workflow.

    Prerequisites:

    1. Domain Verification: kurikomi.com must host a verification token at https://kurikomi.com/.well-known/org.flathub.VerifiedApps.txt.
    2. Release Tag: The manifest's commit: must point to the SHA associated with a real release tag (e.g., v1.9.2).

    Publishing Steps:

    1. Fork the Flathub repository.
    2. Clone the new-pr branch and create a feature branch: git clone --branch=new-pr git@github.com:<you>/flathub.git && git checkout -b komistore new-pr.
    3. Copy the following files to the Flathub repo root:
      • com.kurikomi.komistore.yml
      • flatpak-sources.json
      • flatpak-sources-convention.json
      • flatpak-sources-manual.json
    4. Open a Pull Request against the new-pr branch titled Add com.kurikomi.komistore.
    # See content above
  11. Validate Flatpak manifest and AppStream metadata

    main

    Before publishing, validate the AppStream metainfo and lint the manifest.

    Validate AppStream metainfo:

    flatpak run org.freedesktop.appstream-glib validate com.kurikomi.komistore.metainfo.xml

    Lint manifest (requires org.flatpak.Builder runtime):

    flatpak run --command=flatpak-builder-lint org.flatpak.Builder manifest com.kurikomi.komistore.yml
    # See content above