# harshadkaushal/callneo architecture

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

- Interactive diagram: https://gitdiagram.com/harshadkaushal/callneo
- Repository: https://github.com/harshadkaushal/callneo

## Overview

CallNeo is a multi-party video calling app. A user signs up or logs in, creates a room or looks one up by code and joins it, then enters a call. The browser uses HTTP for authentication and room management, and Socket.IO for call signaling; the backend checks room participation and coordinates mediasoup transports, producers, and consumers. Sequelize models represent users, rooms, and memberships in PostgreSQL. The README documents the client’s signaling sequence and late-join behavior; connections to unsampled implementation details are limited to those documented relationships.

Main entry points: [`frontend/src/App.tsx`](https://github.com/harshadkaushal/callneo/blob/main/frontend/src/App.tsx) (App flow), [`backend/src/Rooms/room.service.ts`](https://github.com/harshadkaushal/callneo/blob/main/backend/src/Rooms/room.service.ts) (Room service), [`database/src/models/participant.model.ts`](https://github.com/harshadkaushal/callneo/blob/main/database/src/models/participant.model.ts) (Membership records), [`frontend/src/api.ts`](https://github.com/harshadkaushal/callneo/blob/main/frontend/src/api.ts) (HTTP client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser client"]
  node_app["App flow<br/>[App.tsx]"]
  node_login["Login<br/>[Login.tsx]"]
  node_signup["Signup<br/>[Signup.tsx]"]
  node_home["Room selection<br/>[Home.tsx]"]
  node_callui["Call client<br/>[Call.tsx]"]
  node_player["Media player<br/>[Player.tsx]"]
  node_httpclient["HTTP client<br/>[api.ts]"]
end

subgraph group_api["NestJS API"]
  node_authcontroller["Auth routes<br/>[auth.controller.ts]"]
  node_authservice["Auth service<br/>[auth.service.ts]"]
  node_roomcontroller["Room routes<br/>[room.controller.ts]"]
  node_roomservice["Room service<br/>[room.service.ts]"]
end

subgraph group_media["Media signaling"]
  node_gateway["Call gateway<br/>[call.gateway.ts]"]
  node_mediasoup["SFU service"]
  node_health["Media health"]
end

subgraph group_data["Persistent data"]
  node_users[("User records<br/>[user.model.ts]")]
  node_rooms[("Room records<br/>[room.model.ts]")]
  node_participants[("Membership records")]
end

node_user(("Participant"))
node_postgres[("PostgreSQL")]

node_user -->|"uses"| node_app
node_app -->|"shows"| node_login
node_app -->|"shows"| node_signup
node_app -->|"shows"| node_home
node_app -->|"shows"| node_callui
node_login -->|"calls"| node_httpclient
node_signup -->|"calls"| node_httpclient
node_app -->|"calls"| node_httpclient
node_home -->|"invokes"| node_app
node_httpclient -->|"HTTP requests"| node_authcontroller
node_httpclient -->|"HTTP requests"| node_roomcontroller
node_authcontroller -->|"delegates"| node_authservice
node_authservice -->|"reads/writes"| node_users
node_roomcontroller -->|"delegates"| node_roomservice
node_roomservice -->|"reads/writes"| node_rooms
node_roomservice -->|"reads/writes"| node_participants
node_roomservice -->|"looks up"| node_users
node_callui -->|"Socket.IO signaling"| node_gateway
node_gateway -->|"checks membership"| node_roomservice
node_gateway -->|"dispatches media"| node_mediasoup
node_mediasoup -->|"media signaling"| node_callui
node_callui -->|"renders"| node_player
node_health -->|"reads stats"| node_mediasoup
node_users -->|"associates"| node_rooms
node_rooms -->|"associates"| node_participants
node_participants -->|"references"| node_users
node_participants -->|"references"| node_rooms
node_users -.->|"persists"| node_postgres
node_rooms -.->|"persists"| node_postgres
node_participants -.->|"persists"| node_postgres

click node_app "https://github.com/harshadkaushal/callneo/blob/main/frontend/src/App.tsx"
click node_login "https://github.com/harshadkaushal/callneo/blob/main/frontend/src/Login.tsx"
click node_signup "https://github.com/harshadkaushal/callneo/blob/main/frontend/src/Signup.tsx"
click node_home "https://github.com/harshadkaushal/callneo/blob/main/frontend/src/Home.tsx"
click node_callui "https://github.com/harshadkaushal/callneo/blob/main/frontend/src/Call.tsx"
click node_player "https://github.com/harshadkaushal/callneo/blob/main/frontend/src/Player.tsx"
click node_httpclient "https://github.com/harshadkaushal/callneo/blob/main/frontend/src/api.ts"
click node_authcontroller "https://github.com/harshadkaushal/callneo/blob/main/backend/src/Auth/auth.controller.ts"
click node_authservice "https://github.com/harshadkaushal/callneo/blob/main/backend/src/Auth/auth.service.ts"
click node_roomcontroller "https://github.com/harshadkaushal/callneo/blob/main/backend/src/Rooms/room.controller.ts"
click node_roomservice "https://github.com/harshadkaushal/callneo/blob/main/backend/src/Rooms/room.service.ts"
click node_gateway "https://github.com/harshadkaushal/callneo/blob/main/backend/src/call/call.gateway.ts"
click node_mediasoup "https://github.com/harshadkaushal/callneo/blob/main/backend/src/mediasoup/mediasoup.service.ts"
click node_health "https://github.com/harshadkaushal/callneo/blob/main/backend/src/mediasoup/mediasoup.controller.ts"
click node_users "https://github.com/harshadkaushal/callneo/blob/main/database/src/models/user.model.ts"
click node_rooms "https://github.com/harshadkaushal/callneo/blob/main/database/src/models/room.model.ts"
click node_participants "https://github.com/harshadkaushal/callneo/blob/main/database/src/models/participant.model.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_login,node_signup,node_home,node_callui,node_player,node_httpclient toneBlue
class node_authcontroller,node_authservice,node_roomcontroller,node_roomservice,node_postgres toneAmber
class node_gateway,node_mediasoup,node_health toneMint
class node_users,node_rooms,node_participants toneRose
class node_user toneIndigo
```

## Components

### Browser client

- [App flow](https://github.com/harshadkaushal/callneo/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Login](https://github.com/harshadkaushal/callneo/blob/main/frontend/src/Login.tsx): `frontend/src/Login.tsx`
- [Signup](https://github.com/harshadkaushal/callneo/blob/main/frontend/src/Signup.tsx): `frontend/src/Signup.tsx`
- [Room selection](https://github.com/harshadkaushal/callneo/blob/main/frontend/src/Home.tsx): `frontend/src/Home.tsx`
- [Call client](https://github.com/harshadkaushal/callneo/blob/main/frontend/src/Call.tsx): `frontend/src/Call.tsx`
- [Media player](https://github.com/harshadkaushal/callneo/blob/main/frontend/src/Player.tsx): `frontend/src/Player.tsx`
- [HTTP client](https://github.com/harshadkaushal/callneo/blob/main/frontend/src/api.ts): `frontend/src/api.ts`

### NestJS API

- [Auth routes](https://github.com/harshadkaushal/callneo/blob/main/backend/src/Auth/auth.controller.ts): `backend/src/Auth/auth.controller.ts`
- [Auth service](https://github.com/harshadkaushal/callneo/blob/main/backend/src/Auth/auth.service.ts): `backend/src/Auth/auth.service.ts`
- [Room routes](https://github.com/harshadkaushal/callneo/blob/main/backend/src/Rooms/room.controller.ts): `backend/src/Rooms/room.controller.ts`
- [Room service](https://github.com/harshadkaushal/callneo/blob/main/backend/src/Rooms/room.service.ts): `backend/src/Rooms/room.service.ts`

### Media signaling

- [Call gateway](https://github.com/harshadkaushal/callneo/blob/main/backend/src/call/call.gateway.ts): `backend/src/call/call.gateway.ts`
- [SFU service](https://github.com/harshadkaushal/callneo/blob/main/backend/src/mediasoup/mediasoup.service.ts): `backend/src/mediasoup/mediasoup.service.ts`
- [Media health](https://github.com/harshadkaushal/callneo/blob/main/backend/src/mediasoup/mediasoup.controller.ts): `backend/src/mediasoup/mediasoup.controller.ts`

### Persistent data

- [User records](https://github.com/harshadkaushal/callneo/blob/main/database/src/models/user.model.ts): `database/src/models/user.model.ts`
- [Room records](https://github.com/harshadkaushal/callneo/blob/main/database/src/models/room.model.ts): `database/src/models/room.model.ts`
- [Membership records](https://github.com/harshadkaushal/callneo/blob/main/database/src/models/participant.model.ts): `database/src/models/participant.model.ts`

### Other components

- **Participant**
- **PostgreSQL**

## Connections

- Participant → App flow: uses (evidence: `README.md`)
- App flow → Login: shows (evidence: `frontend/src/App.tsx`)
- App flow → Signup: shows (evidence: `frontend/src/App.tsx`)
- App flow → Room selection: shows (evidence: `frontend/src/App.tsx`)
- App flow → Call client: shows (evidence: `frontend/src/App.tsx`)
- Login → HTTP client: calls (evidence: `frontend/src/Login.tsx`)
- Signup → HTTP client: calls (evidence: `frontend/src/Signup.tsx`)
- App flow → HTTP client: calls (evidence: `frontend/src/App.tsx`)
- Room selection → App flow: invokes (evidence: `frontend/src/Home.tsx`)
- HTTP client → Auth routes: HTTP requests (evidence: `README.md`)
- HTTP client → Room routes: HTTP requests (evidence: `README.md`)
- Auth routes → Auth service: delegates (evidence: `backend/src/Auth/auth.controller.ts`)
- Auth service → User records: reads/writes (evidence: `backend/src/Auth/auth.service.ts`)
- Room routes → Room service: delegates (evidence: `backend/src/Rooms/room.controller.ts`)
- Room service → Room records: reads/writes (evidence: `backend/src/Rooms/room.service.ts`)
- Room service → Membership records: reads/writes (evidence: `backend/src/Rooms/room.service.ts`)
- Room service → User records: looks up (evidence: `backend/src/Rooms/room.service.ts`)
- Call client → Call gateway: Socket.IO signaling (evidence: `README.md`)
- Call gateway → Room service: checks membership (evidence: `backend/src/call/call.gateway.ts`)
- Call gateway → SFU service: dispatches media (evidence: `backend/src/call/call.gateway.ts`)
- SFU service → Call client: media signaling (evidence: `README.md`)
- Call client → Media player: renders (evidence: `frontend/src/Call.tsx`)
- Media health → SFU service: reads stats (evidence: `backend/src/mediasoup/mediasoup.controller.ts`)
- User records → Room records: associates (evidence: `database/src/models/user.model.ts`)
- Room records → Membership records: associates (evidence: `database/src/models/room.model.ts`)
- Membership records → User records: references (evidence: `database/src/models/participant.model.ts`)
- Membership records → Room records: references (evidence: `database/src/models/participant.model.ts`)
- User records → PostgreSQL: persists
- Room records → PostgreSQL: persists
- Membership records → PostgreSQL: persists
