# akshay4754/talent-iq architecture

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

- Interactive diagram: https://gitdiagram.com/akshay4754/talent-iq
- Repository: https://github.com/akshay4754/talent-iq

## Overview

Talent-IQ is a coding-interview platform combining interview rooms, solo practice, code evaluation, and real-time collaboration. The main workflow is to browse or select a problem, create or join a session, collaborate by video/chat and shared editing, then run code and review results. The map also preserves authentication, session management, AI review, and background-job capabilities documented by the README. Some frontend and backend modules were not sampled; their connections are shown only where the index or README supports them.

Main entry points: [`frontend/src/pages/SessionPage.jsx`](https://github.com/akshay4754/talent-iq/blob/main/frontend/src/pages/SessionPage.jsx) (Session workspace), [`backend/src/server.js`](https://github.com/akshay4754/talent-iq/blob/main/backend/src/server.js) (REST API server), [`backend/src/controllers/sessionController.js`](https://github.com/akshay4754/talent-iq/blob/main/backend/src/controllers/sessionController.js) (Session lifecycle), [`frontend/src/App.jsx`](https://github.com/akshay4754/talent-iq/blob/main/frontend/src/App.jsx) (App routing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client experience"]
  node_app["App routing<br/>[App.jsx]"]
  node_dashboard["Dashboard<br/>[DashboardPage.jsx]"]
end

subgraph group_sessions["Interview sessions"]
  node_session_page["Session workspace<br/>[SessionPage.jsx]"]
  node_session_hooks["Session queries<br/>[useSessions.js]"]
  node_session_api["Session API client<br/>[sessions.js]"]
  node_collaboration["Shared editing"]
  node_stream_hook["Stream client hook<br/>[useStreamClient.js]"]
  node_video_chat["Video and chat UI<br/>[VideoCallUI.jsx]"]
end

subgraph group_coding["Coding and practice"]
  node_problems["Problem catalog<br/>[ProblemsPage.jsx]"]
  node_problem_data["Problem data<br/>[problems.js]"]
  node_practice["Practice page<br/>[ProblemPage.jsx]"]
  node_editor["Code editor"]
  node_execution["Code execution<br/>[piston.js]"]
  node_output["Evaluation output<br/>[OutputPanel.jsx]"]
end

subgraph group_services["Backend services"]
  node_api_server["REST API server<br/>[server.js]"]
  node_session_routes["Session routes<br/>[sessionRoutes.js]"]
  node_session_logic["Session lifecycle"]
  node_session_store[("Session records<br/>[Session.js]")]
  node_user_store[("User records<br/>[User.js]")]
  node_auth["Route protection<br/>[protectRoute.js]"]
  node_ai_review["AI review<br/>[aiController.js]"]
  node_code_api["Code API<br/>[codeController.js]"]
  node_leetcode_proxy["Problem proxy<br/>[leetcodeProxy.js]"]
  node_jobs["Background jobs<br/>[inngest.js]"]
  node_email["Email notifications<br/>[email.js]"]
end

subgraph group_integrations["External platforms"]
  node_stream_service["Stream integration<br/>[stream.js]"]
  node_clerk["Clerk identity"]
  node_stream_platform["Stream platform"]
  node_mongodb[("MongoDB")]
  node_piston_service["Piston execution service"]
  node_inngest_service["Inngest"]
end

node_candidate(("Candidate"))

node_candidate -->|"uses"| node_app
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_problems
node_app -->|"routes to"| node_practice
node_app -->|"routes to"| node_session_page
node_problems -->|"uses"| node_problem_data
node_practice -->|"loads"| node_problem_data
node_practice -->|"runs code"| node_execution
node_practice -->|"renders"| node_editor
node_practice -->|"renders"| node_output
node_session_page -->|"uses"| node_session_hooks
node_session_hooks -->|"calls"| node_session_api
node_session_page -->|"runs code"| node_execution
node_session_page -->|"renders"| node_editor
node_session_page -->|"renders"| node_output
node_session_page -->|"initializes"| node_stream_hook
node_session_page -->|"uses"| node_collaboration
node_stream_hook -->|"requests token"| node_session_api
node_stream_hook -->|"joins call and chat"| node_stream_platform
node_session_page -->|"renders"| node_video_chat
node_execution -.->|"executes remotely"| node_piston_service
node_session_api -->|"calls REST API"| node_api_server
node_api_server -->|"mounts"| node_session_routes
node_session_routes -->|"protects routes"| node_auth
node_session_routes -->|"dispatches"| node_session_logic
node_session_logic -->|"reads and writes"| node_session_store
node_session_logic -->|"reads"| node_user_store
node_session_logic -->|"manages call and channel"| node_stream_service
node_auth -->|"authenticates"| node_clerk
node_auth -->|"looks up user"| node_user_store
node_auth -->|"syncs user"| node_stream_service
node_session_store -.->|"persists"| node_mongodb
node_api_server -->|"mounts AI routes"| node_ai_review
node_api_server -->|"mounts code routes"| node_code_api
node_api_server -->|"mounts proxy"| node_leetcode_proxy
node_api_server -->|"serves jobs"| node_jobs
node_jobs -->|"registers functions"| node_inngest_service
node_jobs -->|"uses"| node_email
node_session_logic -->|"sends invitations"| node_email
node_session_logic -->|"provisions session"| node_stream_platform

click node_app "https://github.com/akshay4754/talent-iq/blob/main/frontend/src/App.jsx"
click node_dashboard "https://github.com/akshay4754/talent-iq/blob/main/frontend/src/pages/DashboardPage.jsx"
click node_problems "https://github.com/akshay4754/talent-iq/blob/main/frontend/src/pages/ProblemsPage.jsx"
click node_problem_data "https://github.com/akshay4754/talent-iq/blob/main/frontend/src/data/problems.js"
click node_practice "https://github.com/akshay4754/talent-iq/blob/main/frontend/src/pages/ProblemPage.jsx"
click node_session_page "https://github.com/akshay4754/talent-iq/blob/main/frontend/src/pages/SessionPage.jsx"
click node_session_hooks "https://github.com/akshay4754/talent-iq/blob/main/frontend/src/hooks/useSessions.js"
click node_session_api "https://github.com/akshay4754/talent-iq/blob/main/frontend/src/api/sessions.js"
click node_editor "https://github.com/akshay4754/talent-iq/blob/main/frontend/src/components/CodeEditorPanel.jsx"
click node_execution "https://github.com/akshay4754/talent-iq/blob/main/frontend/src/lib/piston.js"
click node_output "https://github.com/akshay4754/talent-iq/blob/main/frontend/src/components/OutputPanel.jsx"
click node_collaboration "https://github.com/akshay4754/talent-iq/blob/main/frontend/src/hooks/useYjsCollaboration.js"
click node_stream_hook "https://github.com/akshay4754/talent-iq/blob/main/frontend/src/hooks/useStreamClient.js"
click node_video_chat "https://github.com/akshay4754/talent-iq/blob/main/frontend/src/components/VideoCallUI.jsx"
click node_api_server "https://github.com/akshay4754/talent-iq/blob/main/backend/src/server.js"
click node_session_routes "https://github.com/akshay4754/talent-iq/blob/main/backend/src/routes/sessionRoutes.js"
click node_session_logic "https://github.com/akshay4754/talent-iq/blob/main/backend/src/controllers/sessionController.js"
click node_session_store "https://github.com/akshay4754/talent-iq/blob/main/backend/src/models/Session.js"
click node_user_store "https://github.com/akshay4754/talent-iq/blob/main/backend/src/models/User.js"
click node_auth "https://github.com/akshay4754/talent-iq/blob/main/backend/src/middleware/protectRoute.js"
click node_stream_service "https://github.com/akshay4754/talent-iq/blob/main/backend/src/lib/stream.js"
click node_ai_review "https://github.com/akshay4754/talent-iq/blob/main/backend/src/controllers/aiController.js"
click node_code_api "https://github.com/akshay4754/talent-iq/blob/main/backend/src/controllers/codeController.js"
click node_leetcode_proxy "https://github.com/akshay4754/talent-iq/blob/main/backend/src/routes/leetcodeProxy.js"
click node_jobs "https://github.com/akshay4754/talent-iq/blob/main/backend/src/lib/inngest.js"
click node_email "https://github.com/akshay4754/talent-iq/blob/main/backend/src/lib/email.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_dashboard toneBlue
class node_session_page,node_session_hooks,node_session_api,node_collaboration,node_stream_hook,node_video_chat toneAmber
class node_problems,node_problem_data,node_practice,node_editor,node_execution,node_output toneMint
class node_api_server,node_session_routes,node_session_logic,node_session_store,node_user_store,node_auth,node_ai_review,node_code_api,node_leetcode_proxy,node_jobs,node_email toneRose
class node_stream_service,node_clerk,node_stream_platform,node_mongodb,node_piston_service,node_inngest_service,node_candidate toneIndigo
```

## Components

### Client experience

- [App routing](https://github.com/akshay4754/talent-iq/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Dashboard](https://github.com/akshay4754/talent-iq/blob/main/frontend/src/pages/DashboardPage.jsx): `frontend/src/pages/DashboardPage.jsx`

### Interview sessions

- [Session workspace](https://github.com/akshay4754/talent-iq/blob/main/frontend/src/pages/SessionPage.jsx): `frontend/src/pages/SessionPage.jsx`
- [Session queries](https://github.com/akshay4754/talent-iq/blob/main/frontend/src/hooks/useSessions.js): `frontend/src/hooks/useSessions.js`
- [Session API client](https://github.com/akshay4754/talent-iq/blob/main/frontend/src/api/sessions.js): `frontend/src/api/sessions.js`
- [Shared editing](https://github.com/akshay4754/talent-iq/blob/main/frontend/src/hooks/useYjsCollaboration.js): `frontend/src/hooks/useYjsCollaboration.js`
- [Stream client hook](https://github.com/akshay4754/talent-iq/blob/main/frontend/src/hooks/useStreamClient.js): `frontend/src/hooks/useStreamClient.js`
- [Video and chat UI](https://github.com/akshay4754/talent-iq/blob/main/frontend/src/components/VideoCallUI.jsx): `frontend/src/components/VideoCallUI.jsx`

### Coding and practice

- [Problem catalog](https://github.com/akshay4754/talent-iq/blob/main/frontend/src/pages/ProblemsPage.jsx): `frontend/src/pages/ProblemsPage.jsx`
- [Problem data](https://github.com/akshay4754/talent-iq/blob/main/frontend/src/data/problems.js): `frontend/src/data/problems.js`
- [Practice page](https://github.com/akshay4754/talent-iq/blob/main/frontend/src/pages/ProblemPage.jsx): `frontend/src/pages/ProblemPage.jsx`
- [Code editor](https://github.com/akshay4754/talent-iq/blob/main/frontend/src/components/CodeEditorPanel.jsx): `frontend/src/components/CodeEditorPanel.jsx`
- [Code execution](https://github.com/akshay4754/talent-iq/blob/main/frontend/src/lib/piston.js): `frontend/src/lib/piston.js`
- [Evaluation output](https://github.com/akshay4754/talent-iq/blob/main/frontend/src/components/OutputPanel.jsx): `frontend/src/components/OutputPanel.jsx`

### Backend services

- [REST API server](https://github.com/akshay4754/talent-iq/blob/main/backend/src/server.js): `backend/src/server.js`
- [Session routes](https://github.com/akshay4754/talent-iq/blob/main/backend/src/routes/sessionRoutes.js): `backend/src/routes/sessionRoutes.js`
- [Session lifecycle](https://github.com/akshay4754/talent-iq/blob/main/backend/src/controllers/sessionController.js): `backend/src/controllers/sessionController.js`
- [Session records](https://github.com/akshay4754/talent-iq/blob/main/backend/src/models/Session.js): `backend/src/models/Session.js`
- [User records](https://github.com/akshay4754/talent-iq/blob/main/backend/src/models/User.js): `backend/src/models/User.js`
- [Route protection](https://github.com/akshay4754/talent-iq/blob/main/backend/src/middleware/protectRoute.js): `backend/src/middleware/protectRoute.js`
- [AI review](https://github.com/akshay4754/talent-iq/blob/main/backend/src/controllers/aiController.js): `backend/src/controllers/aiController.js`
- [Code API](https://github.com/akshay4754/talent-iq/blob/main/backend/src/controllers/codeController.js): `backend/src/controllers/codeController.js`
- [Problem proxy](https://github.com/akshay4754/talent-iq/blob/main/backend/src/routes/leetcodeProxy.js): `backend/src/routes/leetcodeProxy.js`
- [Background jobs](https://github.com/akshay4754/talent-iq/blob/main/backend/src/lib/inngest.js): `backend/src/lib/inngest.js`
- [Email notifications](https://github.com/akshay4754/talent-iq/blob/main/backend/src/lib/email.js): `backend/src/lib/email.js`

### External platforms

- [Stream integration](https://github.com/akshay4754/talent-iq/blob/main/backend/src/lib/stream.js): `backend/src/lib/stream.js`
- **Clerk identity**
- **Stream platform**
- **MongoDB**
- **Piston execution service**
- **Inngest**

### Other components

- **Candidate**

## Connections

- Candidate → App routing: uses
- App routing → Dashboard: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Problem catalog: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Practice page: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Session workspace: routes to (evidence: `frontend/src/App.jsx`)
- Problem catalog → Problem data: uses
- Practice page → Problem data: loads (evidence: `frontend/src/pages/ProblemPage.jsx`)
- Practice page → Code execution: runs code (evidence: `frontend/src/pages/ProblemPage.jsx`)
- Practice page → Code editor: renders (evidence: `frontend/src/pages/ProblemPage.jsx`)
- Practice page → Evaluation output: renders (evidence: `frontend/src/pages/ProblemPage.jsx`)
- Session workspace → Session queries: uses (evidence: `frontend/src/pages/SessionPage.jsx`)
- Session queries → Session API client: calls (evidence: `frontend/src/hooks/useSessions.js`)
- Session workspace → Code execution: runs code (evidence: `frontend/src/pages/SessionPage.jsx`)
- Session workspace → Code editor: renders (evidence: `frontend/src/pages/SessionPage.jsx`)
- Session workspace → Evaluation output: renders (evidence: `frontend/src/pages/SessionPage.jsx`)
- Session workspace → Stream client hook: initializes (evidence: `frontend/src/pages/SessionPage.jsx`)
- Session workspace → Shared editing: uses (evidence: `frontend/src/pages/SessionPage.jsx`)
- Stream client hook → Session API client: requests token (evidence: `frontend/src/hooks/useStreamClient.js`)
- Stream client hook → Stream platform: joins call and chat (evidence: `frontend/src/hooks/useStreamClient.js`)
- Session workspace → Video and chat UI: renders (evidence: `frontend/src/pages/SessionPage.jsx`)
- Code execution → Piston execution service: executes remotely
- Session API client → REST API server: calls REST API
- REST API server → Session routes: mounts (evidence: `backend/src/server.js`)
- Session routes → Route protection: protects routes (evidence: `backend/src/routes/sessionRoutes.js`)
- Session routes → Session lifecycle: dispatches (evidence: `backend/src/routes/sessionRoutes.js`)
- Session lifecycle → Session records: reads and writes (evidence: `backend/src/controllers/sessionController.js`)
- Session lifecycle → User records: reads (evidence: `backend/src/controllers/sessionController.js`)
- Session lifecycle → Stream integration: manages call and channel (evidence: `backend/src/controllers/sessionController.js`)
- Route protection → Clerk identity: authenticates (evidence: `backend/src/middleware/protectRoute.js`)
- Route protection → User records: looks up user (evidence: `backend/src/middleware/protectRoute.js`)
- Route protection → Stream integration: syncs user (evidence: `backend/src/middleware/protectRoute.js`)
- Session records → MongoDB: persists
- REST API server → AI review: mounts AI routes (evidence: `backend/src/server.js`)
- REST API server → Code API: mounts code routes (evidence: `backend/src/server.js`)
- REST API server → Problem proxy: mounts proxy (evidence: `backend/src/server.js`)
- REST API server → Background jobs: serves jobs (evidence: `backend/src/server.js`)
- Background jobs → Inngest: registers functions
- Background jobs → Email notifications: uses (evidence: `backend/src/lib/inngest.js`)
- Session lifecycle → Email notifications: sends invitations (evidence: `backend/src/controllers/sessionController.js`)
- Session lifecycle → Stream platform: provisions session (evidence: `backend/src/controllers/sessionController.js`)
