# sammaiah-guguloth/livestack-frontend architecture

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

- Interactive diagram: https://gitdiagram.com/sammaiah-guguloth/livestack-frontend
- Repository: https://github.com/sammaiah-guguloth/livestack-frontend

## Overview

LiveStack is a browser-based collaborative coding platform. Users authenticate, create or join rooms, collaborate through shared code, chat, presence and peer-to-peer media, then review room code, notes and participants. The graph preserves those documented capabilities and the frontend’s API, Redux and socket layers. Some feature paths are documented in the README but their implementation was not sampled, so those relationships cite the README; source-level links use the shown excerpts or index references.

Main entry points: [`src/pages/Room.jsx`](https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/pages/Room.jsx) (Live room), [`src/redux/thunks/room.thunk.js`](https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/redux/thunks/room.thunk.js) (Room requests), [`src/services/SocketClient.js`](https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/services/SocketClient.js) (Socket client), [`src/services/PeerConnectionManager.js`](https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/services/PeerConnectionManager.js) (Peer connections)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and discovery"]
  node_auth["Authentication<br/>[Login.jsx]"]
  node_dashboard["Room dashboard<br/>[Dashboard.jsx]"]
end

subgraph group_rooms["Room lifecycle"]
  node_room_setup["Room creation"]
  node_room_page["Live room<br/>[Room.jsx]"]
  node_overview["Room overview<br/>[RoomOverview.jsx]"]
  node_review_features["Review code, notes, members"]
end

subgraph group_collaboration["Live collaboration"]
  node_code_editor["Code editor<br/>[CodeEditor.jsx]"]
  node_code_controls["Code controls<br/>[CodeHeader.jsx]"]
  node_chat["Room chat<br/>[ChatBox.jsx]"]
  node_video["Video calls<br/>[VideoCall.jsx]"]
  node_peer_manager["Peer connections"]
  node_room_features["Room presence and notes"]
end

subgraph group_runtime["Frontend runtime"]
  node_redux["Application state"]
  node_room_thunks["Room requests<br/>[room.thunk.js]"]
  node_auth_thunks["Authentication requests<br/>[auth.thunk.js]"]
  node_api["HTTP API client<br/>[axiosInstance.js]"]
  node_api_routes["API endpoints<br/>[apis.js]"]
  node_socket_client["Socket client<br/>[SocketClient.js]"]
  node_src_layout["Responsive editor layout"]
end

node_developer(("User"))
node_backend["Backend API"]
node_socket_server["WebSocket server"]
node_other_peers(("Other participants"))

node_developer -->|"signs in"| node_auth
node_developer -->|"browses rooms"| node_dashboard
node_developer -->|"creates room"| node_room_setup
node_dashboard -->|"requests room list"| node_room_thunks
node_room_setup -->|"creates room"| node_room_thunks
node_room_page -->|"fetches room"| node_room_thunks
node_room_page -->|"updates state"| node_redux
node_room_page -->|"renders"| node_code_editor
node_room_page -.->|"renders"| node_code_controls
node_room_page -.->|"renders"| node_chat
node_room_page -.->|"renders"| node_video
node_room_page -.->|"provides room tools"| node_room_features
node_room_page -->|"handles live events"| node_socket_client
node_room_page -->|"manages peer media"| node_peer_manager
node_room_page -->|"renders responsive layout"| node_src_layout
node_code_editor -->|"syncs edits"| node_socket_client
node_chat -->|"sends messages"| node_socket_client
node_peer_manager -->|"signals peers"| node_socket_server
node_peer_manager -->|"streams media"| node_other_peers
node_socket_client -->|"exchanges events"| node_socket_server
node_other_peers -->|"collaborates"| node_room_page
node_room_page -->|"ends session for review"| node_overview
node_overview -->|"presents session summary"| node_review_features
node_room_thunks -->|"calls"| node_api
node_auth_thunks -->|"calls"| node_api
node_auth -->|"dispatches"| node_auth_thunks
node_api -->|"sends HTTP requests"| node_backend
node_room_thunks -->|"uses endpoint constants"| node_api_routes
node_auth_thunks -->|"uses endpoint constants"| node_api_routes

