# priyanshukumar016/melody-party architecture

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

- Interactive diagram: https://gitdiagram.com/priyanshukumar016/melody-party
- Repository: https://github.com/priyanshukumar016/melody-party

## Overview

Melody Party is a browser-based shared music-room app. A host opens a room, guests join using its code, and the server maintains room membership, a voted song queue, current playback, and played-song history. The host advances playback; room updates are sent to connected clients. The sampled client shows room creation/joining and host playback controls, while queue addition and voting are implemented on the server but their client-side entry points are not shown. The README is empty, so this map is based on the sampled source and file tree.

Main entry points: [`server.js`](https://github.com/priyanshukumar016/melody-party/blob/main/server.js) (Socket server), [`index.html`](https://github.com/priyanshukumar016/melody-party/blob/main/index.html) (Landing page), [`main.js`](https://github.com/priyanshukumar016/melody-party/blob/main/main.js) (Entry navigation), [`room.js`](https://github.com/priyanshukumar016/melody-party/blob/main/room.js) (Room client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Room entry"]
  node_landing["Landing page<br/>[index.html]"]
  node_entry_logic["Entry navigation<br/>[main.js]"]
end

subgraph group_client["Room client"]
  node_room_page["Room page<br/>[room.html]"]
  node_room_client["Room client<br/>[room.js]"]
end

subgraph group_runtime["Room runtime"]
  node_room_server["Socket server<br/>[server.js]"]
  node_room_state[("Room state<br/>[server.js]")]
end

node_user(("Participant"))

node_user -->|"opens"| node_landing
node_landing -->|"handles clicks"| node_entry_logic
node_entry_logic -->|"navigates to"| node_room_page
node_user -.->|"opens room"| node_room_page
node_room_client -->|"emits room events"| node_room_server
node_room_server -->|"sends room updates"| node_room_client
node_room_server -->|"updates"| node_room_state

click node_landing "https://github.com/priyanshukumar016/melody-party/blob/main/index.html"
click node_entry_logic "https://github.com/priyanshukumar016/melody-party/blob/main/main.js"
click node_room_page "https://github.com/priyanshukumar016/melody-party/blob/main/room.html"
click node_room_client "https://github.com/priyanshukumar016/melody-party/blob/main/room.js"
click node_room_server "https://github.com/priyanshukumar016/melody-party/blob/main/server.js"
click node_room_state "https://github.com/priyanshukumar016/melody-party/blob/main/server.js"

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_landing,node_entry_logic toneBlue
class node_room_page,node_room_client toneAmber
class node_room_server,node_room_state toneMint
class node_user toneIndigo
```

## Components

### Room entry

- [Landing page](https://github.com/priyanshukumar016/melody-party/blob/main/index.html): `index.html`
- [Entry navigation](https://github.com/priyanshukumar016/melody-party/blob/main/main.js): `main.js`

### Room client

- [Room page](https://github.com/priyanshukumar016/melody-party/blob/main/room.html): `room.html`
- [Room client](https://github.com/priyanshukumar016/melody-party/blob/main/room.js): `room.js`

### Room runtime

- [Socket server](https://github.com/priyanshukumar016/melody-party/blob/main/server.js): `server.js`
- [Room state](https://github.com/priyanshukumar016/melody-party/blob/main/server.js): `server.js`

### Other components

- **Participant**

## Connections

- Participant → Landing page: opens
- Landing page → Entry navigation: handles clicks (evidence: `main.js`)
- Entry navigation → Room page: navigates to (evidence: `main.js`)
- Participant → Room page: opens room
- Room client → Socket server: emits room events (evidence: `room.js`)
- Socket server → Room client: sends room updates (evidence: `server.js`)
- Socket server → Room state: updates (evidence: `server.js`)
