# mohammad067/moviebaz architecture

> Architecture diagram of the GitHub repository mohammad067/moviebaz, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mohammad067/moviebaz
- Repository: https://github.com/mohammad067/moviebaz

## Overview

MovieBaz is a React movie-and-series discovery frontend. Users browse a home feed or paginated movie and series catalogs, search across titles, and open a title detail page with metadata and playback/trailer controls. The page components request catalog or detail data through the TMDB service; cards and grids present the results. Navigation also exposes a lightweight local user-profile flow. The README is only a Vite template, so product capabilities are inferred from the sampled application source and SOURCE INDEX; unsampled implementation details are not assumed.

Main entry points: [`src/App.jsx`](https://github.com/mohammad067/moviebaz/blob/main/src/App.jsx) (App routing), [`src/pages/Home.jsx`](https://github.com/mohammad067/moviebaz/blob/main/src/pages/Home.jsx) (Home feed), [`src/components/Navbar.jsx`](https://github.com/mohammad067/moviebaz/blob/main/src/components/Navbar.jsx) (Navigation bar), [`src/services/tmdb.js`](https://github.com/mohammad067/moviebaz/blob/main/src/services/tmdb.js) (TMDB service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browse["Browse and search"]
  node_app["App routing<br/>[App.jsx]"]
  node_home["Home feed<br/>[Home.jsx]"]
  node_movie_catalog["Movie catalog<br/>[PageMovies.jsx]"]
  node_series_catalog["Series catalog<br/>[PageSeries.jsx]"]
  node_search_bar["Search input<br/>[SearchBar.jsx]"]
  node_tmdb["TMDB service<br/>[tmdb.js]"]
end

subgraph group_details["Title details"]
  node_movie_details["Title details<br/>[MovieDetails.jsx]"]
end

subgraph group_presentation["Shared presentation"]
  node_movie_grid["Movie grid<br/>[MovieGrid.jsx]"]
  node_movie_card["Title card<br/>[MovieCard.jsx]"]
  node_slider["Feature slider<br/>[Slider.jsx]"]
  node_normalizer["Movie normalizer<br/>[normalizeMovie.js]"]
  node_navbar["Navigation bar<br/>[Navbar.jsx]"]
  node_footer["Footer<br/>[Footer.jsx]"]
  node_login_modal["Login modal<br/>[LoginModal.jsx]"]
  node_toast["Toast notice<br/>[Toast.jsx]"]
  node_skeleton_grid["Grid loading state<br/>[SkeletonGrid.jsx]"]
  node_skeleton_slider["Slider loading state<br/>[SkeletonSlider.jsx]"]
  node_skeleton_details["Detail loading state"]
end

subgraph group_account["Profile and errors"]
  node_storage["User storage<br/>[userStorage.js]"]
  node_error_context["Error context<br/>[ErrorContext.jsx]"]
end

node_viewer(("Viewer"))
node_tmdb_api(("TMDB API"))
node_episodes_api(("TMDB episodes API"))

node_viewer -.->|"uses navigation"| node_navbar
node_app -->|"renders"| node_navbar
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_movie_catalog
node_app -->|"routes to"| node_series_catalog
node_app -->|"routes to"| node_movie_details
node_app -->|"renders"| node_footer
node_app -->|"provides errors"| node_error_context
node_app -->|"searches via"| node_tmdb
node_app -->|"renders results"| node_movie_grid
node_navbar -->|"renders"| node_search_bar
node_navbar -->|"reads profile"| node_storage
node_navbar -->|"renders"| node_login_modal
node_navbar -->|"renders"| node_toast
node_home -->|"loads feed data"| node_tmdb
node_movie_catalog -->|"loads movies"| node_tmdb
node_series_catalog -->|"loads series"| node_tmdb
node_movie_details -->|"loads details"| node_tmdb
node_movie_details -->|"fetches season episodes"| node_episodes_api
node_tmdb -->|"requests catalog data"| node_tmdb_api
node_search_bar -.->|"submits query"| node_app
node_home -->|"shows trending"| node_slider
node_home -->|"shows collections"| node_movie_grid
node_movie_catalog -->|"renders titles"| node_movie_card
node_series_catalog -->|"renders titles"| node_movie_card
node_movie_grid -->|"renders titles"| node_movie_card
node_slider -->|"imports utility"| node_normalizer
node_home -->|"shows while loading"| node_skeleton_grid
node_home -->|"shows while loading"| node_skeleton_slider
node_movie_catalog -->|"shows while loading"| node_skeleton_grid
node_series_catalog -->|"shows while loading"| node_skeleton_grid
node_movie_details -->|"shows while loading"| node_skeleton_details

click node_app "https://github.com/mohammad067/moviebaz/blob/main/src/App.jsx"
click node_home "https://github.com/mohammad067/moviebaz/blob/main/src/pages/Home.jsx"
click node_movie_catalog "https://github.com/mohammad067/moviebaz/blob/main/src/pages/PageMovies.jsx"
click node_series_catalog "https://github.com/mohammad067/moviebaz/blob/main/src/pages/PageSeries.jsx"
click node_search_bar "https://github.com/mohammad067/moviebaz/blob/main/src/components/SearchBar.jsx"
click node_tmdb "https://github.com/mohammad067/moviebaz/blob/main/src/services/tmdb.js"
click node_movie_details "https://github.com/mohammad067/moviebaz/blob/main/src/pages/MovieDetails.jsx"
click node_movie_grid "https://github.com/mohammad067/moviebaz/blob/main/src/components/MovieGrid.jsx"
click node_movie_card "https://github.com/mohammad067/moviebaz/blob/main/src/components/MovieCard.jsx"
click node_slider "https://github.com/mohammad067/moviebaz/blob/main/src/components/Slider.jsx"
click node_normalizer "https://github.com/mohammad067/moviebaz/blob/main/src/utils/normalizeMovie.js"
click node_navbar "https://github.com/mohammad067/moviebaz/blob/main/src/components/Navbar.jsx"
click node_footer "https://github.com/mohammad067/moviebaz/blob/main/src/components/Footer.jsx"
click node_login_modal "https://github.com/mohammad067/moviebaz/blob/main/src/components/LoginModal.jsx"
click node_toast "https://github.com/mohammad067/moviebaz/blob/main/src/components/Toast.jsx"
click node_storage "https://github.com/mohammad067/moviebaz/blob/main/src/utils/userStorage.js"
click node_error_context "https://github.com/mohammad067/moviebaz/blob/main/src/context/ErrorContext.jsx"
click node_skeleton_grid "https://github.com/mohammad067/moviebaz/blob/main/src/components/SkeletonGrid.jsx"
click node_skeleton_slider "https://github.com/mohammad067/moviebaz/blob/main/src/components/SkeletonSlider.jsx"
click node_skeleton_details "https://github.com/mohammad067/moviebaz/blob/main/src/components/SkeletonDetails.jsx"

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_movie_catalog,node_series_catalog,node_search_bar,node_tmdb,node_viewer toneBlue
class node_movie_details toneAmber
class node_movie_grid,node_movie_card,node_slider,node_normalizer,node_navbar,node_footer,node_login_modal,node_toast,node_skeleton_grid,node_skeleton_slider,node_skeleton_details,node_tmdb_api,node_episodes_api toneMint
class node_storage,node_error_context toneRose
```

## Components

### Browse and search

- [App routing](https://github.com/mohammad067/moviebaz/blob/main/src/App.jsx): `src/App.jsx`
- [Home feed](https://github.com/mohammad067/moviebaz/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`
- [Movie catalog](https://github.com/mohammad067/moviebaz/blob/main/src/pages/PageMovies.jsx): `src/pages/PageMovies.jsx`
- [Series catalog](https://github.com/mohammad067/moviebaz/blob/main/src/pages/PageSeries.jsx): `src/pages/PageSeries.jsx`
- [Search input](https://github.com/mohammad067/moviebaz/blob/main/src/components/SearchBar.jsx): `src/components/SearchBar.jsx`
- [TMDB service](https://github.com/mohammad067/moviebaz/blob/main/src/services/tmdb.js): `src/services/tmdb.js`

### Title details

- [Title details](https://github.com/mohammad067/moviebaz/blob/main/src/pages/MovieDetails.jsx): `src/pages/MovieDetails.jsx`

### Shared presentation

- [Movie grid](https://github.com/mohammad067/moviebaz/blob/main/src/components/MovieGrid.jsx): `src/components/MovieGrid.jsx`
- [Title card](https://github.com/mohammad067/moviebaz/blob/main/src/components/MovieCard.jsx): `src/components/MovieCard.jsx`
- [Feature slider](https://github.com/mohammad067/moviebaz/blob/main/src/components/Slider.jsx): `src/components/Slider.jsx`
- [Movie normalizer](https://github.com/mohammad067/moviebaz/blob/main/src/utils/normalizeMovie.js): `src/utils/normalizeMovie.js`
- [Navigation bar](https://github.com/mohammad067/moviebaz/blob/main/src/components/Navbar.jsx): `src/components/Navbar.jsx`
- [Footer](https://github.com/mohammad067/moviebaz/blob/main/src/components/Footer.jsx): `src/components/Footer.jsx`
- [Login modal](https://github.com/mohammad067/moviebaz/blob/main/src/components/LoginModal.jsx): `src/components/LoginModal.jsx`
- [Toast notice](https://github.com/mohammad067/moviebaz/blob/main/src/components/Toast.jsx): `src/components/Toast.jsx`
- [Grid loading state](https://github.com/mohammad067/moviebaz/blob/main/src/components/SkeletonGrid.jsx): `src/components/SkeletonGrid.jsx`
- [Slider loading state](https://github.com/mohammad067/moviebaz/blob/main/src/components/SkeletonSlider.jsx): `src/components/SkeletonSlider.jsx`
- [Detail loading state](https://github.com/mohammad067/moviebaz/blob/main/src/components/SkeletonDetails.jsx): `src/components/SkeletonDetails.jsx`

### Profile and errors

- [User storage](https://github.com/mohammad067/moviebaz/blob/main/src/utils/userStorage.js): `src/utils/userStorage.js`
- [Error context](https://github.com/mohammad067/moviebaz/blob/main/src/context/ErrorContext.jsx): `src/context/ErrorContext.jsx`

### Other components

- **Viewer**
- **TMDB API**
- **TMDB episodes API**

## Connections

- Viewer → Navigation bar: uses navigation
- App routing → Navigation bar: renders (evidence: `src/App.jsx`)
- App routing → Home feed: routes to (evidence: `src/App.jsx`)
- App routing → Movie catalog: routes to (evidence: `src/App.jsx`)
- App routing → Series catalog: routes to (evidence: `src/App.jsx`)
- App routing → Title details: routes to (evidence: `src/App.jsx`)
- App routing → Footer: renders (evidence: `src/App.jsx`)
- App routing → Error context: provides errors (evidence: `src/App.jsx`)
- App routing → TMDB service: searches via (evidence: `src/App.jsx`)
- App routing → Movie grid: renders results (evidence: `src/App.jsx`)
- Navigation bar → Search input: renders (evidence: `src/components/Navbar.jsx`)
- Navigation bar → User storage: reads profile (evidence: `src/components/Navbar.jsx`)
- Navigation bar → Login modal: renders (evidence: `src/components/Navbar.jsx`)
- Navigation bar → Toast notice: renders (evidence: `src/components/Navbar.jsx`)
- Home feed → TMDB service: loads feed data (evidence: `src/pages/Home.jsx`)
- Movie catalog → TMDB service: loads movies (evidence: `src/pages/PageMovies.jsx`)
- Series catalog → TMDB service: loads series (evidence: `src/pages/PageSeries.jsx`)
- Title details → TMDB service: loads details (evidence: `src/pages/MovieDetails.jsx`)
- Title details → TMDB episodes API: fetches season episodes (evidence: `src/pages/MovieDetails.jsx`)
- TMDB service → TMDB API: requests catalog data (evidence: `src/services/tmdb.js`)
- Search input → App routing: submits query
- Home feed → Feature slider: shows trending (evidence: `src/pages/Home.jsx`)
- Home feed → Movie grid: shows collections (evidence: `src/pages/Home.jsx`)
- Movie catalog → Title card: renders titles (evidence: `src/pages/PageMovies.jsx`)
- Series catalog → Title card: renders titles (evidence: `src/pages/PageSeries.jsx`)
- Movie grid → Title card: renders titles (evidence: `src/components/MovieGrid.jsx`)
- Feature slider → Movie normalizer: imports utility (evidence: `src/components/Slider.jsx`)
- Home feed → Grid loading state: shows while loading (evidence: `src/pages/Home.jsx`)
- Home feed → Slider loading state: shows while loading (evidence: `src/pages/Home.jsx`)
- Movie catalog → Grid loading state: shows while loading (evidence: `src/pages/PageMovies.jsx`)
- Series catalog → Grid loading state: shows while loading (evidence: `src/pages/PageSeries.jsx`)
- Title details → Detail loading state: shows while loading (evidence: `src/pages/MovieDetails.jsx`)