click node_auth "https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/pages/Login.jsx"
click node_dashboard "https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/pages/Dashboard.jsx"
click node_room_setup "https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/components/CreateRoomModal.jsx"
click node_room_page "https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/pages/Room.jsx"
click node_overview "https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/pages/RoomOverview.jsx"
click node_code_editor "https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/components/Room/CodeEditor.jsx"
click node_code_controls "https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/components/Room/CodeHeader.jsx"
click node_chat "https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/components/Room/ChatBox.jsx"
click node_video "https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/components/Room/VideoCall.jsx"
click node_peer_manager "https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/services/PeerConnectionManager.js"
click node_room_features "https://github.com/sammaiah-guguloth/livestack-frontend/tree/main/src/components/Room"
click node_review_features "https://github.com/sammaiah-guguloth/livestack-frontend/tree/main/src/components/RoomOverview"
click node_redux "https://github.com/sammaiah-guguloth/livestack-frontend/tree/main/src/redux"
click node_room_thunks "https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/redux/thunks/room.thunk.js"
click node_auth_thunks "https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/redux/thunks/auth.thunk.js"
click node_api "https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/api/axios/axiosInstance.js"
click node_api_routes "https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/api/apis.js"
click node_socket_client "https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/services/SocketClient.js"
click node_src_layout "https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/components/Layout/ResponsiveEditorLayout.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_auth,node_dashboard,node_developer toneBlue
class node_room_setup,node_room_page,node_overview,node_review_features toneAmber
class node_code_editor,node_code_controls,node_chat,node_video,node_peer_manager,node_room_features,node_backend,node_socket_server toneMint
class node_redux,node_room_thunks,node_auth_thunks,node_api,node_api_routes,node_socket_client,node_src_layout toneRose
class node_other_peers toneIndigo
```

## Components

### Access and discovery

- [Authentication](https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/pages/Login.jsx): `src/pages/Login.jsx`
- [Room dashboard](https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/pages/Dashboard.jsx): `src/pages/Dashboard.jsx`

### Room lifecycle

- [Room creation](https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/components/CreateRoomModal.jsx): `src/components/CreateRoomModal.jsx`
- [Live room](https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/pages/Room.jsx): `src/pages/Room.jsx`
- [Room overview](https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/pages/RoomOverview.jsx): `src/pages/RoomOverview.jsx`
- [Review code, notes, members](https://github.com/sammaiah-guguloth/livestack-frontend/tree/main/src/components/RoomOverview): `src/components/RoomOverview`

### Live collaboration

- [Code editor](https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/components/Room/CodeEditor.jsx): `src/components/Room/CodeEditor.jsx`
- [Code controls](https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/components/Room/CodeHeader.jsx): `src/components/Room/CodeHeader.jsx`
- [Room chat](https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/components/Room/ChatBox.jsx): `src/components/Room/ChatBox.jsx`
- [Video calls](https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/components/Room/VideoCall.jsx): `src/components/Room/VideoCall.jsx`
- [Peer connections](https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/services/PeerConnectionManager.js): `src/services/PeerConnectionManager.js`
- [Room presence and notes](https://github.com/sammaiah-guguloth/livestack-frontend/tree/main/src/components/Room): `src/components/Room`

### Frontend runtime

- [Application state](https://github.com/sammaiah-guguloth/livestack-frontend/tree/main/src/redux): `src/redux`
- [Room requests](https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/redux/thunks/room.thunk.js): `src/redux/thunks/room.thunk.js`
- [Authentication requests](https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/redux/thunks/auth.thunk.js): `src/redux/thunks/auth.thunk.js`
- [HTTP API client](https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/api/axios/axiosInstance.js): `src/api/axios/axiosInstance.js`
- [API endpoints](https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/api/apis.js): `src/api/apis.js`
- [Socket client](https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/services/SocketClient.js): `src/services/SocketClient.js`
- [Responsive editor layout](https://github.com/sammaiah-guguloth/livestack-frontend/blob/main/src/components/Layout/ResponsiveEditorLayout.jsx): `src/components/Layout/ResponsiveEditorLayout.jsx`

### Other components

- **User**
- **Backend API**
- **WebSocket server**
- **Other participants**

## Connections

- User → Authentication: signs in
- User → Room dashboard: browses rooms
- User → Room creation: creates room
- Room dashboard → Room requests: requests room list (evidence: `src/pages/Dashboard.jsx`)
- Room creation → Room requests: creates room (evidence: `src/components/CreateRoomModal.jsx`)
- Live room → Room requests: fetches room (evidence: `src/pages/Room.jsx`)
- Live room → Application state: updates state (evidence: `src/pages/Room.jsx`)
- Live room → Code editor: renders (evidence: `src/pages/Room.jsx`)
- Live room → Code controls: renders (evidence: `src/pages/Room.jsx`)
- Live room → Room chat: renders (evidence: `src/pages/Room.jsx`)
- Live room → Video calls: renders (evidence: `src/pages/Room.jsx`)
- Live room → Room presence and notes: provides room tools (evidence: `src/pages/Room.jsx`)
- Live room → Socket client: handles live events (evidence: `src/pages/Room.jsx`)
- Live room → Peer connections: manages peer media (evidence: `src/pages/Room.jsx`)
- Live room → Responsive editor layout: renders responsive layout (evidence: `src/pages/Room.jsx`)
- Code editor → Socket client: syncs edits (evidence: `src/components/Room/CodeEditor.jsx`)
- Room chat → Socket client: sends messages (evidence: `src/components/Room/ChatBox.jsx`)
- Peer connections → WebSocket server: signals peers (evidence: `src/services/PeerConnectionManager.js`)
- Peer connections → Other participants: streams media (evidence: `src/services/PeerConnectionManager.js`)
- Socket client → WebSocket server: exchanges events
- Other participants → Live room: collaborates
- Live room → Room overview: ends session for review
- Room overview → Review code, notes, members: presents session summary (evidence: `src/pages/RoomOverview.jsx`)
- Room requests → HTTP API client: calls (evidence: `src/redux/thunks/room.thunk.js`)
- Authentication requests → HTTP API client: calls (evidence: `src/redux/thunks/auth.thunk.js`)
- Authentication → Authentication requests: dispatches (evidence: `src/pages/Login.jsx`)
- HTTP API client → Backend API: sends HTTP requests
- Room requests → API endpoints: uses endpoint constants (evidence: `src/redux/thunks/room.thunk.js`)
- Authentication requests → API endpoints: uses endpoint constants (evidence: `src/redux/thunks/auth.thunk.js`)
