# yashnikhare/shaam-e-mohabbatk architecture

> Architecture diagram of the GitHub repository yashnikhare/shaam-e-mohabbatk, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yashnikhare/shaam-e-mohabbatk
- Repository: https://github.com/yashnikhare/shaam-e-mohabbatk

## Overview

Shaam-e-Mohabbat is a React lounge experience: visitors enter the composed interface, adjust evening mood and ambience, view the animated window scene and poetry, and use the music dock to load and control a playlist. Its supporting server provides playlist and live-presence APIs. The graph preserves the documented capabilities, but some wiring—especially the presence client and browser media integrations—is not visible in the excerpts, so those links are omitted or marked unverified.

Main entry points: [`src/App.tsx`](https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/App.tsx) (App Composition), [`src/components/YouTubePlayerDock.tsx`](https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/components/YouTubePlayerDock.tsx) (YouTube Player Dock), [`src/components/TopBar.tsx`](https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/components/TopBar.tsx) (Mood and Controls), [`server.ts`](https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/server.ts) (HTTP API Server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Lounge Experience"]
  node_app["App Composition<br/>[App.tsx]"]
  node_topbar["Mood and Controls<br/>[TopBar.tsx]"]
  node_window["Window Lounge<br/>[WindowLounge.tsx]"]
  node_shayari["Shayari Cards<br/>[ShayariCard.tsx]"]
end

subgraph group_audio["Audio and Atmosphere"]
  node_ambience["Ambience Engine<br/>[ambienceAudio.ts]"]
  node_sunset["Sunset Renderer<br/>[sunsetEngine.ts]"]
end

subgraph group_music["Playlist and Playback"]
  node_dock["YouTube Player Dock"]
  node_playback["Playback Engine<br/>[playbackEngine.ts]"]
  node_playlist["Playlist Parser<br/>[playlistParser.ts]"]
  node_loungefeatures["Queue Features<br/>[loungeFeatures.ts]"]
  node_ytmetadata["Track Metadata<br/>[youtubePlayer.ts]"]
end

subgraph group_service["Server Services"]
  node_server["HTTP API Server<br/>[server.ts]"]
  node_presence[("Presence Registry<br/>[presenceTracker.ts]")]
end

node_visitor(("Visitor"))
node_youtube["YouTube Service"]
node_browseraudio["Web Audio API"]

node_visitor -->|"uses"| node_app
node_app -->|"renders"| node_topbar
node_app -->|"renders"| node_window
node_app -->|"renders"| node_dock
node_app -->|"renders"| node_shayari
node_app -->|"loads saved mix"| node_ambience
node_window -->|"mounts and controls"| node_sunset
node_topbar -->|"controls"| node_ambience
node_topbar -->|"formats count"| node_presence
node_dock -->|"uses"| node_playback
node_dock -->|"loads favorites"| node_loungefeatures
node_dock -->|"parses track metadata"| node_ytmetadata
node_server -->|"parses playlist pages"| node_playlist
node_server -->|"tracks sessions"| node_presence
node_dock -->|"requests playlist"| node_server
node_playback -->|"uses playlist types"| node_playlist
node_dock -.->|"plays streamed music"| node_youtube
node_ambience -.->|"synthesizes sound"| node_browseraudio

click node_app "https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/App.tsx"
click node_topbar "https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/components/TopBar.tsx"
click node_window "https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/components/WindowLounge.tsx"
click node_shayari "https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/components/ShayariCard.tsx"
click node_ambience "https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/utils/ambienceAudio.ts"
click node_sunset "https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/utils/sunsetEngine.ts"
click node_dock "https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/components/YouTubePlayerDock.tsx"
click node_playback "https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/utils/playbackEngine.ts"
click node_playlist "https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/utils/playlistParser.ts"
click node_loungefeatures "https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/utils/loungeFeatures.ts"
click node_ytmetadata "https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/utils/youtubePlayer.ts"
click node_server "https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/server.ts"
click node_presence "https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/utils/presenceTracker.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,node_topbar,node_window,node_shayari toneBlue
class node_ambience,node_sunset toneAmber
class node_dock,node_playback,node_playlist,node_loungefeatures,node_ytmetadata,node_browseraudio toneMint
class node_server,node_presence toneRose
class node_visitor,node_youtube toneIndigo
```

## Components

### Lounge Experience

- [App Composition](https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/App.tsx): `src/App.tsx`
- [Mood and Controls](https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/components/TopBar.tsx): `src/components/TopBar.tsx`
- [Window Lounge](https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/components/WindowLounge.tsx): `src/components/WindowLounge.tsx`
- [Shayari Cards](https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/components/ShayariCard.tsx): `src/components/ShayariCard.tsx`

### Audio and Atmosphere

- [Ambience Engine](https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/utils/ambienceAudio.ts): `src/utils/ambienceAudio.ts`
- [Sunset Renderer](https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/utils/sunsetEngine.ts): `src/utils/sunsetEngine.ts`

### Playlist and Playback

- [YouTube Player Dock](https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/components/YouTubePlayerDock.tsx): `src/components/YouTubePlayerDock.tsx`
- [Playback Engine](https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/utils/playbackEngine.ts): `src/utils/playbackEngine.ts`
- [Playlist Parser](https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/utils/playlistParser.ts): `src/utils/playlistParser.ts`
- [Queue Features](https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/utils/loungeFeatures.ts): `src/utils/loungeFeatures.ts`
- [Track Metadata](https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/utils/youtubePlayer.ts): `src/utils/youtubePlayer.ts`

### Server Services

- [HTTP API Server](https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/server.ts): `server.ts`
- [Presence Registry](https://github.com/yashnikhare/shaam-e-mohabbatk/blob/main/src/utils/presenceTracker.ts): `src/utils/presenceTracker.ts`

### Other components

- **Visitor**
- **YouTube Service**
- **Web Audio API**

## Connections

- Visitor → App Composition: uses (evidence: `README.md`)
- App Composition → Mood and Controls: renders (evidence: `src/App.tsx`)
- App Composition → Window Lounge: renders (evidence: `src/App.tsx`)
- App Composition → YouTube Player Dock: renders (evidence: `src/App.tsx`)
- App Composition → Shayari Cards: renders (evidence: `src/App.tsx`)
- App Composition → Ambience Engine: loads saved mix (evidence: `src/App.tsx`)
- Window Lounge → Sunset Renderer: mounts and controls (evidence: `src/components/WindowLounge.tsx`)
- Mood and Controls → Ambience Engine: controls (evidence: `src/components/TopBar.tsx`)
- Mood and Controls → Presence Registry: formats count (evidence: `src/components/TopBar.tsx`)
- YouTube Player Dock → Playback Engine: uses (evidence: `src/components/YouTubePlayerDock.tsx`)
- YouTube Player Dock → Queue Features: loads favorites (evidence: `src/components/YouTubePlayerDock.tsx`)
- YouTube Player Dock → Track Metadata: parses track metadata (evidence: `src/components/YouTubePlayerDock.tsx`)
- HTTP API Server → Playlist Parser: parses playlist pages (evidence: `server.ts`)
- HTTP API Server → Presence Registry: tracks sessions (evidence: `server.ts`)
- YouTube Player Dock → HTTP API Server: requests playlist (evidence: `src/components/YouTubePlayerDock.tsx`)
- Playback Engine → Playlist Parser: uses playlist types (evidence: `src/utils/playbackEngine.ts`)
- YouTube Player Dock → YouTube Service: plays streamed music (evidence: `README.md`)
- Ambience Engine → Web Audio API: synthesizes sound (evidence: `README.md`)
