Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

33 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TALENT-IQ 🧠

TALENT-IQ Preview

A modern, real-time interview collaboration platform built with React and Node.js. Practice coding problems, run code instantly, and conduct live interview sessions with video + chat in one place.

πŸ“‹ Table of Contents

✨ Features

  • πŸ” Authentication with Clerk
  • πŸ“Ή Real-time video sessions powered by Stream Video
  • πŸ’¬ Live in-session chat via Stream Chat
  • πŸ‘₯ Session lifecycle: create, join, track, and end interview rooms
  • πŸ’» Multi-language code execution through JDoodle (JavaScript, Python, Java, C++)
  • 🧩 Problem practice pages with starter code and output validation
  • πŸ“Š Dashboard with active sessions and recent completed sessions
  • ⚑ Fast and responsive UI built with React, TailwindCSS, and DaisyUI

πŸ›  Tech Stack

Frontend

  • βš›οΈ Framework: React 19 + Vite
  • 🎨 Styling: TailwindCSS + DaisyUI
  • 🧭 Routing: React Router
  • πŸ”„ Data Fetching: TanStack React Query
  • πŸ“ Code Editor: Monaco Editor
  • πŸ“‘ API Client: Axios
  • πŸŽ₯ Video SDK: Stream Video React SDK
  • πŸ’¬ Chat SDK: Stream Chat React
  • πŸ”” Notifications: React Hot Toast

Backend

  • πŸ–₯ Runtime: Node.js
  • πŸš€ Framework: Express 5
  • πŸ—„ Database: MongoDB + Mongoose
  • πŸ” Auth Integration: Clerk Express middleware
  • πŸŽ₯ Chat/Video Infra: Stream Chat + Stream Node SDK
  • βš™οΈ Event Processing: Inngest
  • 🌐 CORS + JSON APIs: Express middlewares
  • πŸ”§ Dev Tooling: Nodemon + dotenv

πŸ“ Project Structure

REMOTE INTERVIEW PLATFORM/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ server.js
β”‚   β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   β”‚   β”œβ”€β”€ chatController.js
β”‚   β”‚   β”‚   └── sessionController.js
β”‚   β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”‚   β”œβ”€β”€ chatRoutes.js
β”‚   β”‚   β”‚   β”œβ”€β”€ executeRoutes.js
β”‚   β”‚   β”‚   └── sessionRoutes.js
β”‚   β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   β”‚   └── protectRoute.js
β”‚   β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”‚   β”œβ”€β”€ db.js
β”‚   β”‚   β”‚   β”œβ”€β”€ env.js
β”‚   β”‚   β”‚   β”œβ”€β”€ inngest.js
β”‚   β”‚   β”‚   └── stream.js
β”‚   β”‚   └── models/
β”‚   β”‚       β”œβ”€β”€ Session.js
β”‚   β”‚       └── User.js
β”‚   └── package.json
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ App.jsx
β”‚   β”‚   β”œβ”€β”€ main.jsx
β”‚   β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”‚   └── sessions.js
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   β”‚   β”œβ”€β”€ useSessions.js
β”‚   β”‚   β”‚   └── useStreamClient.js
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”‚   β”œβ”€β”€ HomePage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ DashboardPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ProblemsPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ProblemPage.jsx
β”‚   β”‚   β”‚   └── SessionPage.jsx
β”‚   β”‚   └── lib/
β”‚   β”‚       β”œβ”€β”€ axios.js
β”‚   β”‚       β”œβ”€β”€ stream.js
β”‚   β”‚       └── piston.js
β”‚   └── package.json
β”‚
└── package.json

πŸ“¦ Prerequisites

  • Node.js 18+
  • npm 9+
  • MongoDB Atlas (or local MongoDB)
  • Clerk project (publishable + secret keys)
  • Stream project (API key + secret)
  • JDoodle API credentials
  • Inngest keys

πŸš€ Installation and Setup

1) Install Dependencies

From project root:

npm run build

This command:

  • Installs backend dependencies
  • Installs frontend dependencies
  • Builds frontend for production

2) Optional Manual Install

npm install --prefix backend
npm install --prefix frontend

πŸ”‘ Environment Variables

Backend (backend/.env)

PORT=5001
NODE_ENV=development
DB_URI=mongodb+srv://<username>:<password>@<cluster>/<dbName>

INNGEST_EVENT_KEY=<inngest_event_key>
INNGEST_SIGNING_KEY=<inngest_signing_key>

STREAM_API_KEY=<stream_api_key>
STREAM_API_SECRET=<stream_api_secret>

