Tivi Documentation

repository·main·Indexed 27 days ago

https://github.com/chrisbanes/tivi

A TV show tracking application connecting to Trakt.tv, built with Kotlin Multiplatform and Compose Multiplatform for Android, iOS, and Desktop JVM. Includes developer guides for API configuration, environment setup, and details on the TiviTrakt client and data models.

Tokens
809
Snippets
3
Records
10
Agent score
42%

What's inside Tivi

  1. Format code with ktlint via Spotless

    main

    Tivi uses ktlint for code style, managed by the spotless Gradle plugin. To automatically fix code style conflicts and apply formatting, run the following command in your terminal:

    ./gradlew spotlessApply
  2. Set up development for Android and Desktop

    main

    Tivi is a standard Gradle project. You can open it using recent versions of Android Studio or IntelliJ IDEA.

    • Android application module: android-app/app/ (:android-app:app)
    • Desktop application module: desktop-app/ (:desktop-app)
  3. Set up development for iOS

    main

    The iOS project is an Xcode project that uses CocoaPods for dependency management. Follow these steps to set up your environment:

    1. Setup Ruby: Install Ruby 3.3.4 and Bundler (using rbenv is recommended).
    2. Xcode: Use the version specified in the .xcode-version file.
    3. Install Dependencies: Run bundle install to install Ruby dependencies and pod install for CocoaPods.
    4. Open Project: Open the workspace file at ios-app/Tivi/Tivi.xcworkspace in Xcode.
    # Setup Ruby environment
    brew install rbenv
    rbenv init
    rbenv install 3.3.4
    rbenv global 3.3.4
    gem install bundler
    
    # Install project dependencies
    cd /path/to/tivi/checkout
    bundle install
    pod install --project-directory=ios-app/Tivi
  4. Configure API keys for Tivi

    main

    To run the application, you must provide API and client keys for Trakt.tv and TMDb. These should be added to your local ~/.gradle/gradle.properties file.

    Trakt.tv OAuth Configuration: When creating your Trakt API project, you must set the OAuth redirect URI based on the build type:

    • Debug builds: app.tivi.debug://auth/oauth2callback
    • Release builds: app.tivi://auth/oauth2callback
    # Get these from Trakt.tv
    TIVI_TRAKT_CLIENT_ID=<insert>
    TIVI_TRAKT_CLIENT_SECRET=<insert>
    
    # Get this from TMDb
    TIVI_TMDB_API_KEY=<insert>