Movie DB KMP
Movie DB KMP is a cross-platform movie database application built with Kotlin Multiplatform (KMP). It allows users to browse popular movies, view details, and enjoy a consistent experience across Android, iOS, and potentially other platforms.
✨ Features
- Browse Popular Movies: Discover a curated list of currently popular films.
- Detailed Movie Information: Tap on any movie to view its synopsis, release date, rating, and other relevant details.
- Cross-Platform UI: A shared UI layer ensures a consistent look and feel across different operating systems.
- Offline Support (Planned/Future): Future enhancements may include caching for offline access.
- Responsive Design: Optimized for various screen sizes on both mobile platforms.
🚀 Technologies Used
This project leverages the power of Kotlin Multiplatform to share code across different platforms, specifically targeting Android and iOS.
- Kotlin Multiplatform (KMP): For shared business logic and data layer.
- Jetpack Compose Multiplatform: For building declarative UI across Android and iOS (and possibly Desktop/Web in the future).
- Ktor Client: For making network requests to the movie API.
- Kotlinx.Serialization: For efficient JSON parsing.
- Android Jetpack Compose: For Android-specific UI components.
🛠️ Setup and Installation
To get a local copy of this project up and running, follow these simple steps.
Prerequisites
- Git: For cloning the repository.
- Java Development Kit (JDK): Version 11 or higher.
- Android Studio Flamingo | 2022.2.1 or newer: With Kotlin Multiplatform Mobile plugin installed.
- Xcode 14 or newer: For building the iOS application (on macOS).
- CocoaPods: If you have any iOS dependencies managed by it.
Cloning the Repository
git clone https://github.com/aungyelin/movie-db-kmp.git
cd movie-db-kmp
Obtain TMDB API Key:
Go to The Movie Database (TMDB) website and sign up for an account.
Navigate to your API Settings and request an API key (developer type).
Obtain TMDB API Key:
Search Constants.kt file in the project and replace your TMDB API key:
Replace YOUR_TMDB_API_KEY_HERE with the API key you obtained from TMDB.
Building for Android
- Open the project in Android Studio.
- Android Studio should automatically sync the Gradle project.
- Select the androidApp run configuration.
- Click the "Run" button or select Build > Make Project to build and run the app on an emulator or a connected device.
Building for iOS
- Navigate to the project directory in your terminal.
- Run the following Gradle command to generate the Xcode project:
./gradlew :shared:embedAndSignAppleFrameworkForXcode
(Note: You might need to run ./gradlew build first if you encounter issues.)
- Open the iosApp/iosApp.xcodeproj in Xcode.
- Select a simulator or a connected device.
- Click the "Run" button in Xcode to build and run the iOS app.
🚀 Usage
Once the app is running on your desired platform:
- The main screen will display a list of popular movies.
- Scroll through the list to explore more movies.
- Tap on any movie item to navigate to its detail screen, where you can view more information.
🤝 Contributing
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (git checkout -b feature/AmazingFeature)
- Commit your Changes (git commit -m 'Add some AmazingFeature')
- Push to the Branch (git push origin feature/AmazingFeature)
- Open a Pull Request