# ramiismaeel/filmrate architecture

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

- Interactive diagram: https://gitdiagram.com/ramiismaeel/filmrate
- Repository: https://github.com/ramiismaeel/filmrate

## Overview

FilmRate is a movie and series discovery app: the home page fetches featured titles, while users search by query/type, browse cards, and open a details modal with ratings and metadata. Search and detail API routes use a shared OMDb client; the modal requests full title details on selection. The README gives no further product capabilities. Edges are limited to calls or UI relationships shown in excerpts or the source index; unsampled header/layout wiring is represented only where indexed.

Main entry points: [`app/lib/omdb.ts`](https://github.com/ramiismaeel/filmrate/blob/main/app/lib/omdb.ts) (OMDb Client), [`app/components/SearchSection.tsx`](https://github.com/ramiismaeel/filmrate/blob/main/app/components/SearchSection.tsx) (Search State), [`app/page.tsx`](https://github.com/ramiismaeel/filmrate/blob/main/app/page.tsx) (Featured Home), [`app/components/MovieModal.tsx`](https://github.com/ramiismaeel/filmrate/blob/main/app/components/MovieModal.tsx) (Title Details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Discovery UI"]
  node_home["Featured Home<br/>[page.tsx]"]
  node_search_section["Search State<br/>[SearchSection.tsx]"]
  node_search_bar["Search Controls<br/>[SearchBar.tsx]"]
  node_movie_grid["Movie Grid<br/>[MovieGrid.tsx]"]
  node_movie_card["Movie Card<br/>[MovieCard.tsx]"]
  node_skeleton["Loading Card<br/>[SkeletonCard.tsx]"]
  node_movie_modal["Title Details<br/>[MovieModal.tsx]"]
  node_rating_badge["Rating Badge<br/>[RatingBadge.tsx]"]
  node_header["Site Header<br/>[Header.tsx]"]
end

subgraph group_api["Application API"]
  node_search_route["Search Route<br/>[route.ts]"]
  node_movie_route["Title Route<br/>[route.ts]"]
end

subgraph group_data["OMDb Data"]
  node_omdb_client["OMDb Client<br/>[omdb.ts]"]
  node_movie_types["Media Types<br/>[types.ts]"]
end

node_visitor(("Visitor"))
node_omdb{{"OMDb API"}}

node_visitor -->|"opens"| node_home
node_home -->|"fetches featured"| node_omdb_client
node_home -->|"renders"| node_search_section
node_search_section -->|"renders"| node_search_bar
node_search_section -->|"renders"| node_movie_grid
node_search_section -->|"opens"| node_movie_modal
node_search_section -->|"requests search"| node_search_route
node_movie_modal -->|"requests details"| node_movie_route
node_movie_grid -->|"renders"| node_movie_card
node_movie_grid -->|"renders loading"| node_skeleton
node_movie_card -->|"selects title"| node_movie_modal
node_movie_card -->|"renders ratings"| node_rating_badge
node_movie_modal -->|"renders ratings"| node_rating_badge
node_search_route -->|"calls search"| node_omdb_client
node_movie_route -->|"calls lookup"| node_omdb_client
node_home -->|"loads details"| node_omdb_client
node_omdb_client -->|"fetches data"| node_omdb
node_omdb_client -->|"uses contracts"| node_movie_types
node_search_route -.->|"returns typed data"| node_movie_types
node_movie_route -.->|"returns typed data"| node_movie_types
node_header -.->|"presents navigation"| node_visitor

click node_home "https://github.com/ramiismaeel/filmrate/blob/main/app/page.tsx"
click node_search_section "https://github.com/ramiismaeel/filmrate/blob/main/app/components/SearchSection.tsx"
click node_search_bar "https://github.com/ramiismaeel/filmrate/blob/main/app/components/SearchBar.tsx"
click node_movie_grid "https://github.com/ramiismaeel/filmrate/blob/main/app/components/MovieGrid.tsx"
click node_movie_card "https://github.com/ramiismaeel/filmrate/blob/main/app/components/MovieCard.tsx"
click node_skeleton "https://github.com/ramiismaeel/filmrate/blob/main/app/components/SkeletonCard.tsx"
click node_movie_modal "https://github.com/ramiismaeel/filmrate/blob/main/app/components/MovieModal.tsx"
click node_rating_badge "https://github.com/ramiismaeel/filmrate/blob/main/app/components/RatingBadge.tsx"
click node_header "https://github.com/ramiismaeel/filmrate/blob/main/app/components/Header.tsx"
click node_search_route "https://github.com/ramiismaeel/filmrate/blob/main/app/api/search/route.ts"
click node_movie_route "https://github.com/ramiismaeel/filmrate/blob/main/app/api/movie/%5Bid%5D/route.ts"
click node_omdb_client "https://github.com/ramiismaeel/filmrate/blob/main/app/lib/omdb.ts"
click node_movie_types "https://github.com/ramiismaeel/filmrate/blob/main/app/lib/types.ts"

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_home,node_search_section,node_search_bar,node_movie_grid,node_movie_card,node_skeleton,node_movie_modal,node_rating_badge,node_header toneBlue
class node_search_route,node_movie_route toneAmber
class node_omdb_client,node_movie_types,node_omdb toneMint
class node_visitor toneIndigo
```

## Components

### Discovery UI

- [Featured Home](https://github.com/ramiismaeel/filmrate/blob/main/app/page.tsx): `app/page.tsx`
- [Search State](https://github.com/ramiismaeel/filmrate/blob/main/app/components/SearchSection.tsx): `app/components/SearchSection.tsx`
- [Search Controls](https://github.com/ramiismaeel/filmrate/blob/main/app/components/SearchBar.tsx): `app/components/SearchBar.tsx`
- [Movie Grid](https://github.com/ramiismaeel/filmrate/blob/main/app/components/MovieGrid.tsx): `app/components/MovieGrid.tsx`
- [Movie Card](https://github.com/ramiismaeel/filmrate/blob/main/app/components/MovieCard.tsx): `app/components/MovieCard.tsx`
- [Loading Card](https://github.com/ramiismaeel/filmrate/blob/main/app/components/SkeletonCard.tsx): `app/components/SkeletonCard.tsx`
- [Title Details](https://github.com/ramiismaeel/filmrate/blob/main/app/components/MovieModal.tsx): `app/components/MovieModal.tsx`
- [Rating Badge](https://github.com/ramiismaeel/filmrate/blob/main/app/components/RatingBadge.tsx): `app/components/RatingBadge.tsx`
- [Site Header](https://github.com/ramiismaeel/filmrate/blob/main/app/components/Header.tsx): `app/components/Header.tsx`

### Application API

- [Search Route](https://github.com/ramiismaeel/filmrate/blob/main/app/api/search/route.ts): `app/api/search/route.ts`
- [Title Route](https://github.com/ramiismaeel/filmrate/blob/main/app/api/movie/%5Bid%5D/route.ts): `app/api/movie/[id]/route.ts`

### OMDb Data

- [OMDb Client](https://github.com/ramiismaeel/filmrate/blob/main/app/lib/omdb.ts): `app/lib/omdb.ts`
- [Media Types](https://github.com/ramiismaeel/filmrate/blob/main/app/lib/types.ts): `app/lib/types.ts`

### Other components

- **Visitor**
- **OMDb API**

## Connections

- Visitor → Featured Home: opens (evidence: `README.md`)
- Featured Home → OMDb Client: fetches featured (evidence: `app/page.tsx`)
- Featured Home → Search State: renders (evidence: `app/page.tsx`)
- Search State → Search Controls: renders (evidence: `app/components/SearchSection.tsx`)
- Search State → Movie Grid: renders (evidence: `app/components/SearchSection.tsx`)
- Search State → Title Details: opens (evidence: `app/components/SearchSection.tsx`)
- Search State → Search Route: requests search (evidence: `app/components/SearchSection.tsx`)
- Title Details → Title Route: requests details (evidence: `app/components/MovieModal.tsx`)
- Movie Grid → Movie Card: renders (evidence: `app/components/MovieGrid.tsx`)
- Movie Grid → Loading Card: renders loading (evidence: `app/components/MovieGrid.tsx`)
- Movie Card → Title Details: selects title
- Movie Card → Rating Badge: renders ratings (evidence: `app/components/MovieCard.tsx`)
- Title Details → Rating Badge: renders ratings (evidence: `app/components/MovieModal.tsx`)
- Search Route → OMDb Client: calls search (evidence: `app/api/search/route.ts`)
- Title Route → OMDb Client: calls lookup (evidence: `app/api/movie/[id]/route.ts`)
- Featured Home → OMDb Client: loads details (evidence: `app/page.tsx`)
- OMDb Client → OMDb API: fetches data (evidence: `app/lib/omdb.ts`)
- OMDb Client → Media Types: uses contracts (evidence: `app/lib/omdb.ts`)
- Search Route → Media Types: returns typed data
- Title Route → Media Types: returns typed data
- Site Header → Visitor: presents navigation
