# nikilmunireddy/streaming-app architecture

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

- Interactive diagram: https://gitdiagram.com/nikilmunireddy/streaming-app
- Repository: https://github.com/nikilmunireddy/streaming-app

## Overview

Streamer is a browser-based streaming app: users authenticate, choose live video, on-demand video, or music, then select a source and play it. The graph follows the shown React entry and route ownership, the login component’s Firebase authentication calls, and the catalogs’ localStorage handoff to the player. Source excerpts do not establish a direct external streaming-service API or show service-worker registration from the app entry, so those links are omitted.

Main entry points: [`src/components/Choose.jsx`](https://github.com/nikilmunireddy/streaming-app/blob/master/src/components/Choose.jsx) (Catalog chooser), [`src/components/Main.jsx`](https://github.com/nikilmunireddy/streaming-app/blob/master/src/components/Main.jsx) (Route switch), [`src/components/LoginPage.jsx`](https://github.com/nikilmunireddy/streaming-app/blob/master/src/components/LoginPage.jsx) (Login and signup), [`src/components/Play.jsx`](https://github.com/nikilmunireddy/streaming-app/blob/master/src/components/Play.jsx) (Stream player)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_entry["React entry<br/>[index.js]"]
  node_app["App shell<br/>[App.jsx]"]
  node_routes["Route switch<br/>[Main.jsx]"]
end

subgraph group_access["Account access"]
  node_login["Login and signup<br/>[LoginPage.jsx]"]
  node_firebase{{"Firebase Auth"}}
end

subgraph group_catalogs["Stream catalogs"]
  node_chooser["Catalog chooser<br/>[Choose.jsx]"]
  node_ondemand["On-demand catalog<br/>[OnDemand.jsx]"]
  node_live["Live catalog<br/>[LiveStreaming.jsx]"]
  node_music["Music catalog<br/>[FM.jsx]"]
end

subgraph group_playback["Playback"]
  node_selection[("Selected stream URL")]
  node_player["Stream player<br/>[Play.jsx]"]
  node_hls{{"HLS playback library"}}
end

node_visitor(("Viewer"))

node_visitor -->|"opens app"| node_entry
node_entry -->|"renders"| node_app
node_app -->|"renders"| node_routes
node_routes -->|"routes /"| node_login
node_routes -->|"routes /choose"| node_chooser
node_routes -->|"routes /play"| node_player
node_login -->|"authenticates"| node_firebase
node_login -->|"redirects after sign-in"| node_chooser
node_chooser -->|"renders default"| node_ondemand
node_chooser -->|"renders on selection"| node_live
node_chooser -->|"renders on selection"| node_music
node_ondemand -->|"stores URL"| node_selection
node_live -->|"stores URL"| node_selection
node_music -->|"stores URL"| node_selection
node_selection -->|"reads URL"| node_player
node_player -->|"renders stream"| node_hls

click node_entry "https://github.com/nikilmunireddy/streaming-app/blob/master/src/index.js"
click node_app "https://github.com/nikilmunireddy/streaming-app/blob/master/src/components/App.jsx"
click node_routes "https://github.com/nikilmunireddy/streaming-app/blob/master/src/components/Main.jsx"
click node_login "https://github.com/nikilmunireddy/streaming-app/blob/master/src/components/LoginPage.jsx"
click node_chooser "https://github.com/nikilmunireddy/streaming-app/blob/master/src/components/Choose.jsx"
click node_ondemand "https://github.com/nikilmunireddy/streaming-app/blob/master/src/components/OnDemand.jsx"
click node_live "https://github.com/nikilmunireddy/streaming-app/blob/master/src/components/LiveStreaming.jsx"
click node_music "https://github.com/nikilmunireddy/streaming-app/blob/master/src/components/FM.jsx"
click node_player "https://github.com/nikilmunireddy/streaming-app/blob/master/src/components/Play.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_routes,node_visitor toneBlue
class node_login,node_firebase toneAmber
class node_chooser,node_ondemand,node_live,node_music toneMint
class node_selection,node_player,node_hls toneRose
```

## Components

### App navigation

- [React entry](https://github.com/nikilmunireddy/streaming-app/blob/master/src/index.js): `src/index.js`
- [App shell](https://github.com/nikilmunireddy/streaming-app/blob/master/src/components/App.jsx): `src/components/App.jsx`
- [Route switch](https://github.com/nikilmunireddy/streaming-app/blob/master/src/components/Main.jsx): `src/components/Main.jsx`

### Account access

- [Login and signup](https://github.com/nikilmunireddy/streaming-app/blob/master/src/components/LoginPage.jsx): `src/components/LoginPage.jsx`
- **Firebase Auth**

### Stream catalogs

- [Catalog chooser](https://github.com/nikilmunireddy/streaming-app/blob/master/src/components/Choose.jsx): `src/components/Choose.jsx`
- [On-demand catalog](https://github.com/nikilmunireddy/streaming-app/blob/master/src/components/OnDemand.jsx): `src/components/OnDemand.jsx`
- [Live catalog](https://github.com/nikilmunireddy/streaming-app/blob/master/src/components/LiveStreaming.jsx): `src/components/LiveStreaming.jsx`
- [Music catalog](https://github.com/nikilmunireddy/streaming-app/blob/master/src/components/FM.jsx): `src/components/FM.jsx`

### Playback

- **Selected stream URL**
- [Stream player](https://github.com/nikilmunireddy/streaming-app/blob/master/src/components/Play.jsx): `src/components/Play.jsx`
- **HLS playback library**

### Other components

- **Viewer**

## Connections

- Viewer → React entry: opens app (evidence: `src/index.js`)
- React entry → App shell: renders (evidence: `src/index.js`)
- App shell → Route switch: renders (evidence: `src/components/App.jsx`)
- Route switch → Login and signup: routes / (evidence: `src/components/Main.jsx`)
- Route switch → Catalog chooser: routes /choose (evidence: `src/components/Main.jsx`)
- Route switch → Stream player: routes /play (evidence: `src/components/Main.jsx`)
- Login and signup → Firebase Auth: authenticates (evidence: `src/components/LoginPage.jsx`)
- Login and signup → Catalog chooser: redirects after sign-in (evidence: `src/components/LoginPage.jsx`)
- Catalog chooser → On-demand catalog: renders default (evidence: `src/components/Choose.jsx`)
- Catalog chooser → Live catalog: renders on selection (evidence: `src/components/Choose.jsx`)
- Catalog chooser → Music catalog: renders on selection (evidence: `src/components/Choose.jsx`)
- On-demand catalog → Selected stream URL: stores URL (evidence: `src/components/OnDemand.jsx`)
- Live catalog → Selected stream URL: stores URL (evidence: `src/components/LiveStreaming.jsx`)
- Music catalog → Selected stream URL: stores URL (evidence: `src/components/FM.jsx`)
- Selected stream URL → Stream player: reads URL (evidence: `src/components/Play.jsx`)
- Stream player → HLS playback library: renders stream (evidence: `src/components/Play.jsx`)
