# sunnybhagure/codecall architecture

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

- Interactive diagram: https://gitdiagram.com/sunnybhagure/codecall
- Repository: https://github.com/sunnybhagure/codecall

## Overview

CodeCall is a web application for account-based technical interviews and video meetings. Users register or sign in, reach a dashboard and meeting history, then enter an interview or a video room. The backend provides user, interview, and question APIs backed by MongoDB; its Socket.IO service relays room membership, chat, and WebRTC signaling. The sampled frontend shows the authentication and meeting flows, while interview-question UI/API details are only partly evidenced, so those connections are left unverified rather than inferred.

Main entry points: [`Frontend/src/App.jsx`](https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/App.jsx) (App routing), [`Backend/server.js`](https://github.com/sunnybhagure/codecall/blob/main/Backend/server.js) (HTTP server), [`Frontend/src/pages/videoMeet.jsx`](https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/pages/videoMeet.jsx) (Meeting entry), [`Backend/controller/userController.js`](https://github.com/sunnybhagure/codecall/blob/main/Backend/controller/userController.js) (Account and history)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Frontend experience"]
  node_app["App routing<br/>[App.jsx]"]
  node_authpage["Sign-in form<br/>[authentication.jsx]"]
  node_dashboard["Dashboard<br/>[home.jsx]"]
  node_historypage["Meeting history<br/>[history.jsx]"]
end

subgraph group_identity["Accounts and history"]
  node_authstate["Auth context<br/>[AuthContext.jsx]"]
  node_authguard["Auth guard<br/>[withAuth.jsx]"]
  node_backend["HTTP server<br/>[server.js]"]
  node_userapi["User routes<br/>[userRoutes.js]"]
  node_userlogic["Account and history<br/>[userController.js]"]
  node_users[("User records<br/>[user.js]")]
  node_meetings[("Meeting history records<br/>[meeting.js]")]
end

subgraph group_interviews["Interview domain"]
  node_interviewui["Interview room UI<br/>[interviewRoom.jsx]"]
  node_interviewapi["Interview routes<br/>[interview.js]"]
  node_interviewlogic["Interview services<br/>[interview.js]"]
  node_questionapi["Question routes<br/>[question.js]"]
  node_questionlogic["Question services<br/>[question.js]"]
  node_questions[("Question bank<br/>[questions.js]")]
end

subgraph group_realtime["Live meetings"]
  node_meetingui["Meeting entry<br/>[videoMeet.jsx]"]
  node_lobby["Media lobby<br/>[LobbyPage.jsx]"]
  node_room["Meeting room"]
  node_media["Meeting controls<br/>[ControlsBar.jsx]"]
  node_chat["Chat drawer<br/>[ChatDrawer.jsx]"]
  node_webrtc["WebRTC session<br/>[useWebRTC.js]"]
  node_socket["Room signaling<br/>[socketManager.js]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_app
node_app -->|"routes to"| node_authpage
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_historypage
node_app -->|"routes to"| node_interviewui
node_app -->|"routes to"| node_meetingui
node_app -->|"provides"| node_authstate
node_authpage -->|"calls"| node_authstate
node_authstate -->|"requests"| node_userapi
node_dashboard -->|"guards"| node_authguard
node_historypage -->|"guards"| node_authguard
node_backend -->|"mounts"| node_userapi
node_backend -->|"mounts"| node_interviewapi
node_backend -->|"mounts"| node_questionapi
node_userapi -->|"dispatches"| node_userlogic
node_userlogic -->|"reads and writes"| node_users
node_userlogic -->|"reads and writes"| node_meetings
node_interviewapi -->|"dispatches"| node_interviewlogic
node_interviewlogic -->|"uses"| node_users
node_interviewlogic -->|"uses"| node_questions
node_questionapi -->|"dispatches"| node_questionlogic
node_questionlogic -->|"uses"| node_questions
node_meetingui -->|"renders"| node_lobby
node_meetingui -->|"renders"| node_room
node_meetingui -->|"uses"| node_webrtc
node_room -->|"renders"| node_media
node_room -->|"renders"| node_chat
node_backend -->|"starts"| node_socket
node_webrtc -->|"signals and chats"| node_socket
node_interviewui -.->|"may request"| node_interviewapi

click node_app "https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/App.jsx"
click node_authpage "https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/pages/authentication.jsx"
click node_dashboard "https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/pages/home.jsx"
click node_historypage "https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/pages/history.jsx"
click node_interviewui "https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/pages/interviewRoom.jsx"
click node_meetingui "https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/pages/videoMeet.jsx"
click node_lobby "https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/pages/LobbyPage.jsx"
click node_room "https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/pages/MeetingRoomPage.jsx"
click node_media "https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/Components/ControlsBar.jsx"
click node_chat "https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/Components/ChatDrawer.jsx"
click node_webrtc "https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/hooks/useWebRTC.js"
click node_authstate "https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/contexts/AuthContext.jsx"
click node_authguard "https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/utils/withAuth.jsx"
click node_backend "https://github.com/sunnybhagure/codecall/blob/main/Backend/server.js"
click node_userapi "https://github.com/sunnybhagure/codecall/blob/main/Backend/routes/userRoutes.js"
click node_userlogic "https://github.com/sunnybhagure/codecall/blob/main/Backend/controller/userController.js"
click node_users "https://github.com/sunnybhagure/codecall/blob/main/Backend/models/user.js"
click node_meetings "https://github.com/sunnybhagure/codecall/blob/main/Backend/models/meeting.js"
click node_interviewapi "https://github.com/sunnybhagure/codecall/blob/main/Backend/routes/interview.js"
click node_interviewlogic "https://github.com/sunnybhagure/codecall/blob/main/Backend/controller/interview.js"
click node_questionapi "https://github.com/sunnybhagure/codecall/blob/main/Backend/routes/question.js"
click node_questionlogic "https://github.com/sunnybhagure/codecall/blob/main/Backend/controller/question.js"
click node_questions "https://github.com/sunnybhagure/codecall/blob/main/Backend/models/questions.js"
click node_socket "https://github.com/sunnybhagure/codecall/blob/main/Backend/controller/socketManager.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_app,node_authpage,node_dashboard,node_historypage toneBlue
class node_authstate,node_authguard,node_backend,node_userapi,node_userlogic,node_users,node_meetings toneAmber
class node_interviewui,node_interviewapi,node_interviewlogic,node_questionapi,node_questionlogic,node_questions toneMint
class node_meetingui,node_lobby,node_room,node_media,node_chat,node_webrtc,node_socket toneRose
class node_visitor toneIndigo
```

## Components

### Frontend experience

- [App routing](https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/App.jsx): `Frontend/src/App.jsx`
- [Sign-in form](https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/pages/authentication.jsx): `Frontend/src/pages/authentication.jsx`
- [Dashboard](https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/pages/home.jsx): `Frontend/src/pages/home.jsx`
- [Meeting history](https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/pages/history.jsx): `Frontend/src/pages/history.jsx`

### Accounts and history

- [Auth context](https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/contexts/AuthContext.jsx): `Frontend/src/contexts/AuthContext.jsx`
- [Auth guard](https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/utils/withAuth.jsx): `Frontend/src/utils/withAuth.jsx`
- [HTTP server](https://github.com/sunnybhagure/codecall/blob/main/Backend/server.js): `Backend/server.js`
- [User routes](https://github.com/sunnybhagure/codecall/blob/main/Backend/routes/userRoutes.js): `Backend/routes/userRoutes.js`
- [Account and history](https://github.com/sunnybhagure/codecall/blob/main/Backend/controller/userController.js): `Backend/controller/userController.js`
- [User records](https://github.com/sunnybhagure/codecall/blob/main/Backend/models/user.js): `Backend/models/user.js`
- [Meeting history records](https://github.com/sunnybhagure/codecall/blob/main/Backend/models/meeting.js): `Backend/models/meeting.js`

### Interview domain

- [Interview room UI](https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/pages/interviewRoom.jsx): `Frontend/src/pages/interviewRoom.jsx`
- [Interview routes](https://github.com/sunnybhagure/codecall/blob/main/Backend/routes/interview.js): `Backend/routes/interview.js`
- [Interview services](https://github.com/sunnybhagure/codecall/blob/main/Backend/controller/interview.js): `Backend/controller/interview.js`
- [Question routes](https://github.com/sunnybhagure/codecall/blob/main/Backend/routes/question.js): `Backend/routes/question.js`
- [Question services](https://github.com/sunnybhagure/codecall/blob/main/Backend/controller/question.js): `Backend/controller/question.js`
- [Question bank](https://github.com/sunnybhagure/codecall/blob/main/Backend/models/questions.js): `Backend/models/questions.js`

### Live meetings

- [Meeting entry](https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/pages/videoMeet.jsx): `Frontend/src/pages/videoMeet.jsx`
- [Media lobby](https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/pages/LobbyPage.jsx): `Frontend/src/pages/LobbyPage.jsx`
- [Meeting room](https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/pages/MeetingRoomPage.jsx): `Frontend/src/pages/MeetingRoomPage.jsx`
- [Meeting controls](https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/Components/ControlsBar.jsx): `Frontend/src/Components/ControlsBar.jsx`
- [Chat drawer](https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/Components/ChatDrawer.jsx): `Frontend/src/Components/ChatDrawer.jsx`
- [WebRTC session](https://github.com/sunnybhagure/codecall/blob/main/Frontend/src/hooks/useWebRTC.js): `Frontend/src/hooks/useWebRTC.js`
- [Room signaling](https://github.com/sunnybhagure/codecall/blob/main/Backend/controller/socketManager.js): `Backend/controller/socketManager.js`

### Other components

- **Visitor**

## Connections

- Visitor → App routing: opens (evidence: `Frontend/src/App.jsx`)
- App routing → Sign-in form: routes to (evidence: `Frontend/src/App.jsx`)
- App routing → Dashboard: routes to (evidence: `Frontend/src/App.jsx`)
- App routing → Meeting history: routes to (evidence: `Frontend/src/App.jsx`)
- App routing → Interview room UI: routes to (evidence: `Frontend/src/App.jsx`)
- App routing → Meeting entry: routes to (evidence: `Frontend/src/App.jsx`)
- App routing → Auth context: provides (evidence: `Frontend/src/App.jsx`)
- Sign-in form → Auth context: calls (evidence: `Frontend/src/pages/authentication.jsx`)
- Auth context → User routes: requests (evidence: `Frontend/src/contexts/AuthContext.jsx`)
- Dashboard → Auth guard: guards (evidence: `Frontend/src/pages/home.jsx`)
- Meeting history → Auth guard: guards (evidence: `Frontend/src/pages/history.jsx`)
- HTTP server → User routes: mounts (evidence: `Backend/server.js`)
- HTTP server → Interview routes: mounts (evidence: `Backend/server.js`)
- HTTP server → Question routes: mounts (evidence: `Backend/server.js`)
- User routes → Account and history: dispatches (evidence: `Backend/routes/userRoutes.js`)
- Account and history → User records: reads and writes (evidence: `Backend/controller/userController.js`)
- Account and history → Meeting history records: reads and writes (evidence: `Backend/controller/userController.js`)
- Interview routes → Interview services: dispatches (evidence: `Backend/routes/interview.js`)
- Interview services → User records: uses (evidence: `Backend/controller/interview.js`)
- Interview services → Question bank: uses (evidence: `Backend/controller/interview.js`)
- Question routes → Question services: dispatches (evidence: `Backend/routes/question.js`)
- Question services → Question bank: uses (evidence: `Backend/controller/question.js`)
- Meeting entry → Media lobby: renders (evidence: `Frontend/src/pages/videoMeet.jsx`)
- Meeting entry → Meeting room: renders (evidence: `Frontend/src/pages/videoMeet.jsx`)
- Meeting entry → WebRTC session: uses (evidence: `Frontend/src/pages/videoMeet.jsx`)
- Meeting room → Meeting controls: renders (evidence: `Frontend/src/pages/MeetingRoomPage.jsx`)
- Meeting room → Chat drawer: renders (evidence: `Frontend/src/pages/MeetingRoomPage.jsx`)
- HTTP server → Room signaling: starts (evidence: `Backend/server.js`)
- WebRTC session → Room signaling: signals and chats (evidence: `Frontend/src/hooks/useWebRTC.js`)
- Interview room UI → Interview routes: may request
