What it is
CodeCollab is a web platform for running technical interviews. An interviewer schedules a session, adds coding problems with test cases, and joins a shared room with the candidate. The room has a live code editor, a video call, chat, and live subtitles. The app also flags tab switching, pasted code, and gaze direction, and it scores each problem by the share of test cases that pass. A team of three built it for the Need for Code 4.0 hackathon.
The problem
The hackathon problem statement was to build a collaborative coding interview platform with AI-powered features. A remote interview needs several tools at once: a scheduler, a shared editor, a way to run code against tests, a video channel, and some assurance that the candidate works unaided. CodeCollab combines these in one app so the interviewer stays in a single window.
How it works
CodeCollab is a single SvelteKit app (Svelte 5) with a PostgreSQL database accessed through Prisma. Better Auth handles sign-in with email and password or Google. Each user has a role, Interviewer or Interviewee.
The Prisma schema (prisma/schema.prisma) models the interview:
- An
Interviewlinks one interviewer and one interviewee. It has a start and end time, a status ofPENDINGorCOMPLETED, aroomId, and an overall score. - An interview has many
Problems. Each problem has a score and manyTestCases, each with an input and an expected output. Messagesstore the chat between the two users, per interview.
Inside an interview room, each feature uses its own channel.
| Feature | How it is built |
|---|---|
| Shared editor | Tiptap with Yjs collaboration. A route (/api/tiptap-token) signs a JWT (JSON Web Token) for the room, and Tiptap's hosted provider syncs the document. |
| Code execution | /api/submit sends code and test input to Judge0 through RapidAPI, then polls for the result. |
| Chat and live updates | Server-sent events (SSE) per room, handled by src/lib/sse-manager.ts. New problems and test cases also arrive this way. |
| Video | Agora RTC. /api/agora-token issues the access token. |
| Subtitles and transcript | The browser streams audio from the call to a Whisper speech-to-text server over a WebSocket. |
| Gaze monitoring | MediaPipe Face Landmarker runs in the browser (video-call.svelte). |
| AI assistant | /api/chat streams a model response that can call tools. |
The scoring flow works like this:
- The candidate runs a solution. The editor page sends the code to Judge0 once per test case.
- The page compares each program output with the expected output and counts passes.
- The page sends the counts to the problem's score endpoint, which stores
round(passed / total * 100). - The endpoint saves the new score only if it beats the stored one, so the best attempt counts.
What I built
I built the APIs for interviews, problems and test cases, the editor integration, transcript handling and the AI voice assistant. I also improved the code runner that scores submissions. Jay built the landing, auth, profile, dashboard and history pages, plus the editor and chat interface and the live updates. Sundaram built the Prisma and auth setup, the Judge0 integration, video calling, the gaze, tab and copy monitoring, and the test-case scores.
Design decisions
Hosted code execution. The app calls Judge0 instead of running candidate code on its own server. Running untrusted code is risky, and Judge0 provides sandboxing and many language runtimes. The trade-off is a dependency on an external service and a polling loop: /api/submit checks the result about once per second, for up to 30 attempts. The score endpoint also accepts pass counts from the browser, so the server does not recompute results.
Integrity alerts as chat messages. When a candidate switches tabs or pastes into the editor, the browser posts a SYSTEM ALERT message into the room channel. Paste alerts are debounced by two seconds. The interviewer's page watches for those messages. This reuses the existing chat and SSE path, so no new transport is needed. As an inference from the design, the alerts are ordinary messages, so they signal likely cheating but are not tamper-proof.
Gaze tracking in the browser. Face Landmarker runs on the candidate's machine. The code smooths a gaze vector, compares it with thresholds for sideways, upward, and downward looks, and starts a timer (3 seconds) when the candidate looks away. Because inference runs in the browser, video frames are not sent to the app server for this check. The model file loads from Google storage.
An AI assistant that acts through tools. The assistant uses the AI SDK with a 10-step limit. Its tools read and write interview data: list interviews, create or update an interview, list users, read the transcript, generate follow-up questions, and analyze code complexity. The complexity tool matches text patterns in the code, such as loops, so it gives a rough estimate and not a static analysis. The model is google/gemma-3-12b, served by LM Studio through an OpenAI-compatible URL set in LMSTUDIO_API_URL. A local model avoids API cost, but it needs a reachable host. The hackathon write-up records the team's later lesson to avoid local tunnels for AI models and to use a free hosted service instead.
Run it locally
You need Node.js 18 or later and a PostgreSQL database. The app also needs accounts or servers for the external services in the next list.
-
Clone the repository and install dependencies. The
postinstallscript runsprisma generate:git clone https://github.com/Crew-object-Object/CodeCollab.git cd NFC4_-object-Object- npm install -
Create a
.envfile with these variables, which the source code reads:DATABASE_URLGOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETTIPTAP_SECRETLMSTUDIO_API_URLRAPID_API_KEY,RAPID_API_HOST, andJUDGE0_API_URLPUBLIC_AGORA_APP_IDandPUBLIC_AGORA_APP_CERTIFICATEPUBLIC_WHISPER_API_URL
-
Create the database tables:
npx prisma migrate dev npx prisma generate -
Start the development server:
npm run dev
Reference
| Layer | Choice | Use |
|---|---|---|
| App | SvelteKit, Svelte 5, TypeScript | UI and API routes |
| UI | Tailwind CSS 4, shadcn-svelte | Styling and components |
| Data | PostgreSQL, Prisma | Users, interviews, problems, test cases, messages |
| Auth | Better Auth | Email and Google sign-in, roles |
| Editor | Tiptap, Yjs | Collaborative editing with syntax highlighting |
| Execution | Judge0 (RapidAPI) | Running code against test cases |
| Video | Agora RTC | Interview video call |
| Vision | MediaPipe Tasks Vision | Gaze monitoring |
| AI | AI SDK, LM Studio | Assistant with tool calls |
Outcome
CodeCollab was built at Need for Code 4.0, held on 5 August 2025 at Thadomal Shahani Engineering College in Bandra. The hackathon entry lists no placement. The repository was created on 5 August 2025 and has 109 commits through 6 August 2025. The repository homepage links to a Vercel deployment, which responded when last checked.