TvManiac is a personal learning playground for Kotlin Multiplatform development. Contributions that fix bugs, improve documentation, or demonstrate KMP patterns are welcome.
| Tool | Version |
|---|---|
| JDK | 21 (Zulu recommended: https://www.azul.com/downloads/?package=jdk#zulu) |
| Android Studio | Latest stable or canary |
| Xcode | 16.4 (iOS contributions) |
| KMM Plugin | Latest compatible with the Kotlin version in gradle/libs.versions.toml |
CocoaPods is not used. The iOS app consumes the shared KMP framework as an XCFramework built by Gradle.
git clone https://github.com/thomaskioko/tv-maniac.git
cd tv-maniac
./scripts/install-git-hooks.shThe git hooks run Spotless formatting checks before each commit. A commit is blocked if formatting fails.
Fix formatting with ./gradlew spotlessApply and then re-commit.
The app requires TMDB and Trakt credentials at build time. See docs/setup.md for how to
obtain them. Create local.properties in the project root:
TMDB_API_KEY=your_tmdb_api_key
TRAKT_CLIENT_ID=your_trakt_client_id
TRAKT_CLIENT_SECRET=your_trakt_client_secret
TRAKT_REDIRECT_URI=tvmaniac://auth/traktThis file is gitignored. Do not commit it.
Android (debug):
./gradlew :app:assembleDebugFor a faster local build that skips the iOS XCFramework:
./gradlew assembleDebug -Ptvmaniac.debugOnly=trueiOS:
Open ios/tv-maniac.xcodeproj in Xcode 16.4, select a simulator or device, and run.
# JVM unit tests (fast, no device needed)
./gradlew jvmTest
# Android connected tests (requires a running emulator or device)
./gradlew connectedAndroidTest
# iOS simulator tests
./gradlew iosSimulatorArm64Test -Papp.enableIos=trueKotlin:
- 2-space indentation, 140-character line length.
- Use
ImmutableListandtoImmutableList()fromkotlinx.collections.immutablefor state classes. - No try-catch blocks that silently swallow errors. Propagate exceptions up to the presentation layer.
- Fakes, not mocks. Each
data/*/testingmodule provides fake implementations for tests. - Test names follow the pattern:
should X given Y. Do not include function names in test names. - Spotless enforces formatting. Run
./gradlew spotlessApplybefore pushing.
Swift:
- Follow the Swift API Design Guidelines.
- Format with SwiftFormat. Check with
fastlane ios check_swift_formatbefore pushing. - Do not add business logic to SwiftUI views. Views consume shared KMP presenters only.
General:
- No comments in code unless the intent cannot be expressed through naming.
- Always specify access modifiers on all Kotlin declarations.
- Business logic belongs in shared KMP code (
domain/*,data/*), never in platform UI layers.
- Fork the repository and create your branch from
main. - Keep branches focused on a single concern. Large refactors should be discussed in an issue first.
- Ensure CI passes: Spotless, unit tests, and lint checks must all be green.
- Include a clear description in your PR: what changed, why, and how to test it.
- Reference any related issue with
Closes #123orRelates to #123in the PR body.
PRs that add new architectural patterns should also update the relevant file under docs/architecture/.
Before contributing, read the architecture docs so your change fits the existing patterns:
Open an issue on GitHub. Use the bug report template for reproducible defects and the feature request
template for new ideas. For open-ended questions, open a GitHub issue with the question label.