Skip to content

Clean MVI architecture app for movie recommendations with package structure by feature. Including Jetpack Compose, Kotlin coroutines/flow, koin, ktor, turbine, mockk and more.

License

Notifications You must be signed in to change notification settings

AdamDawi/Popcorn-Picks

Repository files navigation

Popcorn Picks

Popcorn Picks is a movie recommendation app that turns discovery into a game. Pick your favorite genres, scratch to reveal tailored film suggestions, and save the ones you love. Built with Kotlin, Jetpack Compose, and the TMBD API, it features smooth animations, interactive UI effects, and a personalized recommendation loop.

Android Unit Tests Android Instrumentation Tests

⭐️Features

🎬 Movie Discovery & Recommendations

  • Scratch Card System: Reveal movie recommendations one at a time by scratching off the interactive card.

  • Personalized Suggestions: Movies are recommended based on your chosen genres and previously liked films.

  • Reroll Option: Not interested in the current recommendation? Use reroll to get a new one instantly.

📝 Onboarding & Genre Selection

  • First-Time Setup: Users must select at least two genres to start.

  • Data Fetching: For each selected genre, up to 60 movies are fetched to choose from.

  • Dynamic Borders Animation: A red border animation highlights selected genres during setup.

📅 Movie Details

  • Smooth Scrolling Effect: The header image smoothly transitions as you scroll through movie details.

  • Additional Information: View detailed movie info, including rating, released date, description and more.

  • Shimmer Effect: A loading animation enhances the user experience while fetching images.

👤 User Profile & Liked Movies

  • The profile screen displays the movie genres selected during onboarding and the total number of liked movies.
  • Users can customize their profile picture through a popup, allowing them to change the background color and select a profile image from available options.
  • In the Movies section, users can tap to view the full list of their liked movies.

⚙️Technologies

📱App:

  • Kotlin & Jetpack Compose - Modern UI toolkit for declarative UI design.

  • MVI Architecture - Organized with package structure by feature for maintainability.

  • Ktor - Network client for fetching movie data from TMDB API.

  • Room Database - Stores user-selected genres, liked movies and cached movie recommendations.

  • Koin - Dependency injection

  • Coil - Efficient image loading and loading states.

  • Timber - Logging utility.

  • Gson Serialization - Data parsing.

✅Testing:

  • JUnit4 - Utilized to write and execute unit tests.

  • Kotlin Coroutines Test - Used to test asynchronous code that utilizes coroutines.

  • Hamcrest & Truth - Assertion libraries for test validations.

  • MockK - Mocking framework for unit tests.

  • Turbine - Used for testing Kotlin Flow emissions.

  • Ktor Client Mock - Mock API responses.

  • Compose UI testing - Used to UI testing and end-to-end testing.

✅CI and Testing:

  • Continuous integration (CI) ensures unit tests are automatically executed on each push and pull request.

  • Unit Tests: Unit tests are executed on GitHub-hosted Ubuntu containers, ensuring that each code change is automatically tested in a clean, consistent environment during the CI process.

  • Instrumental Tests on Firebase Test Lab: Before running the instrumentation tests on Firebase Test Lab, the project must first be built. This includes checking out the repository, setting up the necessary files (like google-services.json), and configuring the environment, including JDK 17. Once the project is built, the Android Test APK is generated and deployed. After that, the tests are executed on Firebase Test Lab using real production devices, ensuring that the app performs smoothly across a wide range of devices. Test results and logs are readily accessible via the Firebase Console for detailed analysis and debugging.

Here are some overview pictures:

Image Image Image Image Image Image Image Image

Animations:

Image Image Image Image Image

📈 Recommendation System Diagram

Below is a visual representation of how the recommendation system works. The diagram is divided into three main sections: Onboarding, Recommendations, and User Interactions. To make it easier to follow, the full diagram is shown first, followed by a closer look at each section.

1. Full Diagram

Image An overview of the entire recommendation system, highlighting the interactions between different components.

2. Onboarding Section

Image This section covers the onboarding process, where users are introduced to the system and initial preferences are set.

3. Recommendations Section

Image This part explains how the recommendation system generates personalized suggestions for users based on their preferences.

4. User Interactions Section

Image

This section illustrates how users interact with the system and how their feedback influences future recommendations.

Installation

  1. Clone the repository:
git clone https://github.com/AdamDawi/Popcorn-Picks
  1. Open the project in Android Studio.
  2. Be sure the versions in gradle are same as on github
  3. TMDB API Key: To fetch movie data from the TMDB API, you'll need an API key. Create an account on TMDB Then, add the API key to your local gradle.properties file as follows:
API_KEY="your_api_key_here"
  1. google-services.json:
    1. Create a Firebase Project:

      Go to the Firebase Console, and either create a new project or use an existing one.

    2. Android Project to Firebase:

      In the Firebase Console, click on your project and then navigate to Project Settings > General. Under Your apps, click on the Android icon to add an Android app to your Firebase project.

    3. Download the google-services.json File:

      After registering your app with Firebase, you’ll be able to download the google-services.json file. Download this file and place it in the app/ directory of the project. This file is only required to run the project locally.

Note: Firebase services are used for running instrumentation tests in Firebase Test Lab, which is triggered automatically during push and pull requests using my Firebase project.

🤝 Contributing

Any kind of positive contribution is welcome!

Please take a moment to read my CONTRIBUTING guidelines for details on how to contribute, including how to submit pull requests. Also, be sure to review my CODE OF CONDUCT to ensure a respectful and collaborative environment.

Requirements

Minimum version: Android 7.0 (API level 24) or later📱

Target version: Android 14 (API level 34) or later📱

Author

Adam Dawidziuk🧑‍💻

Releases

No releases published

Packages

No packages published

Languages