Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/androiddevnotes/android-modern-movie-app
Modern Movie App in Jetpack Compose
https://github.com/androiddevnotes/android-modern-movie-app
ai android jetpack jetpack-compose kotlin mvvm
Last synced: 4 months ago
JSON representation
Modern Movie App in Jetpack Compose
- Host: GitHub
- URL: https://github.com/androiddevnotes/android-modern-movie-app
- Owner: androiddevnotes
- Created: 2024-09-15T02:17:10.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-09-22T21:28:01.000Z (4 months ago)
- Last Synced: 2024-10-02T03:02:27.586Z (4 months ago)
- Topics: ai, android, jetpack, jetpack-compose, kotlin, mvvm
- Language: Kotlin
- Homepage: https://x.com/androiddevnotes/status/1835145851976454461
- Size: 9.4 MB
- Stars: 13
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Modern Movie App
## Overview
This Android app interacts with The Movie Database (TMDB) API. Every line of code has been generated
or suggested by AI using a large language model.Alpha = TMDB
Beta = OpenAI## Current state
The codebase evolves as the AI generates more and more code.
## Setup
1. Get a TMDB API key from [themoviedb.org](https://www.themoviedb.org/).
2. Add to `gradle.properties`:
```
TMDB_API_KEY="your_api_key_here"
```
3. Sync project with Gradle files.## Tech Stack
- **Language**: Kotlin
- **UI Framework**: Jetpack Compose
- **Architecture**: MVVM (Model-View-ViewModel)
- **Networking**: Ktor Client for Android
- **JSON Parsing**: Gson
- **Image Loading**: Coil
- **Asynchronous Programming**: Kotlin Coroutines
- **Navigation**: Jetpack Navigation Compose
- **Dependency Injection**: Manual (no DI framework used yet)
- **UI Components**: Material Design 3
- **Build System**: Gradle with Kotlin DSL
- **Minimum SDK**: 21 (Android 5.0 Lollipop)
- **Target SDK**: 34 (Android 14)## Key Features
1. Browse movies by different categories (popular, top-rated, etc.)
2. Search for movies
3. View detailed movie information
4. Mark movies as favorites
5. Create custom movie lists (authenticated users only)
6. Switch between grid and list views
7. Apply filters (genre, release year, minimum rating)
8. Toggle between light and dark themes## Architecture
The app follows the MVVM (Model-View-ViewModel) architecture:
- Model: Represented by the `Movie` and `MovieResponse` data classes
- View: Compose UI components in various screen files
- ViewModel: `MovieViewModel` manages the app's state and business logic## Data Flow
1. The `MovieViewModel` fetches data from the `MovieRepository`
2. The repository makes API calls using the `ApiService`
3. Data is then exposed to the UI components via StateFlows in the ViewModel
4. UI components observe these flows and recompose when the data changes## Authentication Flow
1. User initiates authentication from the ListCreationScreen
2. App obtains a request token from the TMDB API
3. User approves the request token via a web browser
4. App exchanges the approved token for a session ID
5. Session ID is stored for future authenticated requests