# gabrielhasahatan/my-film architecture

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

- Interactive diagram: https://gitdiagram.com/gabrielhasahatan/my-film
- Repository: https://github.com/gabrielhasahatan/my-film

## Overview

Gab Film is a movie and TV discovery and viewing application. Users browse or search titles, open movie or series details, and navigate into seasons and episodes; account features include watchlists, comments, dashboard views, and settings. The tree shows distinct feature modules and routes, while sampled code confirms search-to-action and credential authentication behavior. Most feature-action wiring and backend contracts were not sampled, so those links are omitted; the external services are represented only where the source supports them.

Main entry points: [`src/app/movie/[id]/page.tsx`](https://github.com/gabrielhasahatan/my-film/blob/main/src/app/movie/%5Bid%5D/page.tsx) (Movie Detail), [`src/app/page.tsx`](https://github.com/gabrielhasahatan/my-film/blob/main/src/app/page.tsx) (Home), [`src/app/tv/page.tsx`](https://github.com/gabrielhasahatan/my-film/blob/main/src/app/tv/page.tsx) (TV Browse), [`src/app/movie/page.tsx`](https://github.com/gabrielhasahatan/my-film/blob/main/src/app/movie/page.tsx) (Movie Browse)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalog["Catalog Discovery"]
  node_home["Home<br/>[page.tsx]"]
  node_movie_browse["Movie Browse<br/>[page.tsx]"]
  node_tv_browse["TV Browse<br/>[page.tsx]"]
  node_search["Search<br/>[search-form.tsx]"]
  node_search_results["Search Results<br/>[search-list.tsx]"]
  node_movie_trending["Movie Trending"]
  node_tv_trending["TV Trending"]
  node_all_trending["All Trending"]
  node_provider_series["Provider Series"]
end

subgraph group_viewing["Title Viewing"]
  node_movie_detail["Movie Detail<br/>[page.tsx]"]
  node_movie_recs["Movie Recommendations"]
  node_movie_similar["Similar Movies"]
  node_movie_actors["Movie Cast"]
  node_movie_player["Movie Player<br/>[movie-player.tsx]"]
  node_tv_detail["TV Detail<br/>[page.tsx]"]
  node_season_detail["Season Detail"]
  node_episode_detail["Episode Detail<br/>[page.tsx]"]
  node_episode_player["Episode Player"]
end

subgraph group_account["Accounts &amp; Community"]
  node_login["Login &amp; Signup<br/>[page.tsx]"]
  node_watchlist["Watchlist"]
  node_comments["Comments"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
  node_settings["Settings<br/>[page.tsx]"]
end

subgraph group_runtime["Application Runtime"]
  node_auth_route["Auth Route<br/>[route.ts]"]
  node_auth_config["Auth Configuration<br/>[auth.ts]"]
  node_session["Session Guard<br/>[session.ts]"]
  node_shared_api["API Request Helpers<br/>[safeApiRequest.ts]"]
end

node_viewer(("Viewer"))
node_auth_backend["Auth Backend"]
node_catalog_api["Catalog API"]

node_viewer -->|"opens"| node_home
node_viewer -->|"browses"| node_movie_browse
node_viewer -->|"browses"| node_tv_browse
node_viewer -->|"searches"| node_search
node_search -->|"provides query"| node_search_results
node_search_results -->|"requests results"| node_catalog_api
node_home -->|"presents"| node_movie_trending
node_home -->|"presents"| node_tv_trending
node_home -->|"presents"| node_all_trending
node_movie_browse -->|"lists titles"| node_movie_trending
node_tv_browse -->|"lists titles"| node_tv_trending
node_tv_browse -->|"offers provider lists"| node_provider_series
node_catalog_api -.-> node_shared_api
node_viewer -->|"opens title"| node_movie_detail
node_movie_detail -->|"shows recommendations"| node_movie_recs
node_movie_detail -->|"shows similar titles"| node_movie_similar
node_movie_detail -->|"shows cast"| node_movie_actors
node_movie_detail -->|"plays movie"| node_movie_player
node_viewer -->|"opens series"| node_tv_detail
node_tv_detail -->|"opens season"| node_season_detail
node_season_detail -->|"opens episode"| node_episode_detail
node_episode_detail -->|"plays episode"| node_episode_player
node_viewer -->|"signs in"| node_login
node_login -->|"submits credentials"| node_auth_route
node_auth_route -->|"uses options"| node_auth_config
node_auth_config -->|"signs in or refreshes tokens"| node_auth_backend
node_viewer -->|"manages titles"| node_watchlist
node_viewer -->|"comments"| node_comments
node_viewer -->|"views account"| node_dashboard
node_viewer -->|"changes settings"| node_settings
node_dashboard -->|"requires user"| node_session
node_settings -->|"requires user"| node_session

click node_home "https://github.com/gabrielhasahatan/my-film/blob/main/src/app/page.tsx"
click node_movie_browse "https://github.com/gabrielhasahatan/my-film/blob/main/src/app/movie/page.tsx"
click node_tv_browse "https://github.com/gabrielhasahatan/my-film/blob/main/src/app/tv/page.tsx"
click node_search "https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/Search/components/search-form.tsx"
click node_search_results "https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/Search/components/search-list.tsx"
click node_movie_trending "https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/MoviePopular/components/movie-popular-list.tsx"
click node_tv_trending "https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/TvPopular/components/tv-popular-list.tsx"
click node_all_trending "https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/AllTrending/components/all-trending-day-list.tsx"
click node_provider_series "https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/ProviderSeriesList/components/netflix-series-list.tsx"
click node_movie_detail "https://github.com/gabrielhasahatan/my-film/blob/main/src/app/movie/%5Bid%5D/page.tsx"
click node_movie_recs "https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/MovieRecomendation/components/movie-recommendations-list.tsx"
click node_movie_similar "https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/MovieSimilarList/components/movie-similar-list.tsx"
click node_movie_actors "https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/MovieActorList/components/movie-actor-list.tsx"
click node_movie_player "https://github.com/gabrielhasahatan/my-film/blob/main/src/shared/components/movie-player.tsx"
click node_tv_detail "https://github.com/gabrielhasahatan/my-film/blob/main/src/app/tv/%5Bid%5D/page.tsx"
click node_season_detail "https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/TvSeasonDetail/components/tv-season-detail-list.tsx"
click node_episode_detail "https://github.com/gabrielhasahatan/my-film/blob/main/src/app/tv/%5Bid%5D/season/%5BseasonId%5D/episode/%5BepisodeId%5D/page.tsx"
click node_episode_player "https://github.com/gabrielhasahatan/my-film/blob/main/src/shared/components/tv-episode-player.tsx"
click node_login "https://github.com/gabrielhasahatan/my-film/blob/main/src/app/login/page.tsx"
click node_auth_route "https://github.com/gabrielhasahatan/my-film/blob/main/src/app/api/auth/%5B...nextauth%5D/route.ts"
click node_auth_config "https://github.com/gabrielhasahatan/my-film/blob/main/src/lib/auth.ts"
click node_session "https://github.com/gabrielhasahatan/my-film/blob/main/src/lib/session.ts"
click node_watchlist "https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/WatchList/components/watch-list-user.tsx"
click node_comments "https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/Comments/components/comment-provider.tsx"
click node_dashboard "https://github.com/gabrielhasahatan/my-film/blob/main/src/app/dashboard/page.tsx"
click node_settings "https://github.com/gabrielhasahatan/my-film/blob/main/src/app/settings/page.tsx"
click node_shared_api "https://github.com/gabrielhasahatan/my-film/blob/main/src/lib/safeApiRequest.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_movie_browse,node_tv_browse,node_search,node_search_results,node_movie_trending,node_tv_trending,node_all_trending,node_provider_series,node_viewer toneBlue
class node_movie_detail,node_movie_recs,node_movie_similar,node_movie_actors,node_movie_player,node_tv_detail,node_season_detail,node_episode_detail,node_episode_player toneAmber
class node_login,node_watchlist,node_comments,node_dashboard,node_settings,node_catalog_api toneMint
class node_auth_route,node_auth_config,node_session,node_shared_api toneRose
class node_auth_backend toneIndigo
```

## Components

### Catalog Discovery

- [Home](https://github.com/gabrielhasahatan/my-film/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Movie Browse](https://github.com/gabrielhasahatan/my-film/blob/main/src/app/movie/page.tsx): `src/app/movie/page.tsx`
- [TV Browse](https://github.com/gabrielhasahatan/my-film/blob/main/src/app/tv/page.tsx): `src/app/tv/page.tsx`
- [Search](https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/Search/components/search-form.tsx): `src/modules/Search/components/search-form.tsx`
- [Search Results](https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/Search/components/search-list.tsx): `src/modules/Search/components/search-list.tsx`
- [Movie Trending](https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/MoviePopular/components/movie-popular-list.tsx): `src/modules/MoviePopular/components/movie-popular-list.tsx`
- [TV Trending](https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/TvPopular/components/tv-popular-list.tsx): `src/modules/TvPopular/components/tv-popular-list.tsx`
- [All Trending](https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/AllTrending/components/all-trending-day-list.tsx): `src/modules/AllTrending/components/all-trending-day-list.tsx`
- [Provider Series](https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/ProviderSeriesList/components/netflix-series-list.tsx): `src/modules/ProviderSeriesList/components/netflix-series-list.tsx`

### Title Viewing

- [Movie Detail](https://github.com/gabrielhasahatan/my-film/blob/main/src/app/movie/%5Bid%5D/page.tsx): `src/app/movie/[id]/page.tsx`
- [Movie Recommendations](https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/MovieRecomendation/components/movie-recommendations-list.tsx): `src/modules/MovieRecomendation/components/movie-recommendations-list.tsx`
- [Similar Movies](https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/MovieSimilarList/components/movie-similar-list.tsx): `src/modules/MovieSimilarList/components/movie-similar-list.tsx`
- [Movie Cast](https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/MovieActorList/components/movie-actor-list.tsx): `src/modules/MovieActorList/components/movie-actor-list.tsx`
- [Movie Player](https://github.com/gabrielhasahatan/my-film/blob/main/src/shared/components/movie-player.tsx): `src/shared/components/movie-player.tsx`
- [TV Detail](https://github.com/gabrielhasahatan/my-film/blob/main/src/app/tv/%5Bid%5D/page.tsx): `src/app/tv/[id]/page.tsx`
- [Season Detail](https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/TvSeasonDetail/components/tv-season-detail-list.tsx): `src/modules/TvSeasonDetail/components/tv-season-detail-list.tsx`
- [Episode Detail](https://github.com/gabrielhasahatan/my-film/blob/main/src/app/tv/%5Bid%5D/season/%5BseasonId%5D/episode/%5BepisodeId%5D/page.tsx): `src/app/tv/[id]/season/[seasonId]/episode/[episodeId]/page.tsx`
- [Episode Player](https://github.com/gabrielhasahatan/my-film/blob/main/src/shared/components/tv-episode-player.tsx): `src/shared/components/tv-episode-player.tsx`

### Accounts & Community

- [Login & Signup](https://github.com/gabrielhasahatan/my-film/blob/main/src/app/login/page.tsx): `src/app/login/page.tsx`
- [Watchlist](https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/WatchList/components/watch-list-user.tsx): `src/modules/WatchList/components/watch-list-user.tsx`
- [Comments](https://github.com/gabrielhasahatan/my-film/blob/main/src/modules/Comments/components/comment-provider.tsx): `src/modules/Comments/components/comment-provider.tsx`
- [Dashboard](https://github.com/gabrielhasahatan/my-film/blob/main/src/app/dashboard/page.tsx): `src/app/dashboard/page.tsx`
- [Settings](https://github.com/gabrielhasahatan/my-film/blob/main/src/app/settings/page.tsx): `src/app/settings/page.tsx`

### Application Runtime

- [Auth Route](https://github.com/gabrielhasahatan/my-film/blob/main/src/app/api/auth/%5B...nextauth%5D/route.ts): `src/app/api/auth/[...nextauth]/route.ts`
- [Auth Configuration](https://github.com/gabrielhasahatan/my-film/blob/main/src/lib/auth.ts): `src/lib/auth.ts`
- [Session Guard](https://github.com/gabrielhasahatan/my-film/blob/main/src/lib/session.ts): `src/lib/session.ts`
- [API Request Helpers](https://github.com/gabrielhasahatan/my-film/blob/main/src/lib/safeApiRequest.ts): `src/lib/safeApiRequest.ts`

### Other components

- **Viewer**
- **Auth Backend**
- **Catalog API**

## Connections

- Viewer → Home: opens
- Viewer → Movie Browse: browses
- Viewer → TV Browse: browses
- Viewer → Search: searches
- Search → Search Results: provides query
- Search Results → Catalog API: requests results
- Home → Movie Trending: presents
- Home → TV Trending: presents
- Home → All Trending: presents
- Movie Browse → Movie Trending: lists titles
- TV Browse → TV Trending: lists titles
- TV Browse → Provider Series: offers provider lists
- Catalog API → API Request Helpers
- Viewer → Movie Detail: opens title
- Movie Detail → Movie Recommendations: shows recommendations
- Movie Detail → Similar Movies: shows similar titles
- Movie Detail → Movie Cast: shows cast
- Movie Detail → Movie Player: plays movie
- Viewer → TV Detail: opens series
- TV Detail → Season Detail: opens season
- Season Detail → Episode Detail: opens episode
- Episode Detail → Episode Player: plays episode
- Viewer → Login & Signup: signs in
- Login & Signup → Auth Route: submits credentials
- Auth Route → Auth Configuration: uses options
- Auth Configuration → Auth Backend: signs in or refreshes tokens
- Viewer → Watchlist: manages titles
- Viewer → Comments: comments
- Viewer → Dashboard: views account
- Viewer → Settings: changes settings
- Dashboard → Session Guard: requires user
- Settings → Session Guard: requires user