CLERK_PUBLISHABLE_KEY=<clerk_publishable_key>
CLERK_SECRET_KEY=<clerk_secret_key>

CLIENT_URL=http://localhost:5173

JOODLE_CLIENT_ID=<jdoodle_client_id>
JOODLE_CLIENT_SECRET=<jdoodle_client_secret>

Frontend (frontend/.env)

VITE_CLERK_PUBLISHABLE_KEY=<clerk_publishable_key>
VITE_STREAM_API_KEY=<stream_api_key>
VITE_API_UPL=http://localhost:5001/api

Important: The frontend uses VITE_API_UPL in code. Keep this exact name unless you also refactor the source.

▢️ Running the Application

Option 1: Development Mode (recommended)

Terminal 1 (backend):

npm run dev --prefix backend

Terminal 2 (frontend):

npm run dev --prefix frontend

URLs:

Option 2: Production Mode

npm run build
npm start

The backend serves static frontend assets when NODE_ENV=production.

πŸ— Project Architecture

Frontend Flow

  1. πŸ” Authentication
  • Clerk provider wraps the app and protects private routes.
  • Unauthenticated users stay on home/sign-in flow.
  1. πŸ“Š Dashboard and Sessions
  • Users create interview sessions with problem + difficulty.
  • Active and recent sessions are fetched with React Query.
  1. πŸŽ₯ Live Session Experience
  • Session page initializes Stream Video call + chat channel.
  • Host and participant collaborate in real time.
  1. πŸ’» Code Execution
  • Code editor sends language + script to backend execution API.
  • Output panel displays run results and errors.

Backend Flow

  1. πŸ” Request Protection
  • Protected routes use Clerk auth via middleware.
  • Middleware resolves Clerk user to MongoDB user document.
  1. πŸ‘₯ Session Lifecycle
  • Create session: persists to MongoDB + creates Stream call/channel.
  • Join session: validates capacity and adds participant + channel member.
  • End session: host-only action, tears down Stream resources and closes session.
  1. βš™οΈ User Sync
  • Inngest handles Clerk user create/delete events.
  • Stream user records are upserted/deleted accordingly.

πŸ“‘ API Endpoints

Health

Method Endpoint Description
GET /health Service health check

Sessions (/api/sessions)

Method Endpoint Description
POST / Create a new interview session
GET /active Get active sessions
GET /my-recent Get current user's recent completed sessions
GET /:id Get session by ID
POST /:id/join Join an active session
POST /:id/end End a session (host only)

Chat (/api/chat)

Method Endpoint Description
GET /token Generate Stream token for authenticated user

Code Execution (/api/code)

Method Endpoint Description
POST /execute Execute submitted code via JDoodle

Inngest

Method Endpoint Description
POST /api/inngest Inngest event handler endpoint

πŸ’¬ Usage Guide

1) Sign In

  • Open the app and authenticate through Clerk.

2) Create a Session

  • Navigate to Dashboard.
  • Choose a problem and difficulty.
  • Create room and enter session.

3) Join an Existing Session

  • Open a session link (/session/:id) from host.
  • If seat is available, you join as participant.

4) Collaborate Live

  • Discuss on video call.
  • Exchange messages in chat.
  • Solve in the code editor and run code instantly.

5) End Session

  • Host can end the interview room.
  • Session is marked completed and shown in recent history.

πŸ“ Development Notes

Root Scripts

  • npm run build -> install both apps + build frontend
  • npm start -> start backend app

Backend Scripts

  • npm run dev -> start backend with nodemon
  • npm start -> start backend with node

Frontend Scripts

  • npm run dev -> Vite dev server
  • npm run build -> production build
  • npm run preview -> preview built app
  • npm run lint -> run ESLint

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m "Add amazing feature")
  4. Push branch (git push origin feature/amazing-feature)
  5. Open a pull request

πŸ†˜ Troubleshooting

Backend does not start

  • Confirm backend/.env exists and required keys are present.
  • Verify MongoDB URI and credentials.
  • Check if port is already in use.

Frontend cannot reach backend

  • Confirm backend is running on configured port.
  • Verify VITE_API_UPL in frontend/.env.
  • Ensure CLIENT_URL in backend matches frontend origin.

Video/chat connection fails

  • Validate Stream API key/secret in backend.
  • Validate frontend VITE_STREAM_API_KEY.
  • Ensure users are authenticated before entering session.

Code execution errors

  • Verify JDoodle client ID/secret values.
  • Check submitted language is supported.

πŸ“„ License

ISC


Built with focus for technical interview collaboration. Happy coding! πŸš€

About

A Remote Interview Platform

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages