Inspiration

I study software engineering at IIT, University of Dhaka. Every project course ends with a viva. The examiner opens your code, points at one line and asks: "Why is this here?"

That is where a lot of my classmates freeze, and honestly so do I sometimes. More and more of our code is written with an AI assistant. The project works, but when someone asks about one specific line, the understanding isn't there. I wanted a way to find those weak spots before the examiner does, on my own code, at 2 a.m. the night before.

What it does

CodeViva is a mock viva on your own code.

  1. You load your project: paste a public GitHub link, drop in files, or paste code. For a GitHub link it lists the files and ticks the source code for you, leaving tests, config and dependencies unticked.
  2. The examiner asks questions about specific lines and highlights those lines next to the question. Every question is checked against the code, so it really is about the lines it points at.
  3. You answer by typing or speaking, in English, Bangla (or Banglish) or 8 other languages. Before reading your answer, the examiner writes an answer key. It then marks each point as covered, half or missed, and the server turns that into a score. If you don't know, you can press "I don't know, teach me" and it explains instead.
  4. The report gives you a score and a heatmap of your code: green for what you defended, red for what you couldn't. Click a gap and it jumps to those lines.
  5. "Re-test my gaps" asks new questions about only the lines you missed, then shows before → after.

If the page refreshes or the tab closes, the viva picks up where you left off.

Try it: https://codeviva-of2z.onrender.com. There's nothing to install and no key needed. It's on free hosting, so the first load after a quiet spell can take up to a minute.

A real session

Here is the run from the demo video, on the live site with real Gemini calls. I loaded the verification-chain package of my ReliefSync project (a Java desktop app) and picked the strict examiner with 3 questions.

  • Q1: why nextRequired (lines 28–32) is recursive. I gave a half answer and got 6/10. The answer key showed exactly what I missed: why recursion fits a linked chain, and how it stops. The follow-up asked about that part. I answered in Banglish and got 10/10.
  • Q2: why the code checks isBlank() and not only null. I didn't know, pressed "teach me", got 0 and an explanation.
  • Q3: why the chain is built differently for each tier. I gave a confidently wrong answer ("all four handlers are always linked"). It scored 0, and the two wrong claims were listed.
  • Report: 33/100, with two red regions.
  • Re-test: both gaps improved, and the score on those lines went from 0 to 85.

Gemini also timed out twice during this run. Both times CodeViva kept my answers and showed a Retry button, and Retry worked.

About the demo video: every question, answer, grade and score in it comes from this real run on the live site. To get sharp full-HD frames, I saved the session the app keeps in the browser and reopened it in a local copy of the same code, then took screenshots there. The file picker was filmed locally from a clone of the same repo, and the Retry banner shows the same message the live site showed. The narration is a synthetic text-to-speech voice reading my script.

Who it's for, and why now

It's for CS students who have to defend a project out loud: a viva, an oral exam, a demo or a code walkthrough. It's also for junior developers who will hear "walk me through your project" in an interview.

How people prepare today

What people do The problem when you're preparing
Re-read the code, or ask a friend to quiz you It doesn't show you what you can't explain, and your friend doesn't know your code
Ask a chatbot to "quiz me on this code" The questions aren't tied to lines you can see, there's no answer key, and the grade is whatever the model feels like that time
AI oral exams run by instructors: Classmoji at Dartmouth (https://sigcse2026.sigcse.org/details/sigcse-ts-2026-lightning-talks/17/AI-Driven-Oral-Examinations-for-Code-Assessment-Evaluating-Understanding-Beyond-the-), UNSW's prototype (https://www.unsw.edu.au/engineering/student-life/undergraduate-research-opportunities/advertised-taste-research-areas/automated-oral-assessments-at-scale-for-safeguarding-academic-integrity), NYU Stern (https://whyy.org/articles/pennsylvania-university-colleges-oral-exams-artificial-intelligence/) These are for grading students. A student can't use them to practise on their own code whenever they want

What's different about CodeViva is that the student is in charge. It works on your own code, any time, for free. Questions are tied to lines you can see. Wrong answers don't get credit. And it's a loop rather than a one-off quiz: you re-test the gaps and watch them close.

How I built it

It's Node.js and Express with plain JavaScript in the browser, no framework. It uses the Gemini API (Gemini 3.1 Flash-Lite), the GitHub REST API for loading repos, and the Web Speech API for voice answers. The server doesn't store anything; your viva lives in your browser.

CodeViva existed before this event, as my Build With AI: Basics project (tag basics-baseline). That version already asked line-anchored questions and showed a heatmap report, but the model simply picked a 0–10 grade. During the Global AI Builder's Challenge I added:

  1. The line checker. Every AI question is checked against the lines it highlights. If they don't match, the highlight is repaired, or the question is asked again once.
  2. Answer-key grading. Key points are written before the answer is read. The model only marks them, wrong claims cost 3 points, and the server does the arithmetic.
  3. An evaluation set and runner. It has 30 answers about real code in C, Python and Java, in English, Bangla and Banglish.
  4. Resume after refresh. The viva is saved in the browser, including a half-typed answer.
  5. Load a public GitHub repo by link. Files are filtered and preselected to fit the 60,000-character budget, and failures get clear messages.
  6. Re-test my gaps. New questions on only the missed lines, with before → after.
  7. A UI redesign. A shared design system, then each screen rebuilt so it works on phones, tablets and desktops, with keyboard access and checked colour contrast.

The tests went from 29 to 65. The full list with commits is in docs/HACKATHON-CHANGES.md.

Why Gemini Flash-Lite

Students can use it on the free tier. Its context window is far bigger than my 60,000-character limit, it has a JSON mode, it handles Bangla, and it's fast enough for a conversation. In the evaluation the median call took 1.9 seconds. I didn't compare it with a bigger model for this submission.

How well it works, and when not to trust it

I evaluated it on 5 viva questions about real code: the bundled C sample, my SMS Flask project and my ReliefSync Java project. Each question has 6 answers, from complete to confidently wrong, in English, Bangla and Banglish. Every answer was graded 3 times by CodeViva's answer-key grader and by the old "model picks a score" grader.

One important caveat: the reference labels (solid / partial / gap) were written by Claude, the AI assistant that helped me build this, not by me or any other person. So "agreement" here means agreement between two AI readings of the same rubric, not agreement with a human examiner.

Results (Gemini 3.1 Flash-Lite, 216 calls, 0 failed, eval/results/SUMMARY.md):

Answer key (CodeViva) Model picks a score (old)
Matches the reference label 80% 80%
Severe misses (solid ↔ gap) 0 0
Wrong answers (14) marked gap 14 9 (5 got 5/10)
Half-right answers (6) marked partial 0 5
Same verdict on all 3 runs 100% 100%

The line checker found 11 of 12 questions on the right lines the first time. The 12th highlighted 13 lines, over the 12-line limit. It stayed unverified after a retry and is shown to the user as "lines not verified".

You can rely on it for telling a complete answer from a wrong one, in English, Bangla or Banglish. Every wrong or off-topic answer scored 0, and every complete one scored 10.

Don't rely on it for:

  • The middle ground. A vague or half-right answer usually comes out as gap (3/10), sometimes as solid. If you get a gap on an answer you thought was roughly right, read it as "say more", not "you're wrong".
  • Its "wrong claim" flags. In the demo run's re-test, I said that calling area.setNext(admin) would drop the relief coordinator from the chain. That's correct, but the examiner flagged it as a wrong claim and gave 0. The examiner's own explanation mentioned a NullPointerException. In fact relief would simply be out of scope, which is a compile error. The answer key can be wrong too.
  • Consistency gains. On this set, the answer key didn't make grading more consistent; both graders were already stable.
  • Questions with no anchor. A question that names no identifier and no line number can't be checked by the line checker.

It's practice, not proctoring. The score is feedback, not a grade.

How AI helped build it

I used Claude (Anthropic) as a coding assistant throughout the event. It wrote most of the new code, the evaluation answers and the evaluation's reference labels. My part was choosing the project and the scope, and approving a prioritised plan before any code was written. I also supplied my own projects for the evaluation, asked for the deployment and a live test with real Gemini, and approved each redesigned screen one at a time.

Automated checks (unit tests, plus driving the real page in headless Chrome) caught six real bugs in the AI-written code before they were committed. One example: the line checker first "fixed" a question about dequeue by moving its highlight into init_queue. They're listed in docs/AI-USE.md. To be upfront: I didn't do a separate written review of one specific AI-written file, and I didn't label the evaluation myself.

Testing the main task

These checks were run during development; "live" means on the hosted site with real Gemini.

Check What was tried Result
Main flow Load → questions → report → re-test Pass, live: ReliefSync chain package, report 33/100, re-test 0 → 85 on the missed lines
Ordinary use Bundled C sample, English answers Pass, live: a good, a vague and a wrong answer scored 10, 6 and 0
Other languages Python code from my SMS project, Bangla and Banglish answers Covered by the evaluation set; a Banglish follow-up also scored 10/10 in the live run
Repeatability Each evaluation answer graded 3 times Pass: 30 of 30 got the same verdict every time
Demanding My ReliefSync repo by link, Java, follow-ups and re-test Pass, live (the run above)
Bad link A private or non-existent repo Pass, live: clear "not found" (404) and "bad link" (400) messages, loaded files untouched
AI failure mid-viva Gemini timeout Pass, live: it happened twice in the demo run, answers were kept and Retry worked. Refresh → Resume was also tested in headless Chrome

Challenges

  • Questions pointing at the wrong lines. This was the hardest bug. The model would ask about dequeue but highlight init_queue. My first fix made it worse by re-anchoring on common words. What worked was anchoring on the rarest identifier in the question and preferring the file the model named.
  • Grading that depends on the model's mood. Asking for a 0–10 score gave half marks to fluent but wrong answers. Writing the answer key first and doing the maths on the server fixed that, at the cost of being harsh on half-right answers.
  • Free-tier reality. Gemini sometimes returns 502/504 or times out. Retries with backoff, a visible Retry button and the saved session mean nothing is lost when that happens.

What I learned

Grounding matters more than clever prompts. A question about the wrong lines is worse than no question. I also learned to measure before claiming. I expected the answer key to make grading more consistent, but the numbers said it mainly stops wrong answers from getting credit, so that's what I report.

What's next

  • A teacher mode that generates a viva for each student's submission.
  • A spoken examiner, so the whole viva can be done by voice.
  • "Explain this commit" for code an AI assistant just changed.
  • Real human labels for the evaluation set, from classmates and a teacher.

Built with

Node.js · Express · JavaScript · Google Gemini API · GitHub REST API · Web Speech API · node:test · Render

Share this project:

Updates

Submission history