PI
piashcse/flutter-movie-clean-architecture
Flutter Movie ๐ฑ app built with Riverpod, GoRouter, Dio, and Freezed based on Clean Architecture. It offers a clean, scalable, and maintainable codebase for Flutter development
Flutter Movie Clean Architecture
Flutter Movie App built with Riverpod, Clean Architecture, and GoRouter that showcases movies and TV series fetched from TMDB API. It includes now playing, popular, top-rated, and upcoming Movies, TV series and Celebrity with support for pagination, search, and detailed views.
โจ Features
Movies
- ๐ Now Playing, Popular, Top Rated & Upcoming movie sections
- ๐ Movie Detail Pages with Cast & Crew
- ๐ฏ Recommended Movies
- ๐ Search Movies
- ๐ค Artist/Actor Detail Page with navigation from movie cast
- โค๏ธ Favorite Movies (saved locally using Hive database)
TV Series
- ๐บ Airing Today, On The Air, Popular & Upcoming TV series sections
- ๐ TV Series Detail Pages with Cast & Crew
- ๐ฏ Recommended TV Series
- ๐ Search TV Series
- ๐ค Artist/Actor Detail Page with navigation from TV series cast
- โค๏ธ Favorite TV Series (saved locally using Hive database)
Celebrity
- ๐ Popular and Trending Celebrities/Persons sections
- ๐ Celebrity Search functionality
- ๐ค Celebrity Detail Page with navigation from movie/tv cast
- โค๏ธ Favorite Celebrities (saved locally using Hive database)
Common Features
- ๐ Pagination (infinite scroll)
- ๐ Bottom Navigation
- ๐ Multi-language Support with Localization (English & Spanish)
- ๐งญ Declarative Routing with GoRouter
- ๐งฑ Clean Architecture (Presentation / Domain / Data)
- ๐งช Riverpod State Management
- ๐ Network layer using Dio with Logging
- ๐ Smooth UX with loading indicators
- โค๏ธ Favorite Management with Local Storage (Hive)
๐๏ธ Architecture
This project follows Clean Architecture principles with clear separation of concerns:
Fig. Clean Architecture
Layers:
- Presentation Layer: UI components, state management, and user interactions
- Domain Layer: Business logic, entities, and use cases
- Data Layer: External data sources (APIs, databases)
๐ Project Structure
flutter_movie_clean_architecture/
โโโ lib/
โ โโโ core/
โ โ โโโ config/
โ โ โ โโโ app_constant.dart # Application constants (API keys, URLs)
โ โ โโโ hive/
โ โ โ โโโ favorite_model.dart # Favorite item model
โ โ โ โโโ favorite_model.g.dart # Generated Hive adapter
โ โ โ โโโ hive_helper.dart # Hive database helper
โ โ โโโ localization/
โ โ โ โโโ app_localizations.dart # Localization setup
โ โ โ โโโ localization_helper.dart # Localization helper
โ โ โโโ network/
โ โ โ โโโ dio_provider.dart # Dio HTTP client configuration
โ โ โโโ theme/
โ โ โ โโโ app_theme.dart # Theme definitions
โ โ โ โโโ theme_providers.dart # Theme state management
โ โ โ โโโ theme_toggle_widget.dart # Theme toggle widget
โ โ โ โโโ repository/
โ โ โ โโโ theme_repository.dart # Theme repository interface
โ โ โโโ utils/
โ โ โโโ pagination_consumer_state.dart # Pagination state management
โ โ โโโ utils.dart # Utility functions
โ โโโ features/
โ โ โโโ celebrity/
โ โ โ โโโ data/
โ โ โ โ โโโ datasources/
โ โ โ โ โ โโโ celebrity_remote_data_source.dart
โ โ โ โ โโโ models/
โ โ โ โ โ โโโ person_model.dart
โ โ โ โ โ โโโ person_list_response.dart
โ โ โ โ โโโ repositories/
โ โ โ โ โโโ celebrity_repository_impl.dart
โ โ โ โโโ domain/
โ โ โ โ โโโ entities/
โ โ โ โ โ โโโ person.dart
โ โ โ โ โโโ repositories/
โ โ โ โ โ โโโ celebrity_repository.dart
โ โ โ โ โโโ usecases/
โ โ โ โ โโโ get_popular_persons.dart
โ โ โ โ โโโ get_trending_persons.dart
โ โ โ โ โโโ search_persons.dart
โ โ โ โโโ presentation/
โ โ โ โโโ pages/
โ โ โ โ โโโ celebrity_main_page.dart
โ โ โ โ โโโ celebrity_search_page.dart
โ โ โ โ โโโ popular_persons_page.dart
โ โ โ โ โโโ trending_persons_page.dart
โ โ โ โโโ providers/
โ โ โ โ โโโ celebrity_provider.dart
โ โ โ โโโ widgets/
โ โ โ โโโ person_card.dart
โ โ โโโ favorites/
โ โ โ โโโ favorites_page.dart
โ โ โโโ movie/
โ โ โ โโโ data/
โ โ โ โ โโโ datasources/
โ โ โ โ โ โโโ movie_remote_data_source.dart
โ โ โ โ โโโ models/
โ โ โ โ โ โโโ movie_detail_model.dart
โ โ โ โ โ โโโ movie_model.dart
โ โ โ โ โ โโโ credit_model.dart
โ โ โ โ โโโ repositories/
โ โ โ โ โโโ movie_repository_impl.dart
โ โ โ โโโ domain/
โ โ โ โ โโโ entities/
โ โ โ โ โ โโโ movie.dart
โ โ โ โ โ โโโ movie_detail.dart
โ โ โ โ โ โโโ credit_entity.dart
โ โ โ โ โ โโโ artist_detail.dart
โ โ โ โ โโโ repositories/
โ โ โ โ โ โโโ movie_repository.dart
โ โ โ โ โโโ usecases/
โ โ โ โ โโโ get_all_artist_movies.dart
โ โ โ โ โโโ get_movie_detail.dart
โ โ โ โ โโโ get_movie_credits.dart
โ โ โ โ โโโ get_movie_search.dart
โ โ โ โ โโโ get_now_playing.dart
โ โ โ โ โโโ get_popular.dart
โ โ โ โ โโโ get_top_rated.dart
โ โ โ โ โโโ get_up_coming.dart
โ โ โ โ โโโ get_recommended_movie.dart
โ โ โ โ โโโ get_artist_detail.dart
โ โ โ โโโ presentation/
โ โ โ โโโ pages/
โ โ โ โ โโโ artist_detail_page.dart
โ โ โ โ โโโ movie_detail_page.dart
โ โ โ โ โโโ movie_main_page.dart
โ โ โ โ โโโ now_playing_page.dart
โ โ โ โ โโโ popular_page.dart
โ โ โ โ โโโ top_rated_page.dart
โ โ โ โ โโโ up_coming_page.dart
โ โ โ โโโ providers/
โ โ โ โ โโโ movie_provider.dart
โ โ โ โ โโโ favorite_provider.dart
โ โ โ โโโ widgets/
โ โ โ โโโ movie_card.dart
โ โ โโโ tv_series/
โ โ โโโ data/
โ โ โ โโโ datasources/
โ โ โ โ โโโ tv_series_remote_data_source.dart
โ โ โ โโโ models/
โ โ โ โ โโโ tv_series_detail_model.dart
โ โ โ โ โโโ tv_series_model.dart
โ โ โ โ โโโ tv_series_credit_model.dart
โ โ โ โโโ repositories/
โ โ โ โโโ tv_series_repository_impl.dart
โ โ โโโ domain/
โ โ โ โโโ entities/
โ โ โ โ โโโ tv_series.dart
โ โ โ โ โโโ tv_series_detail.dart
โ โ โ โ โโโ tv_series_credit_entity.dart
โ โ โ โโโ repositories/
โ โ โ โ โโโ tv_series_repository.dart
โ โ โ โโโ usecases/
โ โ โ โโโ get_airing_today.dart
โ โ โ โโโ get_on_the_air.dart
โ โ โ โโโ get_popular_tv_series.dart
โ โ โ โโโ get_upcoming_tv_series.dart
โ โ โ โโโ get_tv_series_detail.dart
โ โ โ โโโ get_tv_series_credits.dart
โ โ โ โโโ get_recommended_tv_series.dart
โ โ โ โโโ get_tv_series_search.dart
โ โ โโโ presentation/
โ โ โโโ pages/
โ โ โ โโโ airing_today_page.dart
โ โ โ โโโ on_the_air_page.dart
โ โ โ โโโ popular_tv_series_page.dart
โ โ โ โโโ tv_series_detail_page.dart
โ โ โ โโโ tv_series_main_page.dart
โ โ โ โโโ upcoming_tv_series_page.dart
โ โ โโโ providers/
โ โ โ โโโ tv_series_provider.dart
โ โ โโโ widgets/
โ โ โโโ tv_series_card.dart
โ โโโ presentation/
โ โ โโโ pages/
โ โ โ โโโ main_tab_page.dart
โ โ โโโ widgets/
โ โ โโโ universal_search.dart
โ โโโ routing/
โ โ โโโ app_router.dart
โ โโโ main.dart
โโโ android/
โโโ assets/
โโโ build/
โโโ ios/
โโโ screen_shots/
โโโ test/
โโโ pubspec.yaml
โโโ pubspec.lock
โโโ analysis_options.yaml
โโโ .gitignore
โโโ README.md
๐ Getting Started
Prerequisites
- Flutter SDK (3.24.1 or higher)
- Dart SDK (3.8.0 or higher)
- Git
Installation
- Clone the repository:
git clone git@github.com:piashcse/flutter-movie-clean-architecture.git
cd flutter-movie-clean-architecture- Install dependencies:
flutter pub get- Generate code (build runner):
flutter pub run build_runner build --delete-conflicting-outputsThis command generates code for:
- JsonSerializable (JSON serialization/deserialization)
- Hive adapters (local database models)
- Run the app:
flutter runAfter running the app, you can:
- Browse movies, TV series, and celebrities
- View detailed information about each item
- Save your favorite items using the heart icon on detail pages
- Access your saved favorites through the Favorites tab
๐ ๏ธ Built With
- Flutter - Google's UI toolkit for building natively compiled applications for mobile, web, and desktop from a single codebase
- Riverpod - A simple, composable, and testable state management solution for Flutter
- GoRouter - Declarative routing package for Flutter, designed to work seamlessly with state management and deep linking
- Dio - A powerful HTTP client for Dart, supporting interceptors, global configuration, FormData, request cancellation, and more
- JsonSerializable - Generates code for converting between Dart objects and JSON, making serialization easy
- Flutter Localizations - Internationalization and localization support for multi-language applications
- PrettyDioLogger - Pretty logging for Dio HTTP requests and responses
- Hive - Lightweight and blazing fast key-value database written in pure Dart
- Hive Flutter - Extension for Hive that enables Flutter specific features
- CachedNetworkImage - Displays network images with caching and placeholder support
๐จโ๐ป Developed By
Mehedi Hassan Piash
๐ License
Copyright 2025 piashcse (Mehedi Hassan Piash)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
On this page
Languages
Dart98.7%Ruby0.8%Swift0.4%Kotlin0.1%Objective-C0.0%
Contributors
Created July 31, 2025
Updated February 4, 2026






