InterviewX is a technical interview platform designed for real-time 1-on-1 coding assessments. It combines a synchronized IDE, video conferencing, and an automated code judging engine to simulate a professional interview environment.
- Frontend: React.js (v18.3.1) for UI components and state management.
- Styling: Tailwind CSS (v4.0) with DaisyUI for a high-performance, utility-first design system.
- Backend: Node.js and Express.js for RESTful API architecture.
- Real-time Video: Stream Video SDK (v1.24.0) for low-latency communication.
- Real-time Chat: Stream Chat SDK (v9.23.0) and React components (v13.9.0) for synchronized messaging.
- Database: MongoDB for flexible session and user data storage.
- Authentication: Clerk for secure user management.
- Code Execution: Piston API for isolated, multi-language execution.
- State Management: TanStack Query (v5.0) for efficient data fetching and caching.
- Code Editor: Monaco Editor for a VSCode-like development experience in the browser.
- VSCode-Integrated Editor: Uses the Monaco Editor API to provide syntax highlighting and a professional coding experience.
- Multi-Language Code Execution: Connects to a stateless execution engine (Piston API) to compile and run code in C++, JavaScript, Python, and Java.
- Real-time Video & Chat: Integrated Stream Video SDK with support for screen sharing, camera/mic toggling, and instant messaging.
- Automated Test Runner: A custom logic layer that injects test cases into user code and validates results using string normalization.
- Strict Session Guard: Backend logic that limits room capacity to exactly 2 participants (Host + 1 Candidate) to ensure interview integrity.
- Live Dashboard: Progress tracking with success rates and detailed history of previous coding sessions.
The core of the platform is the "Judge" logic. Instead of just displaying output, the system:
- Wraps user-submitted code with a test-case driver.
- Sends the payload to an isolated execution environment via the Piston API.
- Sanitizes the raw
stdoutusing Regular Expressions to remove formatting noise and trailing whitespaces. - Returns a "Success" or "Fail" verdict based on a comparison with hidden expected outputs.
To ensure session security, I implemented a locking mechanism in the Node.js/Express backend. When a user attempts to join a session, the server validates the current participant count. If the count is
To solve the issue of "ghost" participants (where a user leaves but the count remains high), I utilized Stream webhooks to listen for call.session_participant_left events, triggering an automatic decrement of the participant count in the MongoDB database.
- Clone the repository:
git clone https://github.com/vikassalgude/InterviewX.git - Install dependencies:
npm run build(This installs both frontend and backend dependencies). - Set up environment variables for Clerk, Stream, and MongoDB.
- Start the production server:
npm start.