# aryallaxman99/moviemania architecture

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

- Interactive diagram: https://gitdiagram.com/aryallaxman99/moviemania
- Repository: https://github.com/aryallaxman99/moviemania

## Overview

MovieMania is a Next.js movie-discovery frontend. Users browse daily trending titles, search TMDb, and open a movie page for details; search and trending results also update shared movie-list state. The graph preserves the homepage, search and detail flows, plus the documented contact route and UI capabilities. Source excerpts show the API requests and major component calls; unsampled route or data behavior is not inferred.

Main entry points: [`src/components/HeroSection.tsx`](https://github.com/aryallaxman99/moviemania/blob/main/src/components/HeroSection.tsx) (Trending showcase), [`src/components/SearchBox.tsx`](https://github.com/aryallaxman99/moviemania/blob/main/src/components/SearchBox.tsx) (Movie search), [`src/components/Navbar.tsx`](https://github.com/aryallaxman99/moviemania/blob/main/src/components/Navbar.tsx) (Trending navigation), [`src/components/MovieDetails.tsx`](https://github.com/aryallaxman99/moviemania/blob/main/src/components/MovieDetails.tsx) (Movie details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routes["App routes"]
  node_home["Home page<br/>[page.tsx]"]
  node_searchroute["Search page<br/>[page.tsx]"]
  node_detailroute["Movie route<br/>[page.tsx]"]
  node_contact["Contact page<br/>[page.tsx]"]
  node_appshell["App shell<br/>[layout.tsx]"]
end

subgraph group_discovery["Movie discovery"]
  node_hero["Trending showcase<br/>[HeroSection.tsx]"]
  node_searchbox["Movie search<br/>[SearchBox.tsx]"]
  node_display["Search results<br/>[DisplayMovie.tsx]"]
  node_details["Movie details<br/>[MovieDetails.tsx]"]
  node_navbar["Trending navigation<br/>[Navbar.tsx]"]
end

subgraph group_data["Data and state"]
  node_searchdata["Search request<br/>[useSearchData.ts]"]
  node_trendingdata["Trending request<br/>[useGetData.ts]"]
  node_findmovie["Movie lookup<br/>[useFindMovie.ts]"]
  node_moviecontext["Movie list context<br/>[MovieContext.ts]"]
  node_contextprovider["Context provider"]
end

subgraph group_ui["Presentation UI"]
  node_loading["Loading indicator<br/>[Loading.tsx]"]
  node_input["Search input<br/>[Input.tsx]"]
  node_focuscards["Focus cards<br/>[focus-cards.tsx]"]
  node_parallax["Hero parallax<br/>[hero-parallax.tsx]"]
  node_tooltip["Cast and company tooltip"]
  node_menumodule["Navigation menu<br/>[navbar-menu.tsx]"]
  node_gradient["Gradient link"]
end

node_visitor(("Visitor"))
node_tmdb(("TMDb API"))

node_visitor -->|"opens"| node_home
node_visitor -->|"opens"| node_searchroute
node_visitor -->|"opens"| node_detailroute
node_visitor -.->|"opens"| node_contact
node_home -->|"renders"| node_hero
node_home -->|"renders"| node_gradient
node_searchroute -->|"renders"| node_searchbox
node_detailroute -->|"renders"| node_details
node_appshell -->|"renders"| node_navbar
node_appshell -->|"wraps"| node_contextprovider
node_hero -->|"requests"| node_trendingdata
node_hero -->|"reads state"| node_moviecontext
node_hero -->|"renders"| node_parallax
node_hero -->|"renders"| node_loading
node_navbar -->|"requests"| node_trendingdata
node_navbar -->|"updates"| node_moviecontext
node_navbar -->|"renders"| node_menumodule
node_navbar -->|"renders"| node_loading
node_searchbox -->|"requests"| node_searchdata
node_searchbox -->|"updates"| node_moviecontext
node_searchbox -->|"renders"| node_input
node_searchbox -->|"renders"| node_display
node_display -->|"renders"| node_focuscards
node_details -->|"requests"| node_findmovie
node_details -->|"renders"| node_loading
node_details -->|"renders"| node_tooltip
node_contextprovider -->|"provides"| node_moviecontext
node_searchdata -->|"searches"| node_tmdb
node_findmovie -->|"fetches details"| node_tmdb
node_trendingdata -.->|"fetches results"| node_tmdb

click node_home "https://github.com/aryallaxman99/moviemania/blob/main/src/app/page.tsx"
click node_searchroute "https://github.com/aryallaxman99/moviemania/blob/main/src/app/search/page.tsx"
click node_detailroute "https://github.com/aryallaxman99/moviemania/blob/main/src/app/movie/%5Bid%5D/page.tsx"
click node_contact "https://github.com/aryallaxman99/moviemania/blob/main/src/app/contact/page.tsx"
click node_appshell "https://github.com/aryallaxman99/moviemania/blob/main/src/app/layout.tsx"
click node_hero "https://github.com/aryallaxman99/moviemania/blob/main/src/components/HeroSection.tsx"
click node_searchbox "https://github.com/aryallaxman99/moviemania/blob/main/src/components/SearchBox.tsx"
click node_display "https://github.com/aryallaxman99/moviemania/blob/main/src/components/DisplayMovie.tsx"
click node_details "https://github.com/aryallaxman99/moviemania/blob/main/src/components/MovieDetails.tsx"
click node_navbar "https://github.com/aryallaxman99/moviemania/blob/main/src/components/Navbar.tsx"
click node_searchdata "https://github.com/aryallaxman99/moviemania/blob/main/src/hooks/useSearchData.ts"
click node_trendingdata "https://github.com/aryallaxman99/moviemania/blob/main/src/hooks/useGetData.ts"
click node_findmovie "https://github.com/aryallaxman99/moviemania/blob/main/src/hooks/useFindMovie.ts"
click node_moviecontext "https://github.com/aryallaxman99/moviemania/blob/main/src/context/MovieContext.ts"
click node_contextprovider "https://github.com/aryallaxman99/moviemania/blob/main/src/context/MovieContextProvider.tsx"
click node_loading "https://github.com/aryallaxman99/moviemania/blob/main/src/widgets/Loading/Loading.tsx"
click node_input "https://github.com/aryallaxman99/moviemania/blob/main/src/widgets/Input/Input.tsx"
click node_focuscards "https://github.com/aryallaxman99/moviemania/blob/main/src/components/ui/focus-cards.tsx"
click node_parallax "https://github.com/aryallaxman99/moviemania/blob/main/src/components/ui/hero-parallax.tsx"
click node_tooltip "https://github.com/aryallaxman99/moviemania/blob/main/src/components/ui/animated-tooltip.tsx"
click node_menumodule "https://github.com/aryallaxman99/moviemania/blob/main/src/components/ui/navbar-menu.tsx"
click node_gradient "https://github.com/aryallaxman99/moviemania/blob/main/src/components/ui/hover-border-gradient.tsx"

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_searchroute,node_detailroute,node_contact,node_appshell toneBlue
class node_hero,node_searchbox,node_display,node_details,node_navbar toneAmber
class node_searchdata,node_trendingdata,node_findmovie,node_moviecontext,node_contextprovider,node_tmdb toneMint
class node_loading,node_input,node_focuscards,node_parallax,node_tooltip,node_menumodule,node_gradient toneRose
class node_visitor toneIndigo
```

## Components

### App routes

- [Home page](https://github.com/aryallaxman99/moviemania/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Search page](https://github.com/aryallaxman99/moviemania/blob/main/src/app/search/page.tsx): `src/app/search/page.tsx`
- [Movie route](https://github.com/aryallaxman99/moviemania/blob/main/src/app/movie/%5Bid%5D/page.tsx): `src/app/movie/[id]/page.tsx`
- [Contact page](https://github.com/aryallaxman99/moviemania/blob/main/src/app/contact/page.tsx): `src/app/contact/page.tsx`
- [App shell](https://github.com/aryallaxman99/moviemania/blob/main/src/app/layout.tsx): `src/app/layout.tsx`

### Movie discovery

- [Trending showcase](https://github.com/aryallaxman99/moviemania/blob/main/src/components/HeroSection.tsx): `src/components/HeroSection.tsx`
- [Movie search](https://github.com/aryallaxman99/moviemania/blob/main/src/components/SearchBox.tsx): `src/components/SearchBox.tsx`
- [Search results](https://github.com/aryallaxman99/moviemania/blob/main/src/components/DisplayMovie.tsx): `src/components/DisplayMovie.tsx`
- [Movie details](https://github.com/aryallaxman99/moviemania/blob/main/src/components/MovieDetails.tsx): `src/components/MovieDetails.tsx`
- [Trending navigation](https://github.com/aryallaxman99/moviemania/blob/main/src/components/Navbar.tsx): `src/components/Navbar.tsx`

### Data and state

- [Search request](https://github.com/aryallaxman99/moviemania/blob/main/src/hooks/useSearchData.ts): `src/hooks/useSearchData.ts`
- [Trending request](https://github.com/aryallaxman99/moviemania/blob/main/src/hooks/useGetData.ts): `src/hooks/useGetData.ts`
- [Movie lookup](https://github.com/aryallaxman99/moviemania/blob/main/src/hooks/useFindMovie.ts): `src/hooks/useFindMovie.ts`
- [Movie list context](https://github.com/aryallaxman99/moviemania/blob/main/src/context/MovieContext.ts): `src/context/MovieContext.ts`
- [Context provider](https://github.com/aryallaxman99/moviemania/blob/main/src/context/MovieContextProvider.tsx): `src/context/MovieContextProvider.tsx`

### Presentation UI

- [Loading indicator](https://github.com/aryallaxman99/moviemania/blob/main/src/widgets/Loading/Loading.tsx): `src/widgets/Loading/Loading.tsx`
- [Search input](https://github.com/aryallaxman99/moviemania/blob/main/src/widgets/Input/Input.tsx): `src/widgets/Input/Input.tsx`
- [Focus cards](https://github.com/aryallaxman99/moviemania/blob/main/src/components/ui/focus-cards.tsx): `src/components/ui/focus-cards.tsx`
- [Hero parallax](https://github.com/aryallaxman99/moviemania/blob/main/src/components/ui/hero-parallax.tsx): `src/components/ui/hero-parallax.tsx`
- [Cast and company tooltip](https://github.com/aryallaxman99/moviemania/blob/main/src/components/ui/animated-tooltip.tsx): `src/components/ui/animated-tooltip.tsx`
- [Navigation menu](https://github.com/aryallaxman99/moviemania/blob/main/src/components/ui/navbar-menu.tsx): `src/components/ui/navbar-menu.tsx`
- [Gradient link](https://github.com/aryallaxman99/moviemania/blob/main/src/components/ui/hover-border-gradient.tsx): `src/components/ui/hover-border-gradient.tsx`

### Other components

- **Visitor**
- **TMDb API**

## Connections

- Visitor → Home page: opens
- Visitor → Search page: opens
- Visitor → Movie route: opens
- Visitor → Contact page: opens
- Home page → Trending showcase: renders (evidence: `src/app/page.tsx`)
- Home page → Gradient link: renders (evidence: `src/app/page.tsx`)
- Search page → Movie search: renders (evidence: `src/app/search/page.tsx`)
- Movie route → Movie details: renders (evidence: `src/app/movie/[id]/page.tsx`)
- App shell → Trending navigation: renders (evidence: `src/app/layout.tsx`)
- App shell → Context provider: wraps (evidence: `src/app/layout.tsx`)
- Trending showcase → Trending request: requests (evidence: `src/components/HeroSection.tsx`)
- Trending showcase → Movie list context: reads state (evidence: `src/components/HeroSection.tsx`)
- Trending showcase → Hero parallax: renders (evidence: `src/components/HeroSection.tsx`)
- Trending showcase → Loading indicator: renders (evidence: `src/components/HeroSection.tsx`)
- Trending navigation → Trending request: requests (evidence: `src/components/Navbar.tsx`)
- Trending navigation → Movie list context: updates (evidence: `src/components/Navbar.tsx`)
- Trending navigation → Navigation menu: renders (evidence: `src/components/Navbar.tsx`)
- Trending navigation → Loading indicator: renders (evidence: `src/components/Navbar.tsx`)
- Movie search → Search request: requests (evidence: `src/components/SearchBox.tsx`)
- Movie search → Movie list context: updates (evidence: `src/components/SearchBox.tsx`)
- Movie search → Search input: renders (evidence: `src/components/SearchBox.tsx`)
- Movie search → Search results: renders (evidence: `src/components/SearchBox.tsx`)
- Search results → Focus cards: renders (evidence: `src/components/DisplayMovie.tsx`)
- Movie details → Movie lookup: requests (evidence: `src/components/MovieDetails.tsx`)
- Movie details → Loading indicator: renders (evidence: `src/components/MovieDetails.tsx`)
- Movie details → Cast and company tooltip: renders (evidence: `src/components/MovieDetails.tsx`)
- Context provider → Movie list context: provides (evidence: `src/context/MovieContextProvider.tsx`)
- Search request → TMDb API: searches (evidence: `src/hooks/useSearchData.ts`)
- Movie lookup → TMDb API: fetches details (evidence: `src/hooks/useFindMovie.ts`)
- Trending request → TMDb API: fetches results
