Skip to content

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

Notifications You must be signed in to change notification settings

piashcse/flutter-movie-clean-architecture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

63 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Flutter Movie

Flutter Dart Riverpod Localization badge-Android badge-iOS GitHub license GitHub

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


Fig. Clean Architecture

Project Directory

flutter_movie_clean_architecture/
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ core/
β”‚   β”‚   β”œβ”€β”€ config/
β”‚   β”‚   β”‚   └── app_constant.dart
β”‚   β”‚   β”œβ”€β”€ network/
β”‚   β”‚   β”‚   └── dio_provider.dart
β”‚   β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”‚   └── utils.dart
β”‚   β”‚   └── hive/
β”‚   β”‚       β”œβ”€β”€ favorite_model.dart
β”‚   β”‚       β”œβ”€β”€ favorite_model.g.dart
β”‚   β”‚       └── hive_helper.dart
β”‚   β”œβ”€β”€ 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
β”‚   β”‚   β”œβ”€β”€ 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.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
β”‚   β”‚   β”‚       β”‚   β”œβ”€β”€ artist_list_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
β”‚   β”‚   β”‚       └── widgets/
β”‚   β”‚   β”‚           β”œβ”€β”€ movie_card.dart
β”‚   β”‚   β”‚           └── movie_search.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
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ 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
β”‚   β”‚   └── favorites/
β”‚   β”‚       └── favorites_page.dart
β”‚   β”œβ”€β”€ routing/
β”‚   β”‚   └── app_router.dart
β”‚   └── main.dart
β”œβ”€β”€ ios/
β”œβ”€β”€ screen_shots/
β”œβ”€β”€ test/
β”œβ”€β”€ .flutter-plugins
β”œβ”€β”€ .flutter-plugins-dependencies
β”œβ”€β”€ .gitignore
β”œβ”€β”€ .metadata
β”œβ”€β”€ analysis_options.yaml
└── flutter_movie_clean_architecture.iml

Clone the repository

git clone git@github.com:piashcse/flutter-movie-clean-architecture.git

Install dependencies

flutter pub get

Generate code (build runner)

flutter pub run build_runner build --delete-conflicting-outputs

This command generates code for:

  • Freezed models (immutable data classes)
  • JsonSerializable (JSON serialization/deserialization)
  • Hive adapters (local database models)

Run the app

flutter run

After 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.
  • Freezed - A code generator for immutable classes that helps with union types/pattern matching in Dart.
  • JsonSerializable - Generates code for converting between Dart objects and JSON, making serialization easy.
  • Flutter Localizations - Internationalization and localization support for multi-language applications.
  • Logger / DioLogger - Easy and pretty logging package for debugging; use DioLogger to log 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.

πŸ‘¨ Developed By

Mehedi Hassan Piash

Twitter Medium Linkedin Web Blog

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.

About

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

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages