# sahaanurag207-oss/movie-search-engine architecture

> Architecture diagram of the GitHub repository sahaanurag207-oss/movie-search-engine, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sahaanurag207-oss/movie-search-engine
- Repository: https://github.com/sahaanurag207-oss/movie-search-engine

## Overview

Movie Discovery is a React app for finding movies, viewing details, and keeping session-only favorites. The user searches from Discover; Home loads an initial collection or delegates title searches to the fallback helper, then displays cards. A card can open a quick view, which fetches full OMDb details, or toggle a favorite held by App state; the Favorites route displays those saved movies. The graph reflects sampled calls and props plus README-documented integrations. Other unsampled styling and responsive behavior are not expanded into separate runtime components.

Main entry points: [`src/App.jsx`](https://github.com/sahaanurag207-oss/movie-search-engine/blob/main/src/App.jsx) (Routes and state), [`src/components/movie_card.jsx`](https://github.com/sahaanurag207-oss/movie-search-engine/blob/main/src/components/movie_card.jsx) (Movie card), [`src/pages/Home.jsx`](https://github.com/sahaanurag207-oss/movie-search-engine/blob/main/src/pages/Home.jsx) (Discover page), [`src/utils/searchWithFallback.js`](https://github.com/sahaanurag207-oss/movie-search-engine/blob/main/src/utils/searchWithFallback.js) (Search and fallback)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_entry["React entry<br/>[main.jsx]"]
  node_app_state["Routes and state<br/>[App.jsx]"]
  node_navigation["Navigation<br/>[Nav_Bar.jsx]"]
end

subgraph group_discovery["Movie discovery"]
  node_home["Discover page<br/>[Home.jsx]"]
  node_search["Search and fallback"]
end

subgraph group_views["Movie views"]
  node_card["Movie card<br/>[movie_card.jsx]"]
  node_poster["Poster display<br/>[MoviePoster.jsx]"]
  node_quickview["Quick view<br/>[MovieQuickView.jsx]"]
end

subgraph group_saved["Favorites"]
  node_favorites_page["Favorites page<br/>[Favorites.jsx]"]
end

node_browser_user(("Browser user"))
node_omdb{{"OMDb API"}}
node_datamuse{{"Datamuse API"}}

node_browser_user -->|"opens app"| node_entry
node_entry -->|"renders"| node_app_state
node_app_state -->|"renders"| node_navigation
node_app_state -->|"routes and supplies state"| node_home
node_app_state -->|"routes and supplies state"| node_favorites_page
node_app_state -->|"renders selected movie"| node_quickview
node_home -->|"searches titles"| node_search
node_search -->|"requests search results"| node_omdb
node_search -->|"requests spelling suggestions"| node_datamuse
node_home -->|"renders results"| node_card
node_favorites_page -->|"renders saved movies"| node_card
node_card -->|"renders poster"| node_poster
node_quickview -->|"renders poster"| node_poster
node_quickview -->|"fetches movie details"| node_omdb
node_browser_user -->|"searches movies"| node_home
node_browser_user -->|"opens details or toggles favorite"| node_card
node_browser_user -->|"chooses page"| node_navigation
node_card -.->|"invokes favorite callback"| node_app_state

click node_entry "https://github.com/sahaanurag207-oss/movie-search-engine/blob/main/src/main.jsx"
click node_app_state "https://github.com/sahaanurag207-oss/movie-search-engine/blob/main/src/App.jsx"
click node_navigation "https://github.com/sahaanurag207-oss/movie-search-engine/blob/main/src/components/Nav_Bar.jsx"
click node_home "https://github.com/sahaanurag207-oss/movie-search-engine/blob/main/src/pages/Home.jsx"
click node_search "https://github.com/sahaanurag207-oss/movie-search-engine/blob/main/src/utils/searchWithFallback.js"
click node_card "https://github.com/sahaanurag207-oss/movie-search-engine/blob/main/src/components/movie_card.jsx"
click node_poster "https://github.com/sahaanurag207-oss/movie-search-engine/blob/main/src/components/MoviePoster.jsx"
click node_quickview "https://github.com/sahaanurag207-oss/movie-search-engine/blob/main/src/components/MovieQuickView.jsx"
click node_favorites_page "https://github.com/sahaanurag207-oss/movie-search-engine/blob/main/src/pages/Favorites.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_entry,node_app_state,node_navigation,node_browser_user toneBlue
class node_home,node_search toneAmber
class node_card,node_poster,node_quickview,node_omdb,node_datamuse toneMint
class node_favorites_page toneRose
```

## Components

### App shell

- [React entry](https://github.com/sahaanurag207-oss/movie-search-engine/blob/main/src/main.jsx): `src/main.jsx`
- [Routes and state](https://github.com/sahaanurag207-oss/movie-search-engine/blob/main/src/App.jsx): `src/App.jsx`
- [Navigation](https://github.com/sahaanurag207-oss/movie-search-engine/blob/main/src/components/Nav_Bar.jsx): `src/components/Nav_Bar.jsx`

### Movie discovery

- [Discover page](https://github.com/sahaanurag207-oss/movie-search-engine/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`
- [Search and fallback](https://github.com/sahaanurag207-oss/movie-search-engine/blob/main/src/utils/searchWithFallback.js): `src/utils/searchWithFallback.js`

### Movie views

- [Movie card](https://github.com/sahaanurag207-oss/movie-search-engine/blob/main/src/components/movie_card.jsx): `src/components/movie_card.jsx`
- [Poster display](https://github.com/sahaanurag207-oss/movie-search-engine/blob/main/src/components/MoviePoster.jsx): `src/components/MoviePoster.jsx`
- [Quick view](https://github.com/sahaanurag207-oss/movie-search-engine/blob/main/src/components/MovieQuickView.jsx): `src/components/MovieQuickView.jsx`

### Favorites

- [Favorites page](https://github.com/sahaanurag207-oss/movie-search-engine/blob/main/src/pages/Favorites.jsx): `src/pages/Favorites.jsx`

### Other components

- **Browser user**
- **OMDb API**
- **Datamuse API**

## Connections

- Browser user → React entry: opens app (evidence: `README.md`)
- React entry → Routes and state: renders (evidence: `src/main.jsx`)
- Routes and state → Navigation: renders (evidence: `src/App.jsx`)
- Routes and state → Discover page: routes and supplies state (evidence: `src/App.jsx`)
- Routes and state → Favorites page: routes and supplies state (evidence: `src/App.jsx`)
- Routes and state → Quick view: renders selected movie (evidence: `src/App.jsx`)
- Discover page → Search and fallback: searches titles (evidence: `src/pages/Home.jsx`)
- Search and fallback → OMDb API: requests search results (evidence: `src/utils/searchWithFallback.js`)
- Search and fallback → Datamuse API: requests spelling suggestions (evidence: `src/utils/searchWithFallback.js`)
- Discover page → Movie card: renders results (evidence: `src/pages/Home.jsx`)
- Favorites page → Movie card: renders saved movies (evidence: `src/pages/Favorites.jsx`)
- Movie card → Poster display: renders poster (evidence: `src/components/movie_card.jsx`)
- Quick view → Poster display: renders poster (evidence: `src/components/MovieQuickView.jsx`)
- Quick view → OMDb API: fetches movie details (evidence: `src/components/MovieQuickView.jsx`)
- Browser user → Discover page: searches movies (evidence: `README.md`)
- Browser user → Movie card: opens details or toggles favorite (evidence: `src/components/movie_card.jsx`)
- Browser user → Navigation: chooses page (evidence: `src/components/Nav_Bar.jsx`)
- Movie card → Routes and state: invokes favorite callback
