# roshang1t/netprime architecture

> Architecture diagram of the GitHub repository roshang1t/netprime, 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/roshang1t/netprime
- Repository: https://github.com/roshang1t/netprime

## Overview

NetPrime is an Expo/React Native movie and series discovery and streaming app. Users browse or search titles, open film or TV details, and proceed to a player; the app also provides trending shows and locally stored watch history. The sampled context fetches catalog data from a worker-backed API, while the README says media is third-party hosted and NetPrime searches and scrapes public data rather than hosting it. Some screen and playback internals were not sampled, so those relationships are left unverified.

Main entry points: [`contexts/movieContext/movieContext.tsx`](https://github.com/roshang1t/netprime/blob/master/contexts/movieContext/movieContext.tsx) (Catalog Context), [`app/(player)/player.tsx`](https://github.com/roshang1t/netprime/blob/master/app/(player)/player.tsx) (Media Player), [`utils/history.ts`](https://github.com/roshang1t/netprime/blob/master/utils/history.ts) (History Storage), [`app/(tabs)/index.tsx`](https://github.com/roshang1t/netprime/blob/master/app/(tabs)/index.tsx) (Home Feed)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Discovery"]
  node_app_shell["App Shell<br/>[_layout.tsx]"]
  node_home["Home Feed<br/>[index.tsx]"]
  node_popular["Now Playing List<br/>[popularList.tsx]"]
  node_trending["Trending Shows<br/>[trendingShows.tsx]"]
  node_search["Search &amp; Providers<br/>[search.tsx]"]
  node_movie_cards["Movie Lists<br/>[movieList.tsx]"]
end

subgraph group_titleplay["Titles &amp; Playback"]
  node_film_details["Film Details<br/>[details.tsx]"]
  node_tv_details["TV Details<br/>[tvDetails.tsx]"]
  node_player["Media Player<br/>[player.tsx]"]
  node_external_media["Third-Party Media"]
end

subgraph group_catalog["Catalog Data"]
  node_movie_context["Catalog Context<br/>[movieContext.tsx]"]
  node_catalog_types["Catalog Types<br/>[types.ts]"]
  node_catalog_api["Catalog API"]
end

subgraph group_library["Library &amp; Settings"]
  node_history_screen["Watch History Screen<br/>[watchHistory.tsx]"]
  node_history_storage[("History Storage<br/>[history.ts]")]
  node_history_route["History Route<br/>[watchHistory.tsx]"]
  node_more["More &amp; Updates<br/>[more.tsx]"]
  node_release_check["Release Check"]
  node_github["GitHub Releases"]
end

node_viewer(("Viewer"))

node_viewer -.->|"opens app"| node_app_shell
node_app_shell -->|"provides context"| node_movie_context
node_home -->|"renders list"| node_popular
node_home -->|"renders list"| node_movie_cards
node_home -->|"routes to"| node_trending
node_popular -->|"reads catalog"| node_movie_context
node_popular -.->|"routes to"| node_film_details
node_trending -->|"reads catalog"| node_movie_context
node_search -->|"requests search"| node_catalog_api
node_movie_context -->|"fetches catalog"| node_catalog_api
node_movie_context -->|"uses types"| node_catalog_types
node_search -->|"routes to"| node_tv_details
node_film_details -->|"updates history"| node_history_storage
node_tv_details -->|"updates history"| node_history_storage
node_film_details -.->|"opens playback"| node_player
node_tv_details -.->|"opens playback"| node_player
node_player -.->|"loads media"| node_external_media
node_history_route -->|"renders screen"| node_history_screen
node_history_screen -->|"reads history"| node_history_storage
node_history_screen -->|"routes to"| node_player
node_more -->|"clears history"| node_history_storage
node_more -->|"checks updates"| node_release_check
node_release_check -->|"queries releases"| node_github

click node_app_shell "https://github.com/roshang1t/netprime/blob/master/app/_layout.tsx"
click node_home "https://github.com/roshang1t/netprime/blob/master/app/(tabs)/index.tsx"
click node_popular "https://github.com/roshang1t/netprime/blob/master/components/popularList.tsx"
click node_trending "https://github.com/roshang1t/netprime/blob/master/app/trendingShows.tsx"
click node_search "https://github.com/roshang1t/netprime/blob/master/app/(tabs)/search.tsx"
click node_movie_context "https://github.com/roshang1t/netprime/blob/master/contexts/movieContext/movieContext.tsx"
click node_catalog_types "https://github.com/roshang1t/netprime/blob/master/contexts/movieContext/types.ts"
click node_movie_cards "https://github.com/roshang1t/netprime/blob/master/components/movieList.tsx"
click node_film_details "https://github.com/roshang1t/netprime/blob/master/app/(player)/details.tsx"
click node_tv_details "https://github.com/roshang1t/netprime/blob/master/app/(player)/tvDetails.tsx"
click node_player "https://github.com/roshang1t/netprime/blob/master/app/(player)/player.tsx"
click node_history_screen "https://github.com/roshang1t/netprime/blob/master/components/watchHistory.tsx"
click node_history_storage "https://github.com/roshang1t/netprime/blob/master/utils/history.ts"
click node_history_route "https://github.com/roshang1t/netprime/blob/master/app/watchHistory.tsx"
click node_more "https://github.com/roshang1t/netprime/blob/master/app/(tabs)/more.tsx"
click node_release_check "https://github.com/roshang1t/netprime/blob/master/utils/checkGithubRelease.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_app_shell,node_home,node_popular,node_trending,node_search,node_movie_cards,node_viewer toneBlue
class node_film_details,node_tv_details,node_player,node_external_media toneAmber
class node_movie_context,node_catalog_types,node_catalog_api toneMint
class node_history_screen,node_history_storage,node_history_route,node_more,node_release_check,node_github toneRose
```

## Components

### Discovery

- [App Shell](https://github.com/roshang1t/netprime/blob/master/app/_layout.tsx): `app/_layout.tsx`
- [Home Feed](https://github.com/roshang1t/netprime/blob/master/app/(tabs)/index.tsx): `app/(tabs)/index.tsx`
- [Now Playing List](https://github.com/roshang1t/netprime/blob/master/components/popularList.tsx): `components/popularList.tsx`
- [Trending Shows](https://github.com/roshang1t/netprime/blob/master/app/trendingShows.tsx): `app/trendingShows.tsx`
- [Search & Providers](https://github.com/roshang1t/netprime/blob/master/app/(tabs)/search.tsx): `app/(tabs)/search.tsx`
- [Movie Lists](https://github.com/roshang1t/netprime/blob/master/components/movieList.tsx): `components/movieList.tsx`

### Titles & Playback

- [Film Details](https://github.com/roshang1t/netprime/blob/master/app/(player)/details.tsx): `app/(player)/details.tsx`
- [TV Details](https://github.com/roshang1t/netprime/blob/master/app/(player)/tvDetails.tsx): `app/(player)/tvDetails.tsx`
- [Media Player](https://github.com/roshang1t/netprime/blob/master/app/(player)/player.tsx): `app/(player)/player.tsx`
- **Third-Party Media**

### Catalog Data

- [Catalog Context](https://github.com/roshang1t/netprime/blob/master/contexts/movieContext/movieContext.tsx): `contexts/movieContext/movieContext.tsx`
- [Catalog Types](https://github.com/roshang1t/netprime/blob/master/contexts/movieContext/types.ts): `contexts/movieContext/types.ts`
- **Catalog API**

### Library & Settings

- [Watch History Screen](https://github.com/roshang1t/netprime/blob/master/components/watchHistory.tsx): `components/watchHistory.tsx`
- [History Storage](https://github.com/roshang1t/netprime/blob/master/utils/history.ts): `utils/history.ts`
- [History Route](https://github.com/roshang1t/netprime/blob/master/app/watchHistory.tsx): `app/watchHistory.tsx`
- [More & Updates](https://github.com/roshang1t/netprime/blob/master/app/(tabs)/more.tsx): `app/(tabs)/more.tsx`
- [Release Check](https://github.com/roshang1t/netprime/blob/master/utils/checkGithubRelease.ts): `utils/checkGithubRelease.ts`
- **GitHub Releases**

### Other components

- **Viewer**

## Connections

- Viewer → App Shell: opens app
- App Shell → Catalog Context: provides context (evidence: `app/_layout.tsx`)
- Home Feed → Now Playing List: renders list (evidence: `app/(tabs)/index.tsx`)
- Home Feed → Movie Lists: renders list (evidence: `app/(tabs)/index.tsx`)
- Home Feed → Trending Shows: routes to (evidence: `app/(tabs)/index.tsx`)
- Now Playing List → Catalog Context: reads catalog (evidence: `components/popularList.tsx`)
- Now Playing List → Film Details: routes to
- Trending Shows → Catalog Context: reads catalog (evidence: `app/trendingShows.tsx`)
- Search & Providers → Catalog API: requests search (evidence: `app/(tabs)/search.tsx`)
- Catalog Context → Catalog API: fetches catalog (evidence: `contexts/movieContext/movieContext.tsx`)
- Catalog Context → Catalog Types: uses types (evidence: `contexts/movieContext/movieContext.tsx`)
- Search & Providers → TV Details: routes to (evidence: `app/(tabs)/search.tsx`)
- Film Details → History Storage: updates history (evidence: `app/(player)/details.tsx`)
- TV Details → History Storage: updates history (evidence: `app/(player)/tvDetails.tsx`)
- Film Details → Media Player: opens playback
- TV Details → Media Player: opens playback
- Media Player → Third-Party Media: loads media (evidence: `README.md`)
- History Route → Watch History Screen: renders screen (evidence: `app/watchHistory.tsx`)
- Watch History Screen → History Storage: reads history (evidence: `components/watchHistory.tsx`)
- Watch History Screen → Media Player: routes to (evidence: `components/watchHistory.tsx`)
- More & Updates → History Storage: clears history (evidence: `app/(tabs)/more.tsx`)
- More & Updates → Release Check: checks updates (evidence: `app/(tabs)/more.tsx`)
- Release Check → GitHub Releases: queries releases (evidence: `utils/checkGithubRelease.ts`)
