# imsanjaysoni/movie-rating-app-with-flutter-bloc-patten architecture

> Architecture diagram of the GitHub repository imsanjaysoni/movie-rating-app-with-flutter-bloc-patten, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten
- Repository: https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten

## Overview

MOVIES is a Flutter movie-rating app. The documented user journey starts at the home screen; the repository structure also identifies movie browsing, search, and detail/cast-and-crew state flows, backed by a movie repository and API models. The README says the app requires a The Movie Database API key. Flutter source was not excerpted, so internal wiring and specific API calls cannot be verified; those relationships are shown as dashed, unverified links rather than asserted calls.

Main entry points: [`lib/data/repositoties/movie_repositories.dart`](https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/data/repositoties/movie_repositories.dart) (Movie repository), [`lib/screens/home.dart`](https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/screens/home.dart) (Home screen), [`lib/block/search_block/search_bloc.dart`](https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/block/search_block/search_bloc.dart) (Search state), [`lib/block/cast_and_crew_bloc/cast_bloc.dart`](https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/block/cast_and_crew_bloc/cast_bloc.dart) (Cast state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["App screens"]
  node_app["Flutter app<br/>[main.dart]"]
  node_home["Home screen<br/>[home.dart]"]
  node_search["Search screen<br/>[search.dart]"]
  node_details["Movie details<br/>[details.dart]"]
  node_network["Network screen<br/>[network.dart]"]
end

subgraph group_state["App state"]
  node_movies["Movie state<br/>[movie_bloc.dart]"]
  node_searchstate["Search state<br/>[search_bloc.dart]"]
  node_cast["Cast state<br/>[cast_bloc.dart]"]
end

subgraph group_data["Movie data"]
  node_repository["Movie repository"]
  node_results["API results"]
  node_castmodel["Cast model"]
  node_genre["Genre model<br/>[genre.dart]"]
  node_key["TMDB API key<br/>[api_key.dart]"]
end

node_user(("Movie viewer"))
node_tmdb["The Movie Database"]

node_user -.->|"views"| node_home
node_home -.->|"uses state"| node_movies
node_search -.->|"uses state"| node_searchstate
node_details -.->|"uses state"| node_cast
node_home -.->|"requests movies"| node_repository
node_searchstate -.->|"searches"| node_repository
node_cast -.->|"requests cast"| node_repository
node_repository -.->|"fetches data"| node_tmdb
node_key -.->|"authenticates"| node_tmdb
node_repository -.->|"maps results"| node_results
node_repository -.->|"maps cast"| node_castmodel
node_repository -.->|"maps genres"| node_genre
node_network -.->|"supports browsing"| node_home

click node_app "https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/main.dart"
click node_home "https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/screens/home.dart"
click node_search "https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/screens/search.dart"
click node_details "https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/screens/details.dart"
click node_network "https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/screens/network.dart"
click node_movies "https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/block/movie_bloc/movie_bloc.dart"
click node_searchstate "https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/block/search_block/search_bloc.dart"
click node_cast "https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/block/cast_and_crew_bloc/cast_bloc.dart"
click node_repository "https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/data/repositoties/movie_repositories.dart"
click node_results "https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/data/model/api_result_model.dart"
click node_castmodel "https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/data/model/api_cast_model.dart"
click node_genre "https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/data/model/genre.dart"
click node_key "https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/api_key.dart"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_home,node_search,node_details,node_network,node_user toneBlue
class node_movies,node_searchstate,node_cast,node_tmdb toneAmber
class node_repository,node_results,node_castmodel,node_genre,node_key toneMint
```

## Components

### App screens

- [Flutter app](https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/main.dart): `lib/main.dart`
- [Home screen](https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/screens/home.dart): `lib/screens/home.dart`
- [Search screen](https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/screens/search.dart): `lib/screens/search.dart`
- [Movie details](https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/screens/details.dart): `lib/screens/details.dart`
- [Network screen](https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/screens/network.dart): `lib/screens/network.dart`

### App state

- [Movie state](https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/block/movie_bloc/movie_bloc.dart): `lib/block/movie_bloc/movie_bloc.dart`
- [Search state](https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/block/search_block/search_bloc.dart): `lib/block/search_block/search_bloc.dart`
- [Cast state](https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/block/cast_and_crew_bloc/cast_bloc.dart): `lib/block/cast_and_crew_bloc/cast_bloc.dart`

### Movie data

- [Movie repository](https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/data/repositoties/movie_repositories.dart): `lib/data/repositoties/movie_repositories.dart`
- [API results](https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/data/model/api_result_model.dart): `lib/data/model/api_result_model.dart`
- [Cast model](https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/data/model/api_cast_model.dart): `lib/data/model/api_cast_model.dart`
- [Genre model](https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/data/model/genre.dart): `lib/data/model/genre.dart`
- [TMDB API key](https://github.com/imsanjaysoni/movie-rating-app-with-flutter-bloc-patten/blob/master/lib/api_key.dart): `lib/api_key.dart`

### Other components

- **Movie viewer**
- **The Movie Database**

## Connections

- Movie viewer → Home screen: views (evidence: `README.md`)
- Home screen → Movie state: uses state
- Search screen → Search state: uses state
- Movie details → Cast state: uses state
- Home screen → Movie repository: requests movies
- Search state → Movie repository: searches
- Cast state → Movie repository: requests cast
- Movie repository → The Movie Database: fetches data (evidence: `README.md`)
- TMDB API key → The Movie Database: authenticates (evidence: `README.md`)
- Movie repository → API results: maps results
- Movie repository → Cast model: maps cast
- Movie repository → Genre model: maps genres
- Network screen → Home screen: supports browsing
