A Flutter application for browsing and discovering movies, powered by The Movie DB (TMDB) API. This educational project follows a Clean Architecture approach and showcases state management with Riverpod, local persistence with Drift, declarative routing, and production-ready configuration (custom icons and splash screen).
- Movie Browsing: Featured slideshow plus horizontal lists for now playing, popular, upcoming, and top rated movies, with infinite scroll
- Movie Details: Synopsis, rating, genres, and full cast pulled from TMDB credits
- Search: Look up movies by title with a custom search delegate
- Favorites: Mark movies as favorites, persisted locally so they survive app restarts, displayed in a masonry grid
- Clean Architecture: Domain, infrastructure, and presentation layers with clear separation of concerns
- Custom Branding: Generated launcher icons and a native splash screen for iOS and Android
- Flutter SDK (3.9.2 or higher)
- Dart SDK (included with Flutter)
- Android Studio / Xcode / VS Code with Flutter extensions
- A TMDB API key
- Clone the repository:
git clone https://github.com/jumagu/cinemapedia.git
cd cinemapedia- Set up environment variables. Rename the file
.env.templateto.envand add your TMDB API key:
THE_MOVIE_DB_API_KEY=your_api_key- Install dependencies:
flutter pub get- Run the app:
flutter runflutter run- Run the app in debug modeflutter build apk- Build Android APKflutter build appbundle- Build Android App Bundleflutter build ios- Build iOS app (requires macOS)flutter build windows- Build Windows desktop appflutter test- Run testsflutter clean- Clean build artifacts
flutter- Flutter SDKflutter_riverpod(2.6.1) - State management solutiongo_router(16.2.0) - Declarative routing packagedio(5.9.0) - HTTP client for TMDB API callsdrift/drift_flutter(2.29.0 / 0.2.7) - Reactive SQLite persistence for favoritesflutter_dotenv(6.0.0) - Loads environment variables from.envcard_swiper(3.0.1) - Featured movie slideshowflutter_staggered_grid_view(0.7.0) - Masonry grid layoutanimate_do(4.2.0) - Animation utilitiesintl(0.20.2) - Number and date formattingpath_provider(2.1.5) - Resolves the local database file path
To change the Application ID everywhere, on iOS and Android, it's as easy as running the command:
dart run change_app_package_name:main <package_name>Flutter Launcher Icons can prepare the icons for all available platforms in Flutter. You just need to declare the desired configuration in the pubspec.yaml under the flutter_launcher_icons section, and then run:
dart run flutter_launcher_iconsTo change the Splash Screen, Flutter Native Splash was used. The configuration is declared in the pubspec.yaml under the flutter_native_splash section. After setting the desired configuration, run:
dart run flutter_native_splash:createIn most cases, we'll want to install this library as a development dependency (as it is now), because most likely we'll only need to configure the Splash Screen. However, if we want to preserve/remove the Splash Screen programmatically, it will be necessary to install it as a regular (production) dependency. See the library's official documentation for more information.
This project is part of a Flutter course.