# hari2617/netstar architecture

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

- Interactive diagram: https://gitdiagram.com/hari2617/netstar
- Repository: https://github.com/hari2617/netstar

## Overview

Netstar is a React anime-browsing site backed by the Jikan API. The main workflow routes visitors to seasonal, popular, top-rated, or upcoming lists; list and search pages fetch anime data and render cards, which link to a detail view. The header also submits searches, and a fallback page handles unmatched routes. The shown fetch code supports the data-flow edges below; the bearer-token helper is imported but not used in the sampled fetch calls.

Main entry points: [`src/AllRoutes/AllRoute.jsx`](https://github.com/hari2617/netstar/blob/master/src/AllRoutes/AllRoute.jsx) (Route dispatch), [`src/App.jsx`](https://github.com/hari2617/netstar/blob/master/src/App.jsx) (App shell), [`src/pages/Search.jsx`](https://github.com/hari2617/netstar/blob/master/src/pages/Search.jsx) (Anime search), [`src/pages/ListMovies.jsx`](https://github.com/hari2617/netstar/blob/master/src/pages/ListMovies.jsx) (Anime lists)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["App shell"]
  node_entry["React entry<br/>[main.jsx]"]
  node_app["App shell<br/>[App.jsx]"]
  node_header["Navigation and search<br/>[Header.jsx]"]
  node_footer["Footer<br/>[Footer.jsx]"]
end

subgraph group_browse["Anime browsing"]
  node_routes["Route dispatch<br/>[AllRoute.jsx]"]
  node_movie_list["Anime lists<br/>[ListMovies.jsx]"]
  node_search["Anime search<br/>[Search.jsx]"]
  node_details["Anime details<br/>[MovieDetails.jsx]"]
  node_not_found["Not found<br/>[PageNotFound.jsx]"]
  node_card["Anime card<br/>[Card.jsx]"]
end

subgraph group_data["Data access"]
  node_fetch_hook["Fetch hook<br/>[useFetch.jsx]"]
  node_token["Bearer token config<br/>[BarearToken.jsx]"]
end

node_visitor(("Visitor"))
node_jikan["Jikan API"]

node_visitor -->|"opens"| node_entry
node_entry -->|"renders"| node_app
node_app -->|"renders"| node_header
node_app -->|"renders"| node_routes
node_app -->|"renders"| node_footer
node_header -->|"navigates to"| node_search
node_routes -->|"routes to"| node_movie_list
node_routes -->|"routes to"| node_search
node_routes -->|"routes to"| node_details
node_routes -->|"routes to"| node_not_found
node_movie_list -->|"fetches via"| node_fetch_hook
node_search -->|"fetches via"| node_fetch_hook
node_fetch_hook -->|"requests data"| node_jikan
node_details -->|"requests details"| node_jikan
node_movie_list -->|"renders"| node_card
node_search -->|"renders"| node_card
node_card -->|"links to"| node_details

click node_entry "https://github.com/hari2617/netstar/blob/master/src/main.jsx"
click node_app "https://github.com/hari2617/netstar/blob/master/src/App.jsx"
click node_header "https://github.com/hari2617/netstar/blob/master/src/Components/Header.jsx"
click node_footer "https://github.com/hari2617/netstar/blob/master/src/Components/Footer.jsx"
click node_routes "https://github.com/hari2617/netstar/blob/master/src/AllRoutes/AllRoute.jsx"
click node_movie_list "https://github.com/hari2617/netstar/blob/master/src/pages/ListMovies.jsx"
click node_search "https://github.com/hari2617/netstar/blob/master/src/pages/Search.jsx"
click node_details "https://github.com/hari2617/netstar/blob/master/src/pages/MovieDetails.jsx"
click node_not_found "https://github.com/hari2617/netstar/blob/master/src/pages/PageNotFound.jsx"
click node_card "https://github.com/hari2617/netstar/blob/master/src/Components/Card.jsx"
click node_fetch_hook "https://github.com/hari2617/netstar/blob/master/src/hooks/useFetch.jsx"
click node_token "https://github.com/hari2617/netstar/blob/master/src/utils/BarearToken.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,node_header,node_footer toneBlue
class node_routes,node_movie_list,node_search,node_details,node_not_found,node_card toneAmber
class node_fetch_hook,node_token,node_jikan toneMint
class node_visitor toneIndigo
```

## Components

### App shell

- [React entry](https://github.com/hari2617/netstar/blob/master/src/main.jsx): `src/main.jsx`
- [App shell](https://github.com/hari2617/netstar/blob/master/src/App.jsx): `src/App.jsx`
- [Navigation and search](https://github.com/hari2617/netstar/blob/master/src/Components/Header.jsx): `src/Components/Header.jsx`
- [Footer](https://github.com/hari2617/netstar/blob/master/src/Components/Footer.jsx): `src/Components/Footer.jsx`

### Anime browsing

- [Route dispatch](https://github.com/hari2617/netstar/blob/master/src/AllRoutes/AllRoute.jsx): `src/AllRoutes/AllRoute.jsx`
- [Anime lists](https://github.com/hari2617/netstar/blob/master/src/pages/ListMovies.jsx): `src/pages/ListMovies.jsx`
- [Anime search](https://github.com/hari2617/netstar/blob/master/src/pages/Search.jsx): `src/pages/Search.jsx`
- [Anime details](https://github.com/hari2617/netstar/blob/master/src/pages/MovieDetails.jsx): `src/pages/MovieDetails.jsx`
- [Not found](https://github.com/hari2617/netstar/blob/master/src/pages/PageNotFound.jsx): `src/pages/PageNotFound.jsx`
- [Anime card](https://github.com/hari2617/netstar/blob/master/src/Components/Card.jsx): `src/Components/Card.jsx`

### Data access

- [Fetch hook](https://github.com/hari2617/netstar/blob/master/src/hooks/useFetch.jsx): `src/hooks/useFetch.jsx`
- [Bearer token config](https://github.com/hari2617/netstar/blob/master/src/utils/BarearToken.jsx): `src/utils/BarearToken.jsx`

### Other components

- **Visitor**
- **Jikan API**

## Connections

- Visitor → React entry: opens (evidence: `src/main.jsx`)
- React entry → App shell: renders (evidence: `src/main.jsx`)
- App shell → Navigation and search: renders (evidence: `src/App.jsx`)
- App shell → Route dispatch: renders (evidence: `src/App.jsx`)
- App shell → Footer: renders (evidence: `src/App.jsx`)
- Navigation and search → Anime search: navigates to (evidence: `src/Components/Header.jsx`)
- Route dispatch → Anime lists: routes to (evidence: `src/AllRoutes/AllRoute.jsx`)
- Route dispatch → Anime search: routes to (evidence: `src/AllRoutes/AllRoute.jsx`)
- Route dispatch → Anime details: routes to (evidence: `src/AllRoutes/AllRoute.jsx`)
- Route dispatch → Not found: routes to (evidence: `src/AllRoutes/AllRoute.jsx`)
- Anime lists → Fetch hook: fetches via (evidence: `src/pages/ListMovies.jsx`)
- Anime search → Fetch hook: fetches via (evidence: `src/pages/Search.jsx`)
- Fetch hook → Jikan API: requests data (evidence: `src/hooks/useFetch.jsx`)
- Anime details → Jikan API: requests details (evidence: `src/pages/MovieDetails.jsx`)
- Anime lists → Anime card: renders (evidence: `src/pages/ListMovies.jsx`)
- Anime search → Anime card: renders (evidence: `src/pages/Search.jsx`)
- Anime card → Anime details: links to (evidence: `src/Components/Card.jsx`)
